CLI
Anthracode CLI options and commands.
The Anthracode CLI by default starts the TUI when run without any arguments.
anthracodeBut it also accepts commands as documented on this page. This allows you to interact with Anthracode programmatically.
anthracode run "Explain how closures work in JavaScript"Start the Anthracode terminal user interface.
anthracode [project]| Flag | Short | Description |
|---|---|---|
--continue | -c | Continue the last session |
--session | -s | Session ID to continue |
--fork | Fork the session when continuing (use with --continue or --session) | |
--prompt | Prompt to use | |
--model | -m | Model to use in the form of provider/model |
--agent | Agent to use | |
--port | Port to listen on | |
--hostname | Hostname to listen on | |
--mdns | Enable mDNS discovery | |
--mdns-domain | Custom mDNS domain name | |
--cors | Additional browser origin(s) to allow CORS |
The Anthracode CLI also has the following commands.
Manage agents for Anthracode.
anthracode agent [command]Attach a terminal to an already running Anthracode backend server started via serve.
anthracode attach [url]This allows using the TUI with a remote Anthracode backend. For example:
# Start the backend serveranthracode serve --port 4096 --hostname 0.0.0.0
# In another terminal, attach the TUI to the running backendanthracode attach http://10.20.30.40:4096| Flag | Short | Description |
|---|---|---|
--dir | Working directory to start TUI in | |
--continue | -c | Continue the last session |
--session | -s | Session ID to continue |
--fork | Fork the session when continuing (use with --continue or --session) | |
--password | -p | Basic auth password (defaults to ANTHRACODE_SERVER_PASSWORD) |
--username | -u | Basic auth username (defaults to ANTHRACODE_SERVER_USERNAME or anthracode) |
Create a new agent with custom configuration.
anthracode agent createThis command will guide you through creating a new agent with a custom system prompt and permission configuration. Anything you don’t allow is denied in the generated agent’s frontmatter.
| Flag | Short | Description |
|---|---|---|
--path | Directory to write the agent file to (defaults to global or .anthracode/agent based on the prompt) | |
--description | What the agent should do | |
--mode | Agent mode: all, primary, or subagent | |
--permissions | Comma-separated list of permissions to allow (default: all). Available: bash, read, edit, glob, grep, webfetch, task, todowrite, websearch, lsp, skill. Anything omitted is denied. Alias: --tools | |
--model | -m | Model to use, in provider/model format |
Passing all of --path, --description, --mode, and --permissions runs the command non-interactively.
List all available agents.
anthracode agent listCommand to manage credentials and login for providers.
anthracode auth [command]Anthracode is powered by the provider list at Models.dev, so you can use anthracode auth login to configure API keys for any provider you’d like to use. This is stored in ~/.local/share/anthracode/auth.json.
anthracode auth loginWhen Anthracode starts up it loads the providers from the credentials file. And if there are any keys defined in your environments or a .env file in your project.
| Flag | Short | Description |
|---|---|---|
--provider | -p | Provider ID or name to log in to |
--method | -m | Login method label to use, skipping method selection |
Lists all the authenticated providers as stored in the credentials file.
anthracode auth listOr the short version.
anthracode auth lsLogs you out of a provider by clearing it from the credentials file.
anthracode auth logoutManage the GitHub agent for repository automation.
anthracode github [command]Install the GitHub agent in your repository.
anthracode github installThis sets up the necessary GitHub Actions workflow and guides you through the configuration process. Learn more.
Run the GitHub agent. This is typically used in GitHub Actions.
anthracode github run| Flag | Description |
|---|---|
--event | GitHub mock event to run the agent for |
--token | GitHub personal access token |
Manage Model Context Protocol servers.
anthracode mcp [command]Add an MCP server to your configuration.
anthracode mcp addThis command will guide you through adding either a local or remote MCP server.
List all configured MCP servers and their connection status.
anthracode mcp listOr use the short version.
anthracode mcp lsAuthenticate with an OAuth-enabled MCP server.
anthracode mcp auth [name]If you don’t provide a server name, you’ll be prompted to select from available OAuth-capable servers.
You can also list OAuth-capable servers and their authentication status.
anthracode mcp auth listOr use the short version.
anthracode mcp auth lsRemove OAuth credentials for an MCP server.
anthracode mcp logout [name]Debug OAuth connection issues for an MCP server.
anthracode mcp debug <name>List all available models from configured providers.
anthracode models [provider]This command displays all models available across your configured providers in the format provider/model.
This is useful for figuring out the exact model name to use in your config.
You can optionally pass a provider ID to filter models by that provider.
anthracode models anthropic| Flag | Description |
|---|---|
--refresh | Refresh the models cache from models.dev |
--verbose | Use more verbose model output (includes metadata like costs) |
Use the --refresh flag to update the cached model list. This is useful when new models have been added to a provider and you want to see them in Anthracode.
anthracode models --refreshRun anthracode in non-interactive mode by passing a prompt directly.
anthracode run [message..]This is useful for scripting, automation, or when you want a quick answer without launching the full TUI. For example.
anthracode run Explain the use of context in GoYou can also attach to a running anthracode serve instance to avoid MCP server cold boot times on every run:
# Start a headless server in one terminalanthracode serve
# In another terminal, run commands that attach to itanthracode run --attach http://localhost:4096 "Explain async/await in JavaScript"| Flag | Short | Description |
|---|---|---|
--command | The command to run, use message for args | |
--continue | -c | Continue the last session |
--session | -s | Session ID to continue |
--fork | Fork the session when continuing (use with --continue or --session) | |
--model | -m | Model to use in the form of provider/model |
--agent | Agent to use | |
--file | -f | File(s) to attach to message |
--format | Format: default (formatted) or json (raw JSON events) | |
--title | Title for the session (uses truncated prompt if no value provided) | |
--attach | Attach to a running anthracode server (e.g., http://localhost:4096) | |
--password | -p | Basic auth password (defaults to ANTHRACODE_SERVER_PASSWORD) |
--username | -u | Basic auth username (defaults to ANTHRACODE_SERVER_USERNAME or anthracode) |
--dir | Directory to run in, or path on the remote server when attaching | |
--port | Port for the local server (defaults to random port) | |
--variant | Model variant (provider-specific reasoning effort) | |
--thinking | Show thinking blocks | |
--dangerously-skip-permissions | Auto-approve permissions that are not explicitly denied (dangerous!) |
Start a headless Anthracode server for API access. Check out the server docs for the full HTTP interface.
anthracode serveThis starts an HTTP server that provides API access to anthracode functionality without the TUI interface. Set ANTHRACODE_SERVER_PASSWORD to enable HTTP basic auth (username defaults to anthracode).
| Flag | Description |
|---|---|
--port | Port to listen on |
--hostname | Hostname to listen on |
--mdns | Enable mDNS discovery |
--mdns-domain | Custom mDNS domain name |
--cors | Additional browser origin(s) to allow CORS |
Manage Anthracode sessions.
anthracode session [command]List all Anthracode sessions.
anthracode session list| Flag | Short | Description |
|---|---|---|
--max-count | -n | Limit to N most recent sessions |
--format | Output format: table or json (table) |
Delete an Anthracode session.
anthracode session delete <sessionID>Show token usage and cost statistics for your Anthracode sessions.
anthracode stats| Flag | Description |
|---|---|
--days | Show stats for the last N days (all time) |
--tools | Number of tools to show (all) |
--models | Show model usage breakdown (hidden by default). Pass a number to show top N |
--project | Filter by project (all projects, empty string: current project) |
Export session data as JSON.
anthracode export [sessionID]If you don’t provide a session ID, you’ll be prompted to select from available sessions.
| Flag | Description |
|---|---|
--sanitize | Redact sensitive transcript/file data |
Import session data from a JSON file.
anthracode import <file>You can import from a local file.
anthracode import session.jsonStart an ACP (Agent Client Protocol) server.
anthracode acpThis command starts an ACP server that communicates via stdin/stdout using nd-JSON.
| Flag | Description |
|---|---|
--cwd | Working directory |
--port | Port to listen on |
--hostname | Hostname to listen on |
--mdns | Enable mDNS discovery |
--mdns-domain | Custom mDNS domain name |
--cors | Additional browser origin(s) to allow CORS |
Install a plugin and update your config.
anthracode plugin <module>Or use the alias.
anthracode plug <module>| Flag | Short | Description |
|---|---|---|
--global | -g | Install in global config |
--force | -f | Replace existing plugin version |
Fetch and checkout a GitHub PR branch, then run Anthracode.
anthracode pr <number>Database tools.
anthracode db [query]| Flag | Description |
|---|---|
--format | Output format: json or tsv |
Print the database path.
anthracode db pathDebugging and troubleshooting tools.
anthracode debug [command]Uninstall Anthracode and remove all related files.
anthracode uninstall| Flag | Short | Description |
|---|---|---|
--keep-config | -c | Keep configuration files |
--keep-data | -d | Keep session data and snapshots |
--dry-run | Show what would be removed without removing | |
--force | -f | Skip confirmation prompts |
Updates anthracode to the latest version or a specific version.
anthracode upgrade [target]To upgrade to the latest version.
anthracode upgradeTo upgrade to a specific version.
anthracode upgrade v0.1.48| Flag | Short | Description |
|---|---|---|
--method | -m | The installation method that was used; curl, npm, pnpm, bun, brew |
The anthracode CLI takes the following global flags.
| Flag | Short | Description |
|---|---|---|
--help | -h | Display help |
--version | -v | Print version number |
--print-logs | Print logs to stderr | |
--log-level | Log level (DEBUG, INFO, WARN, ERROR) | |
--pure | Run without external plugins |
Anthracode can be configured using environment variables.
| Variable | Type | Description |
|---|---|---|
ANTHRACODE_GIT_BASH_PATH | string | Path to Git Bash executable on Windows |
ANTHRACODE_CONFIG | string | Path to config file |
ANTHRACODE_TUI_CONFIG | string | Path to TUI config file |
ANTHRACODE_CONFIG_DIR | string | Path to config directory |
ANTHRACODE_CONFIG_CONTENT | string | Inline json config content |
ANTHRACODE_DISABLE_AUTOUPDATE | boolean | Disable automatic update checks |
ANTHRACODE_DISABLE_PRUNE | boolean | Disable pruning of old data |
ANTHRACODE_DISABLE_TERMINAL_TITLE | boolean | Disable automatic terminal title updates |
ANTHRACODE_PERMISSION | string | Inlined json permissions config |
ANTHRACODE_DISABLE_DEFAULT_PLUGINS | boolean | Disable default plugins |
ANTHRACODE_DISABLE_LSP_DOWNLOAD | boolean | Disable automatic LSP server downloads |
ANTHRACODE_ENABLE_EXPERIMENTAL_MODELS | boolean | Enable experimental models |
ANTHRACODE_DISABLE_AUTOCOMPACT | boolean | Disable automatic context compaction |
ANTHRACODE_DISABLE_CLAUDE_CODE | boolean | Disable reading from .claude (prompt + skills) |
ANTHRACODE_DISABLE_CLAUDE_CODE_PROMPT | boolean | Disable reading ~/.claude/CLAUDE.md |
ANTHRACODE_DISABLE_CLAUDE_CODE_SKILLS | boolean | Disable loading .claude/skills |
ANTHRACODE_DISABLE_MODELS_FETCH | boolean | Disable fetching models from remote sources |
ANTHRACODE_DISABLE_MOUSE | boolean | Disable mouse capture in the TUI |
ANTHRACODE_FAKE_VCS | string | Fake VCS provider for testing purposes |
ANTHRACODE_CLIENT | string | Client identifier (defaults to cli) |
ANTHRACODE_ENABLE_EXA | boolean | Enable Exa web search tools |
ANTHRACODE_SERVER_PASSWORD | string | Enable basic auth for serve |
ANTHRACODE_SERVER_USERNAME | string | Override basic auth username (default anthracode) |
ANTHRACODE_MODELS_URL | string | Custom URL for fetching models configuration |
These environment variables enable experimental features that may change or be removed.
| Variable | Type | Description |
|---|---|---|
ANTHRACODE_EXPERIMENTAL | boolean | Enable all experimental features |
ANTHRACODE_EXPERIMENTAL_ICON_DISCOVERY | boolean | Enable icon discovery |
ANTHRACODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT | boolean | Disable copy on select in TUI |
ANTHRACODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS | number | Default timeout for bash commands in ms |
ANTHRACODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX | number | Max output tokens for LLM responses |
ANTHRACODE_EXPERIMENTAL_FILEWATCHER | boolean | Enable file watcher for entire dir |
ANTHRACODE_EXPERIMENTAL_OXFMT | boolean | Enable oxfmt formatter |
ANTHRACODE_EXPERIMENTAL_LSP_TOOL | boolean | Enable experimental LSP tool |
ANTHRACODE_EXPERIMENTAL_DISABLE_FILEWATCHER | boolean | Disable file watcher |
ANTHRACODE_EXPERIMENTAL_EXA | boolean | Enable experimental Exa features |
ANTHRACODE_EXPERIMENTAL_LSP_TY | boolean | Enable TY LSP for python files |
ANTHRACODE_EXPERIMENTAL_MARKDOWN | boolean | Enable experimental markdown features |
ANTHRACODE_EXPERIMENTAL_PLAN_MODE | boolean | Enable plan mode |