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 new

Bootstrap a new AgentKit project

Create a new AgentKit project at ./<project-name>/. Every file the command writes is recorded in <project>/.agentkit/ownership.json so future ak update / ak uninstall can act precisely on AK-owned files. A --template / --kits preinstall fetches from the authenticated remote registry by default, mirroring ak kit init.

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

When to use it: Starting a fresh AK project. Use ak init instead to onboard an existing directory.

What changes on disk: Creates ./<project-name>/ and writes the ownership manifest plus any seed / kit content. Snapshots prior state via ak backups only when the target dir already contains an AgentKit ownership manifest.

Usage

ak new <project-name> [flags]

Examples

ak new myproj                                          # greenfield bootstrap
ak new myproj --template engineer                      # remote is the default; paid kits require `ak login`
ak new myproj --template core --local --kits-dir ./kits  # local development seed, no network
ak new myproj --force                                  # overwrite an AK-owned project
ak new myproj --json                                   # script-friendly envelope

Flags

FlagDescription
--channel stringRemote registry channel (beta requires explicit opt-in) (default "stable")
--forceOverwrite an existing target directory
-h, --helphelp for new
--jsonEmit machine-readable JSON (implies --no-interactive)
--kits stringComma-separated list of kits to preinstall
--kits-dir stringKits source directory (default: ./kits or $AGENTKIT_KITS_DIR)
--localPreinstall --template/--kits from the embedded/local kit source instead of the remote registry (dev/CI). Paid kits still require remote access (the default) or an explicit --kits-dir.
--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)
--remotePreinstall --template/--kits from the authenticated remote registry (default; use --local for the embedded/dev source) (default true)
--template stringBootstrap from a single kit (mutually exclusive with --kits)
-V, --verboseExtra diagnostic output on stderr (loses to --quiet)
--version stringRemote kit version (defaults to 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)
2invalid flags or project name
6target directory already exists without --force
  • ak — AgentKit CLI

On this page