0x0 CLI Guide
This guide documents the CLI in this repository, from installation to advanced configuration.Installation
Use one of the supported install methods:Core usage
- Start TUI:
0x0or0x0 [project] - One-shot mode:
0x0 run "your prompt" - Headless server:
0x0 serve - Browser UI:
0x0 web - Attach to running server:
0x0 attach <url>
--help,-h--version,-v--print-logs--log-level DEBUG|INFO|WARN|ERROR
Command reference
Top-level commands:0x0/$0 [project]: start TUI (--model,--continue,--session,--fork,--prompt,--agent+ network options)0x0 run [message..]: non-interactive prompt/command execution0x0 attach <url>: attach TUI to server (--dir,--session,--password)0x0 serve: start headless server (network options)0x0 web: start server and open browser (network options)0x0 acp: start ACP server (--cwd+ network options)0x0 auth: credential management0x0 mcp: MCP server management0x0 agent: generate/list agents0x0 models [provider]: list models (--verbose,--refresh)0x0 session list: list sessions (--max-count,--format table|json)0x0 stats: usage/cost stats (--days,--tools,--models,--project)0x0 export [sessionID]: export session JSON0x0 import <file-or-share-url>: import session JSON/share URL0x0 pr <number>: checkout PR and launch 0x00x0 github: GitHub agent install/run helpers0x0 upgrade [target]: upgrade CLI (--method)0x0 uninstall: remove installation/data (--keep-config,--keep-data,--dry-run,--force)0x0 debug: diagnostics (config,paths,lsp,ripgrep,file,skill,snapshot,agent,wait)
serve, web, TUI, and acp:
--port(default0)--hostname(default127.0.0.1)--mdns(defaultfalse)--mdns-domain(defaultzeroxzero.local)--cors <origin>(repeatable)
Configuration files
0x0 supports YAML, YML, JSON, and JSONC config files. Recognized filenames:0x0.yaml,0x0.ymlzeroxzero.yaml,zeroxzero.yml0x0.json,0x0.jsonczeroxzero.json,zeroxzero.jsonc
Global config
Primary location:Global.Path.config (XDG config path, app folder 0x0).
Typical examples:
- macOS/Linux:
~/.config/0x0/0x0.yaml - Windows: XDG config directory for the current user, under
0x0
Per-project config
Project config is discovered from the current directory upward to the repo/worktree root. For each directory in the chain, 0x0 checks:<dir>/<config-file><dir>/.0x0/<config-file>
./0x0.yaml./.0x0/0x0.yaml
- If multiple project config files exist in the same directory level, 0x0 throws a conflict error.
.zeroxzero extension directories
In addition to YAML/JSON config files, 0x0 loads extension content from .zeroxzero directories:
.zeroxzero/agent/**/*.mdor.zeroxzero/agents/**/*.md.zeroxzero/command/**/*.mdor.zeroxzero/commands/**/*.md.zeroxzero/mode/*.mdor.zeroxzero/modes/*.md.zeroxzero/plugin/*.{ts,js}or.zeroxzero/plugins/*.{ts,js}
Config precedence
Low to high precedence:- Remote
.well-known/zeroxzeroconfig (when authenticated provider supports it) - Global config (
~/.config/0x0/...) ZEROXZERO_CONFIGfile path override- Project config files (
0x0.yaml,.0x0/0x0.yaml, etc.) .zeroxzerodirectories (commands/agents/plugins/config)- Inline
ZEROXZERO_CONFIG_CONTENTJSON - Managed enterprise config directory (highest):
- macOS:
/Library/Application Support/zeroxzero - Linux:
/etc/zeroxzero - Windows:
%ProgramData%\\zeroxzero
- macOS:
Global config YAML example
Per-project config YAML example
Use project config for repo-specific behavior../0x0.yaml:
./.0x0/0x0.yaml can be used for a dedicated per-project settings file managed by the CLI.
Advanced configuration areas
agent: define primary/all agents, model overrides, prompts, permission rules, step limitscommand: define reusable slash commands and templatespermission: global tool permission policy (ask,allow,deny) and path rulesprovider: provider-specific API settings, model overrides, variant options, allow/deny listsmcp: local and remote MCP servers, headers, OAuth, timeouts, enabled flagslsp: language server mapping, commands, extensions, env, initializationformatter: external formatter commands by languageprompt: override system prompt blocks and reminder stringskeybinds: customize TUI key mappingstui: scroll speed, terminal notifications, diff rendering style, tintskills: extra local/remote skill sourcesexperimental: feature toggles like batch tool and MCP timeout tuning
Config interpolation
Config text supports:{env:VAR_NAME}: inject environment variable value{file:./relative/or/absolute/path}: inject file content
- Relative
{file:...}paths resolve from the config fileβs directory. ~is supported in file references.- Commented references are ignored.
Environment variables
Frequently used flags:ZEROXZERO_CONFIG: explicit config file pathZEROXZERO_CONFIG_DIR: explicit extension directory (.zeroxzero-style)ZEROXZERO_CONFIG_CONTENT: inline JSON config overrideZEROXZERO_DISABLE_PROJECT_CONFIG: disable project config loadingZEROXZERO_PERMISSION: inline JSON permission overrideZEROXZERO_SERVER_USERNAME/ZEROXZERO_SERVER_PASSWORD: server basic authZEROXZERO_AUTO_SHARE: auto-share overrideZEROXZERO_DISABLE_AUTOCOMPACT,ZEROXZERO_DISABLE_PRUNE: compaction overridesZEROXZERO_DISABLE_AUTOUPDATE: disable auto-update checks
packages/0x0/src/flag/flag.ts.
Troubleshooting
- Show resolved config:
0x0 debug config - Show paths:
0x0 debug paths - Check models:
0x0 models --refresh - Check MCP status:
0x0 mcp listand0x0 mcp auth list - Run without TUI:
0x0 run "diagnose this repo" --format json