Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,834 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A local-first agent runtime for serious software work.

AX Code runs coding agents against your actual repositories through AX Code Desktop, a terminal TUI, one-shot CLI, VS Code, a TypeScript SDK, and a local HTTP server. It is built around durable sessions, explicit tools, sandboxed execution, provider routing, code intelligence, and MCP/plugin extensibility so teams can let agents act without losing control of the work.

  • Work interactively in the terminal with model, provider, agent, session, MCP, and skill controls
  • Run headless tasks for scripts, CI, bots, and internal automation with the same runtime
  • Preserve work with persistent sessions, replay, fork, export, compare, rollback, and repo instructions in AGENTS.md
  • Bound execution with workspace-write, read-only, or full-access isolation plus permission rules
  • Extend with MCP servers, plugins, custom agents, Agent Skills, SDK tools, and VS Code integration

Built by DEFAI Digital.

Release v7.1.0 macOS Apple Silicon Windows x64 Windows ARM64 CLI License: Apache 2.0 Discord


Get Started

Supported Install Targets

Platform Status Install path
macOS Apple Silicon Active support Homebrew CLI formula and Desktop cask
Windows x64 Active support PowerShell CLI installer and Desktop release installer
Windows ARM64 Active support PowerShell CLI installer and Desktop release installer
Linux x64 / arm64 Active support Bash release installer (install script) for CLI

Recommended: AX Code Desktop

macOS

  1. Install Homebrew if you do not already have it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install AX Code CLI and Desktop:
brew tap defai-digital/ax-code
brew tap defai-digital/ax-code-desktop
brew trust defai-digital/ax-code
brew trust defai-digital/ax-code-desktop
brew install defai-digital/ax-code/ax-code
brew install --cask defai-digital/ax-code-desktop/ax-code-desktop

Already have Homebrew? Start from step 2. The brew trust commands support Homebrew setups that require explicit trust for third-party taps.

Install AX Code with Homebrew

Windows

  1. Install the AX Code CLI with PowerShell (release archives are verified with minisign; if minisign is not on PATH the installer bootstraps a pinned official build):
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://github.com/defai-digital/ax-code/releases/latest/download/install.ps1 | iex"

Set AX_CODE_SKIP_MINISIGN_VERIFY=1 only if you intentionally accept an unverifiable download. For a download-and-inspect flow that also verifies install.ps1 itself, see Installation and Runtime Channels.

  1. Install AX Code Desktop separately from the latest GitHub Release:
  • Intel/AMD Windows: download and run the latest AX-Code-<version>-win-x64.exe.
  • Windows on Arm: download and run the latest AX-Code-<version>-win-arm64.exe.

Windows Desktop installers are Authenticode-signed by DEFAI Private Limited. SmartScreen may still warn for a newly released build while it develops download reputation; continue only when Windows shows that expected publisher. Do not run an installer reported as Unknown publisher.

The PowerShell install.ps1 path installs the CLI only. It does not install the Desktop app.

AX Code Desktop is the primary graphical workspace. It shares the AX Code runtime and provider setup, and its source lives in this monorepo under desktop/. The standalone Desktop source repository has been retired.

Run

ax-code

Or open AX Code from Applications / Start Menu to use the Desktop app. The terminal UI can also start or open the browser web UI with /webui, and shell users can run ax-code webui. The web UI prefers http://127.0.0.1:3100 and scans upward if that port is busy. No project setup or config file is required. On first launch, connect a provider from the Desktop onboarding flow or use /connect inside the terminal UI.

CLI-only install

Use this path for terminals, headless tasks, CI jobs, bots, servers, and SDK/integration hosts.

macOS

brew tap defai-digital/ax-code
brew trust defai-digital/ax-code
brew install defai-digital/ax-code/ax-code

Linux

curl -fsSL https://github.com/defai-digital/ax-code/releases/latest/download/install | bash

Requires curl and tar. Release archives are verified with minisign; if minisign is not on PATH the installer bootstraps a pinned official build (or set AX_CODE_SKIP_MINISIGN_VERIFY=1 only if you intentionally accept an unverifiable download). Installs the node-bundled CLI under ~/.ax-code/bin. Pin a version with bash -s -- --version <release>.

Windows

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://github.com/defai-digital/ax-code/releases/latest/download/install.ps1 | iex"

Verifies the downloaded release archive with minisign (bootstraps a pinned minisign binary when needed). Set AX_CODE_SKIP_MINISIGN_VERIFY=1 only if you intentionally accept an unverifiable download. Installs the node-bundled CLI under %USERPROFILE%\.ax-code\bin. Pin a version with -Version <release>. Uninstall with .\install.ps1 -Uninstall.

Supported CLI install paths are Homebrew (macOS), the Bash release installer (Linux), and the GitHub release installer for Windows PowerShell. The Windows PowerShell installer is CLI-only; use the Windows .exe release asset for Desktop. npm packages are no longer a supported channel. See Installation and Runtime Channels for the full matrix.

AX Engine local inference is available only on eligible Apple Silicon Macs. Install its matching MLX runtime with brew install defai-digital/ax-engine/ax-engine; AX Code then starts and manages the local server on demand. Windows Desktop users should use hosted providers or OpenAI-compatible provider gateways; AX Code itself remains local-only and cannot be used as a remote server. For headless use, CI jobs, or preconfigured shells, AX Code also respects provider environment variables such as GOOGLE_GENERATIVE_AI_API_KEY, GROQ_API_KEY, OPENROUTER_API_KEY, ZHIPU_API_KEY, Alibaba plan keys, and GITHUB_TOKEN.

Update

ax-code upgrade and package-manager update commands apply to the node-bundled runtime shipped by supported installers.

ax-code upgrade

macOS

brew upgrade defai-digital/ax-code/ax-code
brew upgrade --cask defai-digital/ax-code-desktop/ax-code-desktop

If ax-code is missing after a Homebrew upgrade (older setups installed the Desktop cask under the conflicting ax-code token, which makes Homebrew skip linking the CLI formula), restore it with:

brew link ax-code
hash -r

Windows

powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://github.com/defai-digital/ax-code/releases/latest/download/install.ps1 | iex"

This updates the Windows CLI. AX Code Desktop updates through the Desktop auto-updater, or by downloading the latest AX-Code-<version>-win-x64.exe / AX-Code-<version>-win-arm64.exe installer from GitHub Releases. For unattended Desktop installs, run the NSIS installer with /S (for example .\AX-Code-7.1.0-win-x64.exe /S).

From Source (contributors)

git clone https://github.com/defai-digital/ax-code.git
cd ax-code && pnpm install && pnpm run setup:cli

Requires pnpm v10.33.4+ and Node.js matching the root package.json engine (>=24, >=26 for source-mode TUI commands that use --experimental-ffi). setup:cli builds and installs a node-bundled launcher. ax-code doctor should report Runtime: Node vX.Y.Z (node-bundled) — the same node-bundled runtime shipped by every supported install channel (Homebrew, Windows installer).

Refresh the local bundled runtime after code changes:

pnpm --dir packages/ax-code run build -- --single
pnpm run setup:cli -- --rebuild
ax-code doctor

For contributor-only source debugging, install the checkout-bound launcher explicitly:

pnpm run setup:cli -- --source

That source launcher should report Runtime: Node vX.Y.Z (source) and is intentionally separate from the default node-bundled launcher.


What AX Code Does

AX Code is designed for agent work that touches real files, shells, sessions, and team policy. The same runtime powers every surface:

Need Use
Desktop app AX Code Desktop provides the graphical app from desktop/ as a separate Electron installable for macOS/Windows
Interactive coding ax-code opens the terminal UI with provider, model, agent, session, MCP, and skill flows
One-shot automation ax-code run "review the auth flow" runs a bounded headless task
Local service / integrations ax-code serve exposes the runtime over a local HTTP API and OpenAPI contract
TypeScript embedding @ax-code/sdk provides createAgent(), streaming events, sessions, custom tools, and tests
VS Code The VS Code integration uses the installed CLI/server while staying editor-native

Current Capabilities

  • Terminal command center: prompt editing, provider/model picker, agent picker, session list, MCP status, skill dialog, sandbox/autonomous toggles, and live tool progress.
  • Controlled execution: tools such as read, edit, write, grep, glob, bash, web fetch/search, todo, task, and skill execution all pass through permission and isolation boundaries.
  • Durable sessions: resume, fork, compact, export/import, replay, compare, rollback, and inspect session risk instead of losing work when a chat closes.
  • Repository intelligence: ax-code init writes a thin AGENTS.md; the native ax-code wiki compiler creates source-backed semantic docs; ax-code index, graph, semantic diff, LSP-backed context, and risk/DRE views provide structural precision on larger codebases.
  • Provider flexibility: connect hosted or local providers from /connect or ax-code providers login; list available models with ax-code models.
  • Extensibility: add MCP servers, create custom agents, validate Agent Skills, and embed custom SDK tools without rebuilding the orchestration layer.

Control Model

AX Code starts with autonomous mode on and runtime isolation in workspace-write by default: network is disabled, writes stay inside the workspace, and protected paths such as .git/ and .ax-code/ remain blocked. The agent can make progress without asking about every low-risk step, while the sandbox still enforces the boundary.

  • Use /sandbox, --sandbox read-only, --sandbox workspace-write, or --sandbox full-access to change isolation intentionally.
  • Use /autonomous or AX_CODE_AUTONOMOUS=false when you want the agent to stop for each permission or question.
  • Use ax-code mcp list --tools, ax-code mcp trust, and permission rules to control external MCP tool surfaces.
  • Provider and MCP credentials are encrypted at rest; server mode is localhost-only by default.

See Sandbox Mode, Autonomous Mode, MCP Integrations, and SECURITY.md for the full control model.

Typical Workflow

  1. Open a repository and run ax-code.
  2. Use /connect to add a provider or switch models. For automation, use ax-code providers login or provider environment variables.
  3. Run ax-code init so AGENTS.md captures local conventions, safety rules, and project context. Use ax-code init --wiki (or ax-code wiki generate) when you want a native semantic wiki under ax-wiki/.
  4. Keep the default sandbox for broad edits; change it only when the task needs a different boundary.
  5. Run ax-code index on larger repos when structural code-intelligence (symbols, callers, refs) matters; use the wiki for architecture narrative.
  6. Use ax-code run, ax-code serve, or @ax-code/sdk when the same agent workflow needs to move into scripts, CI, bots, or applications.

Grok defaults to Grok Build CLI in /connect, using the local grok command and its CLI login/session. The hosted Grok Cloud API provider still works for explicit xai configuration or existing credentials, but is hidden from the default provider list.

Supported Providers and Models

Default setup flows support three provider families:

Family Providers Model source
Cloud API providers Google, GroqCloud, OpenRouter, Alibaba Coding/Token Plan, GitHub Copilot, and Z.AI Coding Plan Hosted provider model catalogs bundled with AX Code
CLI providers Claude Code, Gemini CLI, Codex CLI, Grok Build CLI, Qoder CLI, Antigravity CLI, and Kimi Code CLI One model id per CLI bridge, using the local vendor CLI session
AX Engine local provider ax-engine on eligible Apple Silicon Macs Curated 6-bit MLX Auto models: MTP packages with Direct fallback

See Supported Providers and Models for provider ids, credential variables, and the exact supported model ids.

Local AX Engine Models

AX Engine local inference is optimized for eligible Apple Silicon Macs. The built-in AX Code provider uses a curated 6-bit MLX model set, automatically preferring packaged MTP and falling back to Direct decode, and defaults to Qwen3.6-27B for the best daily balance of offline coding, reasoning, and local memory fit. See AX Engine Model Selection for the ranking, GLM-4.7-Flash placement, and memory-based recommendations.

Documentation

  • Start Here: understand what AX Code is, where the value comes from, and which docs to read next
  • Documentation Hub: guides, architecture, specs, and reference docs
  • Sandbox Mode: isolation modes, protected paths, and network controls
  • Autonomous Mode: unattended execution behavior and safeguards
  • MCP Integrations: trust, permissions, and prompt/resource safety for MCP servers
  • Auto-Route: keyword-based specialist routing and optional fast-model complexity routing
  • Supported Providers and Models: Cloud API providers, CLI providers, and AX Engine model ids
  • AX Engine Model Selection: local AX Engine model ranking and memory guidance
  • Semantic Layer: provenance and replay boundaries for graph and LSP-backed answers
  • AX Wiki: native source-backed semantic wiki; complements ax-code index
  • Stability: crash hygiene, aborts vs faults, TUI lifecycle, timeouts

Common Commands

Command Purpose
ax-code Open the interactive terminal UI
ax-code run "debug why the build is failing" Run a one-shot headless task
ax-code providers login Configure provider credentials
ax-code models List available provider/model IDs
ax-code init Create or update repository AGENTS.md
ax-code init --wiki AGENTS.md + native AX Wiki bootstrap
ax-code wiki AX Wiki plan / generate / update / lint / cards
ax-code index Build code-intelligence indexes
ax-code graph Inspect the repository graph
ax-code mcp list --tools Review MCP servers, exposed tools, and rules
ax-code mcp add Add a local or remote MCP server
ax-code agent create Generate a custom project or global agent
ax-code skill list List discovered Agent Skills
ax-code serve Start the local HTTP/OpenAPI server
ax-code doctor Diagnose install, runtime, storage, and auth

Community

Report bugs, feature requests, and questions through GitHub Issues. See CONTRIBUTING.md for the current contribution policy and Discord for community discussion.

Provenance

AX Code is maintained by DEFAI Private Limited. The repository includes code with upstream history from these MIT-licensed projects:

  • OpenCode: the AX Code CLI, runtime, session, provider, and tool foundations began as a DEFAI-maintained product built on the OpenCode codebase. See NOTICE for the root runtime attribution.
  • OpenChamber: AX Code Desktop includes code derived from OpenChamber, adapted for the AX Code Desktop product, packaging, settings, and runtime model. See desktop/NOTICE for the Desktop attribution.
  • ax-cli: selected AX/CLI capabilities were ported from DEFAI's earlier ax-cli project. See NOTICE for the root attribution.

These notices preserve license provenance and upstream credit. They do not mean the upstream OpenCode, OpenChamber, or ax-cli projects maintain AX Code, AX Code Desktop, or current DEFAI modifications.

License

AX Code is licensed under the Apache License, Version 2.0 — Copyright (c) 2025 DEFAI Private Limited.

Portions derived from MIT-licensed projects (notably OpenCode) remain under the MIT License, and the vendored OpenTUI packages under packages/opentui-* remain MIT-licensed under their own LICENSE files. See NOTICE, LICENSE-MIT, desktop/NOTICE, and the provenance section above for upstream attribution.

About

AI coding runtime for the business production environment

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages