Autohand Code CLI

Follow us on X | Join Discord
Docs: English | 日本語 | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Polski | Русский | Português (Brasil) | Türkçe | Čeština | Magyar | हिन्दी | Bahasa Indonesia
A fast, self-improving terminal-native AI coding agent for planning, reflecting, remembering, editing, testing, and automating work across your codebase.
Autohand Code CLI is a fast, terminal-native AI coding agent that lives where you already work. It reads project context, plans changes, edits files, runs tools, and asks for approval before risky operations.
The interface is built for focused interactive sessions: minimal chrome, smooth Ink rendering, file mentions, slash commands, skills, permissions, provider switching, and session history all available from one prompt.
Install it, run autohand, and describe the outcome you want in natural language. Use Autohand Code CLI locally, with your editor, or in CI/CD to automate repetitive engineering work without giving up control.
Features
Interactive sessions assess repository readiness in the background while you work. A bounded, read-only scan compares AGENTS.md and CLAUDE.md history with committed and uncommitted changes, then asks your configured model for a repository map and concrete improvement candidates. It runs no project scripts and makes no edits. After your first successful turn, new findings appear once per repository; materially new findings can be offered in a later session. Use /readiness to review the evidence, /readiness apply 1 to choose a finding, or /readiness dismiss to skip. Set ui.repositoryReadiness to false to disable this background model request. Bare, ephemeral, offline, command, RPC and ACP sessions skip it.
The shell installer includes Zit v0.1.2 by default on supported macOS and Linux platforms, preserving an existing installation and verifying release checksums. Use --no-zit or AUTOHAND_SKIP_ZIT_INSTALL=1 to opt out. The Windows installer supports -NoZit and the same environment variable; it preserves an existing Zit installation and reports that native Windows binaries are currently unavailable. autohand --zit requires Git 2.38 or newer. Installing Zit does not initialize repositories.
On Windows, running install.sh from Git Bash, MSYS, or Cygwin delegates to the native PowerShell installer and preserves installation options. Autohand launched from Git Bash uses Bash for command tools; see shell settings to choose an executable explicitly.
The npm package includes checksum-verified Zit binaries for macOS and Linux on ARM64 and x64. npm install -g autohand-cli and bun install -g autohand-cli download them with the package, including when lifecycle scripts are disabled. Autohand uses ZIT_BIN, an existing zit on PATH, or its packaged binary, in that order. Rust and a separate Zit installation are not required. Native Windows Zit binaries are currently unavailable.
- Terminal-Native Agent: Understands your codebase and executes approved changes from the CLI
- Planning + Tools: Combines reasoning, file edits, shell commands, and web context in one loop
- Interactive REPL: Smooth terminal experience with file mentions, slash commands, and keyboard shortcuts
- Modular Skills: Extends workflows with specialized instruction packages
- Multi-Provider Support: Free Fantail model with an Autohand account, or 15+ providers incl. Anthropic, OpenAI, OpenRouter, Bedrock, DeepSeek, Azure, Vertex, xAI, Z.ai and local Ollama/llama.cpp/MLX
- Git Integration: Full version control support with automatic commits
- Cross-Platform: Works on macOS, Linux, and Windows
- Coming from Claude Code? Run
autohand import claude to bring over your settings, skills, hooks, sessions and memory
Why Autohand Code CLI?
- No Context Switching: Stay in your terminal, no copy-paste needed
- Intelligent Planning: Understands your codebase before making changes
- Safe Execution: Prompts before risky operations unless you choose a different permission mode
- Extensible: Add skills, hooks, and provider configuration as your workflow grows
- Fast: Optimized for responsive interactive sessions and efficient tool execution
Installation
Quick Install (Recommended)
curl -fsSL https://autohand.ai/install.sh | bash
Homebrew
brew install autohandai/code/autohand-code
The fully qualified command installs and trusts only the Autohand formula. Every
supported installation exposes the same CLI as autohand, autohand-code,
agent, and the short ah; autohand remains the canonical name. Because agent is a generic
name other AI CLIs also use, every Autohand installer (Unix script, Windows
script, and Homebrew) scans every writable directory on your PATH and
replaces any existing agent command it finds — not only the one in
Autohand's own install directory — so agent reliably resolves to Autohand.
This happens automatically with no prompt; if another tool's agent command
stops working after installing Autohand, this is why.
The npm package, release archives, Unix/Windows installers, and Homebrew formula
also install ahtraces, the managed local trace-monitor companion. npm downloads
the matching release binary during postinstall and verifies its SHA-256 checksum;
--ignore-scripts or AUTOHAND_SKIP_AHTRACES_INSTALL=1 intentionally omits it.
Its private source is built independently from a pinned revision during the
Autohand release. It remains idle until the user answers the trace-consent step.
New users see that step in onboarding; existing users see it once after upgrading
to the consent-aware release. Cloud trace ingestion does not count against
Autohand API usage.
Use autohand --traces-on, autohand traces on, or ahtraces on to enable
local monitoring with metadata sync. Use the matching --traces-off,
autohand traces off, or ahtraces off control to stop it. Uploaded traces are
visible at https://console.autohand.ai/traces and can be deleted from the
Console Account page. See the agent traces setup guide for consent modes, supported agents, Team use, and deletion controls.
The Unix and Windows installers and npm postinstall also install Autohand
Computer Use, built independently in the public
Autohand computer-use repository
from the MIT-licensed Cua engine. Autohand
reuses an existing compatible engine and connects it as a runtime-only MCP
server. On macOS, Privacy & Security lists Autohand Computer Use, and the
installer opens its Accessibility and Screen Recording requests. Ask “open my browser” or “go to Spotify and play X” to
activate the built-in computer-control skill. Run autohand computer status,
autohand computer install, or autohand computer doctor to inspect, repair,
or verify desktop permissions. See the native computer control guide.
Manual Installation
# Clone and build
git clone https://github.com/autohandai/code-cli.git
cd code-cli
bun install
bun run build
# Install globally
bun add -g .
Requirements
- Node.js 22 or later (to run Autohand)
- Bun 1.0 or later, only to build from source (
curl -fsSL https://bun.sh/install | bash)
- Git (for version control features)
- ripgrep (optional, for faster search)
Shell Completion
Completion scripts are generated from the current CLI command tree, including
nested commands and options, and register all three executable names.
# Zsh: enable now, then add the same line to ~/.zshrc
source <(autohand completion zsh)
# Bash: enable now, then add the same line to ~/.bashrc
source <(autohand completion bash)
# Fish: install persistently
autohand completion fish > ~/.config/fish/completions/autohand.fish
After loading the script, type an executable name followed by a partial command
or option and press Tab, for example agent --off<Tab> or
autohand exp<Tab>.
Quick Start
# Interactive mode - start a coding session
autohand
# Command mode - run a single instruction
autohand -p "add a dark mode toggle to the settings page"
# With auto-confirmation
autohand -p "fix the TypeScript errors" -y
# Auto-commit changes after task completion
autohand -p "refactor the auth module" --auto-commit
Editor Extensions
Use Autohand Code CLI directly in your favorite editor:
VS Code
Install the extension from the VS Code Marketplace or via command line:
code --install-extension AutohandAI.vscode-autohand
Zed Editor
Run Autohand Code CLI as a native ACP External Agent. See the ACP integration guide for Zed, JetBrains IDEs, JetBrains Air, and other ACP-compatible development environments.
Code Agent SDK
Developers can also build on the same CLI-backed agent runtime through the Code Agent SDK. Use it when you want Autohand Code CLI capabilities inside your own tools, services, workflows, or editor integrations.
The Agent SDK is available in multiple beta language packages. Use the same CLI-backed SDK model from another programming language:
- TypeScript - this package, with Agent, Run, streaming, and JSON helpers.
- Go - idiomatic Go package with context.Context, typed events, and channel-based streaming.
- Python - async Python package with async for event streams and typed Pydantic models.
- Java - Java 21 records, sealed events, and virtual-thread-ready APIs.
- Swift - SwiftPM package with Agent, Runner, async streams, tools, hooks, and permissions.
Usage Modes
Interactive Mode
Launch without arguments for a full REPL experience:
autohand
Features:
- Type
/ for slash command suggestions
- Type
@ for file autocomplete (e.g., @src/index.ts)
- Type
$ for skill autocomplete (e.g., $frontend-design)
- Type
! to run terminal commands (e.g., ! git status, ! ls -la)
- Large command results retain the first and last portions of each output stream, up to 1,048,576 characters, with an omission marker. The same limit applies to individual displayed lines; redirect output to a file when you need the complete result.
- Smart Paste: Paste any amount of code (5+ lines shows compact indicator, full content sent to LLM)
- Press
ESC to cancel in-flight requests
- Press
Ctrl+C twice to exit
- Press
Shift+Tab to cycle edit, plan, YOLO, and auto modes
- Press
? to toggle keyboard shortcuts panel
- Use
/goals to open the goals view; press Ctrl+G (Cmd+G on macOS) to toggle it open or closed
- Press
Up to recall older typed messages and Down for newer messages or your unfinished draft. In multiline drafts, Up moves the cursor until it reaches the first visual row.