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 projects add

Register a project directory in the global registry

Add <path> to ~/.agentkit/projects.json. If the directory is already registered, its entry is refreshed (UpdatedAt). This command is called automatically by ak new and ak init.

Who it's for: Power devs who need to manually register an existing AK project.

When to use it: Onboarding a project that was cloned or moved from another machine.

What changes on disk: Writes ~/.agentkit/projects.json atomically.

Usage

ak projects add <path> [flags]

Examples

ak projects add ./myproj          # register relative path
ak projects add $HOME/projects/myproj  # register absolute path
ak projects add . --json          # register cwd, machine-readable output

Flags

FlagDescription
-h, --helphelp for add
--jsonEmit machine-readable JSON (implies --no-interactive)
--no-interactiveDisable interactive prompts (CI-safe)
-q, --quietSuppress non-error output on stderr
-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)
0success (new or updated entry)
1path does not exist or is not a directory
2invalid arguments
  • ak projects — Manage the global AK project registry

On this page