AI Doer CLI — User Guide

The AI Doer CLI (aidoer) is a terminal client for the AI Doer AI agent. It runs the same agent engine that powers the AI Doer Editor and the VS Code extension — the difference is that the CLI embeds the engine in-process (as the mcp_universal Rust crate) and drives it directly, so there's no local HTTP server to manage.

Scope note. The CLI's own source (argument parsing, terminal rendering) lives in the separate aidoer repository. This repo (getaibd-editor) contains the shared engine (agent/) that the CLI vendors as engine/. So everything in this guide about agent behavior, modes, tools, and project configuration is authoritative and identical across all three products; only the exact CLI command flags are defined in the CLI repo and may differ slightly from the examples below.

Engine internals are documented in the source repository.


1. What the CLI is for

The CLI lets you point the AI Doer agent at a project from your terminal and:

Because the engine is embedded in-process, the CLI is a good place to validate agent behavior quickly and to script agent runs.


2. Installing

Install from the aidoer repository/release channel (see that project's README for the current install command). Once installed, run it from within (or pointed at) a project directory.

getaibd-cli            # start in the current directory

The CLI is scoped to a single project root (the directory you run it in, or one you pass explicitly). Memory and context are keyed to that root.


3. Authentication & the free tier

The CLI uses a login-based trial gate rather than the editor/VS anonymous device fingerprint. Consult the CLI repo for the login flow.


4. Basic usage

Typical patterns (exact flags come from the CLI repo):

# Interactive session in the current project
getaibd-cli

# One-shot prompt
getaibd-cli "explain how authentication works in this repo"

# Point at a specific project
getaibd-cli --project /path/to/repo "add a health check endpoint"

During a run the CLI streams the agent's activity to your terminal:

A AI Doer CLI session mid-task


5. Modes

The agent supports the same modes everywhere. Select the mode appropriate to your task:

Mode Purpose Edits/commands?
Agent Full end-to-end task execution. Yes
Plan Read-only exploration; produces a plan (to a temp markdown file). No
Ask Answer questions about the code. No
Debug Systematic troubleshooting with runtime evidence. Yes
Reviewer Strict read-only code review. No
Auto Let the orchestrator pick the best mode from your prompt. Depends

Each mode has its own system prompt and iteration budget, and Plan/Ask/Reviewer restrict the toolset to read-only operations (plus plan writing in Plan mode).


6. Approvals & command safety

The agent asks before running shell commands and using certain tools. In the CLI these are resolved through in-process approval gates:

The CLI command-approval prompt

You can codify a policy so you're not prompted for routine commands — see permissions.json.


7. What the agent can do (tools)

The agent has a rich toolset (identical across editor/CLI/VS). Highlights:

Files & editing

Search & code intelligence

Shell & environment

Git & GitHub

Worktrees

Web

Planning & completion

External tools

Large tool outputs (web_fetch, git_diff, git_show, git_blame) are stashed to .getaibd/tmp/ and referenced by path so they don't bloat the conversation context.

A file edit / review in the CLI


8. Project configuration (.getaibd/)

Drop a .getaibd/ folder in your project (or ~/.getaibd/ for global defaults) to guide the agent. These files are shared across all AI Doer clients:

AGENTS.md — project instructions

Free-form markdown rules the agent always reads for this project. Merged with the built-in baseline guidance.

rules/*.md — scoped rules

Markdown files with front matter (description, globs, alwaysApply) that apply conditionally.

permissions.json — command/tool policy

{
  "mode": "auto-review",
  "allow": ["git status", "cargo *", "read_file"],
  "ask": ["git push*", "*sudo*"],
  "deny": ["rm -rf /*"],
  "protect": { "file_deletion": true, "external_files": true }
}

mode is one of auto-review, allowlist, or run-everything. Project rules override global ones.

sandbox.json — opt-in command sandboxing

{
  "enabled": false,
  "writable_paths": ["~/.cargo"]
}

When enabled, run_command is wrapped in an OS sandbox — sandbox-exec (macOS Seatbelt) or bwrap (Linux) — restricting writes to the workspace, /tmp, and your writable_paths.

worktrees.json — worktree setup

{
  "setup-worktree": ["npm install"],
  "setup-worktree-unix": ["./setup.sh"],
  "setup-worktree-windows": ["setup.bat"]
}

mcp.json — external MCP servers

{
  "mcpServers": {
    "my-server": {
      "command": "node",
      "args": ["server.js"],
      "env": { "KEY": "value" }
    }
  }
}

MEMORY.md — durable project notes

Long-lived facts the agent should remember about the project.


9. Memory & codebase awareness

The agent maintains a per-project index so it can find relevant code:

The index lives outside your project (see §12), so it never clutters your working tree.


10. Models & reasoning


11. Environment variables

Variable Purpose
GETAIBD_API_KEY API key for premium models / higher limits.
GETAIBD_BASE_URL API base URL (default https://getaibd.com/v1/api).
GETAIBD_PIPELINE Set to 0/false to disable the multi-agent pipeline.
GETAIBD_PIPELINE_MODEL Override the cheap model used for triage/plan/explore.
GETAIBD_MIN_FREE_DISK_MB Low-disk threshold (default 1024 MiB).
GETAIBD_MAX_RUN_TOKENS Hard token budget per run (0 = off).
GETAIBD_MAX_LLM_CALLS Hard LLM-call budget per run (0 = off).
GH_TOKEN Used by web_fetch/GitHub tools when SSH isn't available.

12. Data & config locations

Path What's there
~/.getaibd/ Global state and authored config.
~/.getaibd/projects/<slug>/ Per-project memory DB, MEMORY.md, per-project config.
<project>/.getaibd/ Project-authored config (AGENTS.md, rules/, permissions.json, sandbox.json, worktrees.json, mcp.json).
<project>/.getaibd/tmp/ Spilled large tool outputs (auto-cleaned hourly / after 24 h).

The per-project slug is a stable hash of the canonical project root.


13. Troubleshooting

The agent keeps asking to run the same commands. Add them to allow in .getaibd/permissions.json, or choose "always allow" when prompted. Dangerous commands always re-prompt by design.

A private GitHub PR/issue won't fetch. web_fetch prefers a local clone via your SSH credentials, then falls back to the gh CLI / GH_TOKEN. Make sure one of those has access to the repo.

Indexing seems disabled. Free disk space is probably below the threshold — indexing and memory writes pause until you free space (or raise GETAIBD_MIN_FREE_DISK_MB).

A long-running command "hangs" the run. Long-running / dev-server commands are detached to the background; the run continues. Inspect output via the CLI's terminal view / read_terminal.

I want the exact CLI flags. Command-line flags, subcommands, and the interactive UI are defined in the aidoer repository; run getaibd-cli --help for the authoritative list.