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 update

Preview or apply AgentKit-owned project refreshes

Update the AK-owned files in a project. For each tracked file, ak update checks whether the user has modified it since install. Clean files are overwritten with the latest content; user-modified files are skipped (unless --force). A pre-update project snapshot is always taken before any disk mutation and points to manual recovery files when the project is outside ak backups restore scope.

Default behaviour is preview (dry-run). ak update infers project kits from tracked kits/<kit>/... files when it can; pass --kits for the explicit expert path. Pass --yes or confirm the interactive prompt to apply.

Who it's for: Both: power devs (--yes --json --no-interactive) and non-tech users (interactive prompt).

When to use it: After an AgentKit release to refresh AK-owned project files. Bare ak update refreshes inferred project-owned kits/<kit>/... content; refresh installed plugins with ak kit refresh engineer --remote --yes for paid kits or ak kit refresh core --yes for public kits.

What changes on disk: Previews by default; applies only with --yes or an interactive accept. When applied, overwrites AK-owned files with the latest content and re-tracks them in the ownership manifest, taking a pre-update project snapshot before any mutation. User-modified files are skipped without --force. Bare ak update infers project kits from the manifest; --kits is the explicit override. The command writes project-owned kits/<kit>/... content. With --yes it checks and updates or re-executes the ak binary first when needed, then refreshes project kit content. Use ak self-update --yes for a binary-only operation. It does not refresh installed ~/.claude/plugins/<kit>/ plugin output; use ak kit refresh engineer --remote --yes for a paid install.

Usage

ak update [project-dir] [flags]

Examples

ak update                                                   # preview inferred project refreshes
ak update --yes                                             # apply inferred project refreshes
ak update ./myproj                                          # preview a specific project
ak update --show-diff                                       # preview unified diff for each change
ak update --kits engineer                                   # expert: preview one project kit
ak update --kits engineer --force --yes                     # expert: overwrite user-modified files too
ak update --kits engineer --yes --json --no-interactive     # scripted project refresh envelope
ak update --kits core --yes                                 # --kits defaults to the remote registry; offline reuses the verified local cache only, no embedded fallback
ak update --kits engineer --local --kits-dir kits/ --yes    # dev/CI: force the local kit source for --kits
ak kit refresh engineer --remote --yes                      # separate paid plugin refresh

Flags

FlagDescription
--channel stringRemote registry channel for --remote (beta requires explicit opt-in) (default "stable")
--dry-runForce preview (exit 0); update already previews by default unless --yes is given
--forceOverwrite user-modified files (snapshot is always taken first)
-h, --helphelp for update
--jsonEmit machine-readable JSON (implies --no-interactive)
--kits stringComma-separated list of kits to update
--kits-dir stringKits source directory (default: embedded kits, $AGENTKIT_KITS_DIR, or ./kits)
--localRead --kits from the embedded/local kit source instead of the remote registry (dev/CI)
--no-interactiveDisable interactive prompts (CI-safe)
-q, --quietSuppress non-error output on stderr
--registry-url stringAgentKit registry base URL (default: $AGENTKIT_REGISTRY_URL, then dev/staging https://staging.agentkit.best or release https://agentkit.best)
--remote ak updateDownload --kits from the authenticated AgentKit registry (default; use --local for the embedded/dev source). Bare ak update with no --kits stays local regardless. (default true)
--runtime stringRemote kit runtime for --remote (claude-code or codex) (default "claude-code")
--show-diffShow unified diff for each file that will be overwritten
-V, --verboseExtra diagnostic output on stderr (loses to --quiet)
--version stringRemote kit version for --remote (default: channel latest)
-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)
1runtime error (missing manifest, snapshot failure, etc.)
2invalid flags
3preview only — neither --yes nor an interactive confirmation was given
  • ak — AgentKit CLI

On this page