CLI commands
ak setup
Guided first-run configuration wizard for AgentKit
ak setup
Guided first-run configuration wizard for AgentKit
Synopsis
What it does:
Subscription-first wizard that detects native Claude Code and Codex login state, then configures enabled adapters, default kit, and telemetry. Direct API keys and provider/model overrides use --advanced. Results are stored atomically in ~/.agentkit/config.yaml; setup does not install kit content. Install a kit separately with ak kit init. Re-running is idempotent: only fields you change are updated.
Who it's for: Both: non-technical users (TUI wizard) and power devs (--no-interactive --config file.yaml).
When to use it: Run once after installing AgentKit; existing Claude Code or Codex subscription login is reused. Re-run any time to update a single field with --step.
Examples: ak setup # interactive TUI wizard ak setup --adapter claude-code,codex --no-interactive # scripted adapter selection ak setup --step enabled_adapters # update enabled adapters only ak setup --step codex_provider # update Codex provider only ak setup --step codex_api_key_env_var # update Codex API-key env var ak setup --advanced # direct API/provider configuration ak setup --no-interactive --config setup.yaml # scripted from file ak setup --json --no-interactive --config setup.yaml # machine-readable output
What changes on disk: Creates or updates ~/.agentkit/config.yaml atomically. Basic setup never copies Claude/Codex credentials. API keys are stored in plain text; protect the file with appropriate permissions (0600, set automatically). Supported --step values: enabled_adapters, anthropic_api_key, openai_api_key, default_provider, default_model, image_provider, default_kit, telemetry, codex_api_key_env_var, codex_default_model, codex_provider.
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) 2 missing required field in --no-interactive mode or unknown --step 3 user cancelled the TUI wizard
ak setup [flags]Options
--adapter string Comma-separated list of adapters to configure. Registered choices: claude-code, codex. Defaults to adapters detected on PATH.
--advanced Configure direct provider API keys, provider/model preferences, and Codex overrides
--config string Path to a YAML file supplying answers for --no-interactive mode (keys match step IDs: anthropic_api_key, default_provider, etc.)
-h, --help help for setup
--json Emit machine-readable JSON (implies --no-interactive)
--no-adapter string Comma-separated list of registered adapters to exclude from configuration.
--no-interactive Disable interactive prompts (CI-safe)
-q, --quiet Suppress non-error output on stderr
--step string Update a single field without re-running all steps (values: enabled_adapters, anthropic_api_key, openai_api_key, default_provider, default_model, image_provider, default_kit, telemetry, codex_api_key_env_var, codex_default_model, codex_provider)
-V, --verbose Extra diagnostic output on stderr (loses to --quiet)
-y, --yes Assume yes for all promptsSEE ALSO
- ak - AgentKit CLI