Skip to content

CLI Reference

Reference guide for the AgentStash Command Line Interface (CLI).

AgentStash comes with a built-in CLI (ags) that can be installed directly from the AgentStash Desktop App. The CLI lets you perform syncs, manage your configuration, and interact with the AgentStash Hub — all from your terminal.

Open the AgentStash Desktop App → Settings → click Install CLI. This copies the ags binary to ~/.agents/bin/ and adds it to your shell’s PATH automatically.

CommandDescription
ags push [RESOURCE_ID...]Push local changes to the sync directory. Use --force to clear state and push all.
ags pull [RESOURCE_ID...]Pull changes from the sync directory to local. Use --force to clear state and pull all.
ags statusShow sync status and preview pending changes. Use --direction push|pull.
ags resourcesList all discovered resources. Use --provider <ID> to filter.
ags diff <RESOURCE_ID>Show diff for a specific resource.
ags discard <RESOURCE_ID>Discard local changes for a resource. Requires --action.
CommandDescription
ags config showShow current configuration.
ags config set-sync-dir <PATH>Set the sync directory path.
ags config get-sync-dirGet the current sync directory path.
ags config list-providersList all providers.
CommandDescription
ags backup create [PROVIDER_ID...]Create a new backup. Backs up all providers if none specified.
ags backup listList all backups.
ags backup restore <BACKUP_ID>Restore from a backup.
ags backup delete <BACKUP_ID>Delete a backup.

The hub subcommand manages skill repositories — clone, install, distribute skills to your AI tools with built-in conflict detection.

CommandDescription
ags hub add <NAME> <SOURCE> <PATH>Register a new Hub repository. SOURCE is the Git URL, PATH is the relative path to .agents resources.
ags hub install <NAME>Clone a registered repository to local.
ags hub update [--all | <NAME>]Pull latest changes for installed repositories.
ags hub remove <NAME>Unregister a repository, delete its clone, and uninstall all its skills from providers.
ags hub distributeDistribute skills from all installed repos into your provider configs (.cursor, .claude, etc.). Skips conflicts automatically.
ags hub statusList all registered repos and their installed/served skill status.
OptionDescription
--format text|jsonOutput format (default: text).
-v, --verboseEnable verbose output.
--test-env <DIR>Use specified directory as HOME (for sandbox testing).