| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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.
curl -fsSL https://autohand.ai/install.sh | bashbrew install autohandai/code/autohand-codeThe 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.
# 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 .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.fishAfter 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>.
# 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" -cUse Autohand Code CLI directly in your favorite editor:
Install the extension from the VS Code Marketplace or via command line:
code --install-extension AutohandAI.vscode-autohandRun 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.
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:
Launch without arguments for a full REPL experience:
autohandFeatures:
Run single instructions for CI/CD, scripts, or quick tasks:
# Basic usage
autohand --prompt "add tests for the user service"
# Short form
autohand -p "fix linting errors"
# With options
autohand -p "update dependencies" --yes --auto-commit
# Dry run (preview changes without applying)
autohand -p "refactor database queries" --dry-run
# Stream lifecycle events as JSON Lines
autohand -p "review this diff" --output-format stream-json
# Equivalent stream alias, or write only the final result object
autohand -p "review this diff" --json stream
autohand -p "review this diff" --json local--output-format stream-json and --json stream write one JSON object per agent event to stdout. Events include thinking, tool_start, tool_end, file_modified, result, and error. --json local suppresses intermediate events and writes exactly one final result or error object to stdout.
| Option | Short | Description |
|---|---|---|
| --prompt <text> | -p | Run a single instruction in command mode |
| --output-format stream-json | Stream command lifecycle events as JSON Lines | |
| --json <stream|local> | Stream JSON Lines or write only the final JSON result (--json defaults to stream) | |
| --yes | -y | Auto-confirm risky actions |
| --auto-commit | -c | Auto-commit changes after completing tasks |
| --dry-run | Preview actions without applying mutations | |
| --debug | -d | Enable debug output (verbose logging) |
| --model <model> | Override the configured LLM model | |
| --path <path> | Workspace path to operate in | |
| --auto-skill | Auto-generate skills based on project analysis | |
| --unrestricted | Run without approval prompts (use with caution) | |
| --restricted | Deny all dangerous operations automatically | |
| --plan | Start in read-only plan mode before the first prompt | |
| --no-idle-logout | Disable authenticated idle logout for long-running agent sessions | |
| --config <path> | Path to config file | |
| --temperature <value> | Sampling temperature for LLM | |
| --thinking [level] | Set thinking/reasoning depth (none, normal, extended) | |
| --learn | Run skill advisor non-interactively | |
| --learn-update | Re-analyze project and regenerate skills | |
| --skill-install [name] | Install a community skill | |
| --project | Install skill to project level (with --skill-install) | |
| --permissions | Display current permission settings and exit | |
| --login | Sign in to your Autohand Code account | |
| --logout | Sign out of your Autohand Code account | |
| --sync-settings [bool] | Enable/disable settings sync (default: true for logged users) | |
| --patch | Generate git patch without applying changes | |
| --output <file> | Output file for patch (default: stdout) | |
| --mode <mode> | Run mode: interactive (default), rpc, or acp | |
| --acp | Shorthand for --mode acp (Agent Client Protocol over stdio) | |
| --teammate-mode <mode> | Team display mode: auto, in-process, or tmux | |
| --worktree [name] | Run session in isolated git worktree (optional name) | |
| --tmux | Launch in a dedicated tmux session (implies --worktree) | |
| --auto-mode [prompt] | Enable interactive auto-mode, or start standalone loop with inline task | |
| --max-iterations <n> | Max auto-mode iterations (default: 50) | |
| --completion-promise <text> | Completion marker text (default: "DONE") | |
| --no-worktree | Disable git worktree isolation in auto-mode | |
| --checkpoint-interval <n> | Git commit every N iterations (default: 5) | |
| --max-runtime <m> | Max runtime in minutes (default: 120) | |
| --max-cost <d> | Max API cost in dollars (default: 10) | |
| --interactive-on-complete | After auto-mode ends, hand off to interactive mode (TTY only) | |
| --setup | Run the setup wizard to configure or reconfigure Autohand Code CLI | |
| --about | Show information about Autohand Code CLI | |
| --add-dir <path...> | Add additional directories to workspace scope (can be used multiple times) | |
| --display-language <locale> | Set display language (e.g., en, id, zh-cn, fr, de, ja) | |
| --cc, --context-compact | Enable context compaction (default: on) | |
| --no-cc, --no-context-compact | Disable context compaction | |
| --search-engine <provider> | Set web search provider (browser-profile, exa, google, brave, duckduckgo, parallel) | |
| --sys-prompt <value> | Replace entire system prompt (inline string or file path) | |
| --append-sys-prompt <value> | Append to system prompt (inline string or file path) | |
| --yolo [pattern] | Auto-approve tool calls matching pattern (e.g., allow:read,write or deny:delete) | |
| --timeout <seconds> | Timeout in seconds for auto-approve mode | |
| --settings | Configure Autohand Code CLI settings (same as /settings in interactive mode) | |
| --feedback | Submit feedback | |
| --browser | Enable browser integration (same as /browser) | |
| --no-browser | Disable browser integration |
Native computer control commands:
| Command | Description |
|---|---|
| autohand computer status [--json] | Show Autohand Computer Use and MCP readiness |
| autohand computer install [--force] | Install or repair the pinned, verified native driver |
| autohand computer doctor | Check platform support and desktop permissions |
Skills are modular instruction packages that extend Autohand Code CLI with specialized workflows. They work like on-demand AGENTS.md files for specific tasks.
# List available skills
/skills
# Activate a skill
/skills use changelog-generator
# Create a new skill interactively
/skills new
# Auto-generate project-specific skills
autohand --auto-skillAnalyze your project and generate tailored skills automatically:
$ autohand --auto-skill
Analyzing project structure...
Detected: typescript, react, nextjs, testing
Platform: darwin
Generating skills...
✓ nextjs-component-creator
✓ typescript-test-generator
✓ changelog-generator
✓ Generated 3 skills in .autohand/skillsSkills are discovered from:
See Agent Skills Documentation for creating custom skills.
| Command | Description |
|---|---|
| /help | Display available commands |
| /? | Alias for /help |
| /quit | Exit the session |
| /exit | Exit the session |
| /model | Switch LLM models |
| /new | Start fresh conversation |
| /clear | Clear conversation history |
| /undo | Revert the last recorded agent file mutation and conversation turn |
| /session | Show current session details |
| /sessions | List past sessions |
| /resume | Resume a previous session |
| /memory | View/manage stored memories |
| /init | Create AGENTS.md file |
| /agents | Show active Autohand CLI instances |
| /agents definitions | List configured sub-agents |
| /agents-new | Create new agent via wizard |
| /skills | List and manage skills |
| /skills new | Create a new skill |
| /skills use | Activate a skill |
| /skills install | Install a community skill |
| /skills search | Search for skills |
| /skills trending | List trending skills |
| /skills remove | Remove an installed skill |
| /learn | Get skill recommendations |
| /feedback | Send feedback |
| /formatters | List code formatters |
| /lint | List code linters |
| /completion | Generate shell completion scripts |
| /export | Export session to markdown/JSON/HTML |
| /status | Show workspace status |
| /usage | Show token activity by day, week, or month |
| /login | Authenticate with Autohand Code API |
| /logout | Sign out |
| /permissions | Manage tool permissions |
| /hooks | Manage git hooks |
| /experiments | Toggle experimental feature switches |
| /settings | View configuration settings |
| /theme | Change UI theme |
| /language | Change display language |
| /cc | Toggle context compaction |
| /search | Search the web |
| /deep-research | Run cited research; use status for progress (/deep-search alias) |
| /publish-research | Preview and publish a saved research report with explicit confirmation |
| /automode | Manage auto-mode |
| /autoresearch | Run replayable benchmark loops with history, replay, comparison, and Pareto analysis |
| /goal | Set a session-attached persistent goal and continue until it reaches a terminal state |
| /goal writer | Draft one or more well-specified goals with the built-in $goal-writer skill |
| /goals, /goals view | Open the live goals view with compact summaries and statuses |
| /goal view | Alias for /goals view |
| /goals edit <id> <objective> | Update this session's goal or a queued goal by ID |
| /goals queue [objective] | List queued goals and their IDs, or add an objective to the queue |
| /goals pause | Pause this session's current goal |
| /goals resume | Resume this session's goal, or start queued work when it has no current goal |
| /goals complete | Mark the current goal complete and advance queued work when completion requirements are met |
| /goals clear | Clear this session's current goal while retaining queued work |
| /goals templates | List reusable goal templates |
| /squad | Open/manage the local Autohand Squad runtime |
| /go | Pair this session with the Autohand Code iOS app |
| /sync | Sync settings across devices |
| /add-dir | Add additional workspace directory |
| /plan | Create a task plan |
| /about | Show information about Autohand Code CLI |
| /whatsnew | View and dismiss active CLI announcements |
| /ide | Open in IDE |
| /history | View command history |
| /mcp | Manage MCP servers |
| /mcp install | Install validated Official MCP Registry servers (stdio and HTTP) |
| /team | Manage team collaboration |
| /tasks | List team tasks |
| /message | Send team message |
| /import | Import data from Claude, Codex, Gemini, Cursor, OpenCode, Kimi, Grok hooks, and other agents |
| /repeat | Repeat previous actions |
| /browser | Browser integration |
| /review | Code review |
Persistent goal data remains in the workspace across conversations, but execution does not silently transfer work owned by another live session. Bare /goal inspects prior state and starts the next queued item when this session has no goal and no live peer owns the backlog. Use /goal resume to resume this session's paused goal or explicitly start queued work.
Published CLI announcements appear as a cached launch block and a persistent line above the composer. Press Ctrl+X to dismiss the visible item, or use /whatsnew to review and dismiss all active announcements. Dismissal is per announcement; --offline keeps cached announcements visible without making announcement requests.
/go --steer and /handoff session --steer keep the paired iOS app updated with permission/change requests and read-only GitHub delivery metadata. While a relay is active, the CLI publishes the current pull request, checks, and GitHub deployment records when available; missing gh authentication does not stop the coding session. On macOS, steer handoff also keeps the computer awake with a CLI-owned caffeinate process; the paired phone can turn that assertion on or off, and it is always released when the relay stops or the CLI exits. Ready pull requests can be squash merged from the paired phone after a second explicit confirmation. The relay re-fetches the current PR and rejects the action unless its reviewed number and head branch still match, it remains open and mergeable, and all reported checks pass. Only then does it run the fixed gh pr merge <number> --squash command and publish the result to mobile. For mobile-originated completed work, explicitly referenced PNG/JPEG, MP4, and text/JSON artifacts inside the active workspace can be uploaded to the authenticated mobile session. Real-path confinement prevents symlink escapes, and uploads are capped at 12 files and 15 MB per file.
The paired app builds its composer command suggestions from the CLI's live catalog, so canonical command names, descriptions, and availability come from the current session instead of a hard-coded phone list. Only commands marked available can run. Availability updates with the session: /goal is runnable only when goals are enabled, while /plan status returns the current plan-mode details to the phone.
Phone commands and prompts share the same ordered work stream as prompts typed in the terminal composer. Autohand runs them one at a time in submission order, including when the phone and terminal both submit while another turn is active.
When a mobile task explicitly resumes history, it must name an exact session that is stored locally for the current workspace. Autohand restores that session before running the prompt; a missing or different-workspace target fails the task instead of silently starting fresh or continuing another session. The phone remains paired to the existing live CLI connection while the resumed session is identified in task progress and results.
Enable the experimental goals feature, then open the live view:
/experiments enable slash_goal
/goals view
/goals and /goal view also open this view. It groups the current goal, queued goals, and goals from other sessions into short, single-line previews with statuses. The full objectives remain available for editing. Other-session rows are informational; editing applies to this session's goal and the shared queue.
| Control | Action |
|---|---|
| Ctrl+G (Cmd+G on macOS) | Open or close the goals view |
| Up / Down, with an empty composer | Select an editable goal |
| Enter on a selected goal, or click its row | Load the full objective into the composer |
| Enter while editing | Save the edited objective |
| Esc with a goal selected or being edited | Clear the selection or cancel the unsaved edit; the view stays open |
The footer shows Ctrl+G close beside the editing controls. Closing the view hides the panel; use /goals pause to pause the current goal. All goal subcommands accept either /goal or /goals. Bare /goals opens the view, while bare /goal can start the goal writer or queued work, depending on the current session state.
See goal commands and examples and goals and auto mode for more details.
Autohand Code CLI includes 40+ tools for autonomous coding:
read_file, write_file, append_file, apply_patch, search, search_replace, semantic_search, list_tree, create_directory, delete_path, rename_path, copy_path
git_status, git_diff, git_commit, git_add, git_branch, git_switch, git_merge, git_rebase, git_cherry_pick, git_stash, git_fetch, git_pull, git_push, auto_commit
run_command, custom_command, add_dependency, remove_dependency
plan, todo_write, save_memory, recall_memory
tools_registry - List all available tools with descriptions. tool_search - Search tools by capability, name, or description. create_meta_tool - Create reusable user- or project-scoped shell-backed tools that load in future sessions.
Package reusable tools and agents in a strict declarative manifest, then validate and install them without changing CLI source:
autohand extensions validate ./examples/extensions/autohand.code-health
autohand extensions install ./examples/extensions/autohand.code-health
autohand extensions listDeclarative extensions contribute tools, focused agents, and portable Agent Skills without package-code execution. Reviewed runtime extensions installed with --trust can also register slash commands, Ink UI, status/help segments, keybindings, CLI flags, hooks, providers, and permission policy. Mention $extension-builder to create, extend, or adapt an extension from a description or Pi package. See the extension-builder guide and terminal demo, Using extensions, Extension authoring, and the seven working examples.
notebook_cell_edit - Edit Jupyter notebook cells (code/markdown insert, delete, replace).
team_create, team_list, task_create, task_list, task_update, task_set_owner - Multi-agent team coordination.
spawn_subagent - Delegate tasks to focused agents to keep the main context window clean.
use_skill, sleep - Activate skills or pause execution. screenshot, navigate, get_page_content, click, type_input, select_dropdown - Browser integration.
Create ~/.autohand/config.json or use config.toml, config.yaml, or config.yml:
{
"provider": "openrouter",
"openrouter": {
"apiKey": "sk-or-...",
"model": "your-modelcard-id-here"
},
"workspace": {
"defaultRoot": ".",
"allowDangerousOps": false
},
"ui": {
"theme": "aurora",
"autoConfirm": false
}
}| Provider | Config Key | Notes |
|---|---|---|
| Autohand AI | autohandai | Cloud Fantail/Moa or guided local Apple Silicon MLX. Weka is API/Console only. |
| OpenRouter | openrouter | Access to Claude, GPT-4, Grok, etc. |
| LLMGateway | llmgateway | Direct Claude API access |
| OpenAI | openai | GPT-4 and other models |
| AWS Bedrock | bedrock | Bedrock Converse and OpenAI-compatible modes |
| DeepSeek | deepseek | DeepSeek V4 Flash, V4 Pro, reasoning |
| Ollama | ollama | Local models |
| llama.cpp | llamacpp | Local inference |
| MLX | mlx | Apple Silicon optimized |
| Z.ai | zai | High-performance inference |
Sessions are auto-saved to ~/.autohand/sessions/:
# Pick a session from the current project
autohand resume
# Resume the most recently active session in this project
autohand resume --last
# Browse all projects, or resume the most recently active session across them
autohand resume --all
autohand resume --last --all
# Resume by full ID, unique ID prefix, or saved session directory/file
autohand resume <reference>
# Select sessions for a different workspace
autohand resume --path /path/to/project
# Or in interactive mode
/resumeThe picker supports arrow keys, Enter, and page navigation for older sessions. Escape or Ctrl+C cancels without starting a session. --last uses the last activity time, falling back to creation time for older session metadata. Without a terminal, provide --last or an explicit reference. References cannot be combined with --last or --all; -c remains auto-commit.
Autohand Code CLI supports Entire for session checkpointing. Entire captures your coding sessions -- prompts, file changes, and token usage -- as git-backed checkpoints that you can rewind to, review, and share.
# Install hooks in this repository
entire enable --agent autohand-code
# Check status
entire status
# Remove hooks
entire disable --agent autohand-codeOnce enabled, Entire works automatically through the Autohand Code CLI hooks system. No changes to your workflow are needed. See the Entire Integration Guide for setup details and troubleshooting.
Start with autohand --plan to investigate and plan before editing. For a one-shot plan, use autohand --plan --prompt "Plan a refactor of the authentication module". The first model request receives the plan instructions and read-only tools; mutating tool calls are blocked.
Interactive plans require an explicit acceptance decision, including with --yes or --unrestricted. One-shot and unattended plans remain pending review. Shift+Tab and /plan on|off still change the interaction mode. --plan cannot be combined with --yolo, --auto-mode, or --auto-commit.
Autohand Code CLI includes a permission system for sensitive operations:
Configure granular permissions in ~/.autohand/config.toml/yaml/json:
{
"permissions": {
"whitelist": ["run_command:npm *", "run_command:bun *"],
"blacklist": ["run_command:rm -rf *", "run_command:sudo *"]
}
}Product telemetry and full session sync are disabled by default. They are separate choices: session sync includes conversation content and requires both an authenticated account and its own explicit switch.
{
"telemetry": {
"enabled": false,
"enableSessionSync": false
}
}The ordinary version check and automatic diagnostic reports are separate data paths with separate controls. Error strings can contain sensitive text even after path sanitization. See Data collection, telemetry, and agent traces for exact fields, defaults, endpoints, and limits.
Autohand can normalize local session records from 19 coding-agent harnesses into an aggregate-only Work Map. Local collection, cloud metadata sync, and cloud full content are independent consent levels; all are off by default except Work Map availability after local collection has been enabled.
# Choose local-only or cloud collection during onboarding or in /settings
autohand --traces-on
autohand discovery map --since 30d
autohand discovery map --agent autohand,codex --json
ahtraces status
ahtraces offThe map includes session/tool/workflow/outcome and verification aggregates. It excludes prompts, responses, reasoning, commands, source code, paths, repository identities, session IDs, and credentials. See Repository discovery for command options.
The backend API is available at: https://github.com/autohandai/api
# Install dependencies
bun install
# Development mode
bun run dev
# Build
bun run build
# Type check
bun run typecheck
# Run tests
bun run testFROM oven/bun:1
WORKDIR /app
COPY . .
RUN bun install && bun run build
CMD ["node", "dist/index.js"]docker build -t autohand .
docker run -it autohandWe welcome contributions! Please read our Contributing Guide for details on how to get involved.
Installation fails: Make sure you have Bun installed and up to date.
Permission denied: Check your file permissions and try running with appropriate privileges.
Model not working: Verify your API key and model configuration in ~/.autohand/config.toml/yaml/json.
Autohand Code CLI is designed with security in mind:
Apache License 2.0 - Free for individuals, non-profits, educational institutions, open source projects, and companies with ARR under $5M. See LICENSE and COMMERCIAL.md for details.
Ready to get started? Run autohand in your terminal and start a coding session.
| Back | FazBrowse Home | New Git URL |