CLI commands
ak projects add
Register a project directory in the global registry
ak projects add
Register a project directory in the global registry
Synopsis
What it does:
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.
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
What changes on disk: Writes ~/.agentkit/projects.json atomically.
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) 0 success (new or updated entry) 1 path does not exist or is not a directory 2 invalid arguments
ak projects add <path> [flags]Options
-h, --help help for add
--json Emit machine-readable JSON (implies --no-interactive)
--no-interactive Disable interactive prompts (CI-safe)
-q, --quiet Suppress non-error output on stderr
-V, --verbose Extra diagnostic output on stderr (loses to --quiet)
-y, --yes Assume yes for all promptsSEE ALSO
- ak projects - Manage the global AK project registry