AgentKit
ReferenceCLI commands
BetaYou are reading docs for the beta channel (2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →

CLI commands

ak setup

Guided first-run configuration wizard for AgentKit

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.

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.

Usage

ak setup [flags]

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

Flags

FlagDescription
--adapter stringComma-separated list of adapters to configure. Registered choices: claude-code, codex. Defaults to adapters detected on PATH.
--advancedConfigure direct provider API keys, provider/model preferences, and Codex overrides
--config stringPath to a YAML file supplying answers for --no-interactive mode (keys match step IDs: anthropic_api_key, default_provider, etc.)
-h, --helphelp for setup
--jsonEmit machine-readable JSON (implies --no-interactive)
--no-adapter stringComma-separated list of registered adapters to exclude from configuration.
--no-interactiveDisable interactive prompts (CI-safe)
-q, --quietSuppress non-error output on stderr
--step stringUpdate 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, --verboseExtra diagnostic output on stderr (loses to --quiet)
-y, --yesAssume yes for all prompts

Output modes

ModeBehavior
prettydefault on TTY (colors, ASCII markers)
plainauto when stdout piped or --no-interactive
json--json (single-object envelope, NDJSON-safe)

Exit codes

CodeMeaning
0success
1runtime error
2invalid flags
3user-cancel (SIGINT, prompt-cancel)
2missing required field in --no-interactive mode or unknown --step
3user cancelled the TUI wizard
  • ak — AgentKit CLI

On this page