Skip to main content

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 init
Behavior
  • Creates .agents/ directory in current folder
  • Downloads latest templates from GitHub
  • Skips if .agents/ already exists (use --force to override)

ag-kit update

Update your existing AG Kit installation to the latest version.

ag-kit update

Warning: 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 rollback
Behavior
  • 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 status
Output Includes
  • CLI version
  • Installation status (installed/not installed)
  • Install path and last-modified time
  • Item count at the .agents root
  • Update notification if a newer version is available

Options

Customize CLI behavior with these options:

OptionDescription
-f, --forceOverwrite 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, --quietSuppress output (useful for CI/CD pipelines)
--dry-runPreview actions without executing (init / update)
--strategy <merge|replace>Update strategy: merge preserves local changes; replace restores the upstream tree
--no-backupSkip the automatic pre-update backup
--conflict-report <file>Write the update/conflict report to a custom path

Examples

Force reinstall

ag-kit init --force

Install in specific directory

ag-kit init --path ./my-project

Use development branch

ag-kit init --branch dev

Silent install for CI/CD

ag-kit init --quiet --force

Preview an update without applying it

ag-kit update --dry-run

Restore the pristine upstream tree

ag-kit update --strategy replace

Roll back to the newest backup

ag-kit rollback