AgentKit
ReferenceCLI commands

CLI commands

ak codex-agent-runtime register

Idempotently register ak-agent-runtime in ~/.codex/config.toml.

ak codex-agent-runtime register

Idempotently register ak-agent-runtime in ~/.codex/config.toml.

Synopsis

What it does: Writes [mcp_servers.ak-agent-runtime] with command=ak args=["codex-agent-runtime", "serve"] to the user's Codex config so Codex auto-discovers AgentKit's MCP runtime on startup. Other [mcp_servers.*] entries are preserved.

Who it's for: Power devs setting up the Codex adapter for AgentKit kits.

When to use it: Run once after ak kit init --target codex to wire the MCP runtime into your Codex config. Safe to re-run: idempotent if the entry is already present.

Examples: ak codex-agent-runtime register # write to ~/.codex/config.toml ak codex-agent-runtime register --codex-home ~/.codex # explicit config dir ak codex-agent-runtime register --json # machine-readable result

What changes on disk: Writes or updates ~/.codex/config.toml (CODEX_HOME or --codex-home overrides the base dir). Idempotent: re-running with the same target leaves the file untouched and exits 0.

Output modes: pretty default on TTY (colors, ASCII markers) plain auto when stdout piped or --no-interactive json --json (single-object envelope, NDJSON-safe)

Exit codes: 0 success 1 runtime error 2 invalid flags 3 user-cancel (SIGINT, prompt-cancel) 5 config file could not be read or written

ak codex-agent-runtime register [flags]

Options

      --codex-home string   Override $CODEX_HOME (defaults to ~/.codex)
  -h, --help                help for register
      --json                Emit machine-readable JSON (implies --no-interactive)
      --no-interactive      Disable interactive prompts (CI-safe)
  -q, --quiet               Suppress non-error output on stderr
  -V, --verbose             Extra diagnostic output on stderr (loses to --quiet)
  -y, --yes                 Assume yes for all prompts

SEE ALSO

On this page