CLI Reference
Command-line interface for managing AG Kit installations.
Overview
The ag-kit CLI tool helps you manage AG Kit installations across your projects.
Commands
ag-kit init
Initialize AG Kit in your project by installing the .agents folder.
ag-kit initBehavior
- • Creates
.agents/directory in current folder - • Downloads latest templates from GitHub
- • Skips if
.agents/already exists (use--forceto override)
ag-kit update
Update your existing AG Kit installation to the latest version.
ag-kit updateWarning: This will delete and replace your .agents/ folder. Make sure to backup any custom changes.
ag-kit rollback
Restore a pre-update backup of the managed tree. Defaults to the newest backup; pick one with --backup <id>.
ag-kit rollbackBehavior
- • Lists available backups and restores the selected one
- • Backs up the current tree first (disable with --no-keep-current)
- • Preview which backup would be restored with --dry-run
ag-kit status
Check the current installation status and check npm for a newer release.
ag-kit statusOutput Includes
- • CLI version
- • Installation status (installed/not installed)
- • Install path and last-modified time
- • Item count at the
.agentsroot - • Update notification if a newer version is available
Options
Customize CLI behavior with these options:
| Option | Description |
|---|---|
-f, --force | Overwrite existing .agents folder (on update, skip the confirmation prompt) |
-p, --path <dir> | Install in specific directory instead of current folder |
-b, --branch <name> | Use a specific Git branch (defaults to the repo default branch) |
-q, --quiet | Suppress output (useful for CI/CD pipelines) |
--dry-run | Preview actions without executing (init / update) |
--strategy <merge|replace> | Update strategy: merge preserves local changes; replace restores the upstream tree |
--no-backup | Skip the automatic pre-update backup |
--conflict-report <file> | Write the update/conflict report to a custom path |
Examples
Force reinstall
ag-kit init --forceInstall in specific directory
ag-kit init --path ./my-projectUse development branch
ag-kit init --branch devSilent install for CI/CD
ag-kit init --quiet --forcePreview an update without applying it
ag-kit update --dry-runRestore the pristine upstream tree
ag-kit update --strategy replaceRoll back to the newest backup
ag-kit rollback