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 refreshFlags
| Flag | Description |
|---|---|
--channel string | Remote registry channel for --remote (beta requires explicit opt-in) (default "stable") |
--dry-run | Force preview (exit 0); update already previews by default unless --yes is given |
--force | Overwrite user-modified files (snapshot is always taken first) |
-h, --help | help for update |
--json | Emit machine-readable JSON (implies --no-interactive) |
--kits string | Comma-separated list of kits to update |
--kits-dir string | Kits source directory (default: embedded kits, $AGENTKIT_KITS_DIR, or ./kits) |
--local | Read --kits from the embedded/local kit source instead of the remote registry (dev/CI) |
--no-interactive | Disable interactive prompts (CI-safe) |
-q, --quiet | Suppress non-error output on stderr |
--registry-url string | AgentKit registry base URL (default: $AGENTKIT_REGISTRY_URL, then dev/staging https://staging.agentkit.best or release https://agentkit.best) |
--remote ak update | Download --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 string | Remote kit runtime for --remote (claude-code or codex) (default "claude-code") |
--show-diff | Show unified diff for each file that will be overwritten |
-V, --verbose | Extra diagnostic output on stderr (loses to --quiet) |
--version string | Remote kit version for --remote (default: channel latest) |
-y, --yes | Assume yes for all prompts |
Output modes
| Mode | Behavior |
|---|---|
pretty | default on TTY (colors, ASCII markers) |
plain | auto when stdout piped or --no-interactive |
json | --json (single-object envelope, NDJSON-safe) |
Exit codes
| Code | Meaning |
|---|---|
0 | success |
1 | runtime error |
2 | invalid flags |
3 | user-cancel (SIGINT, prompt-cancel) |
1 | runtime error (missing manifest, snapshot failure, etc.) |
2 | invalid flags |
3 | preview only — neither --yes nor an interactive confirmation was given |
Related commands
ak— AgentKit CLI