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.
| Command | Description |
|---|
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 status | Show sync status and preview pending changes. Use --direction push|pull. |
ags resources | List 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. |
| Command | Description |
|---|
ags config show | Show current configuration. |
ags config set-sync-dir <PATH> | Set the sync directory path. |
ags config get-sync-dir | Get the current sync directory path. |
ags config list-providers | List all providers. |
| Command | Description |
|---|
ags backup create [PROVIDER_ID...] | Create a new backup. Backs up all providers if none specified. |
ags backup list | List 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.
| Command | Description |
|---|
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 distribute | Distribute skills from all installed repos into your provider configs (.cursor, .claude, etc.). Skips conflicts automatically. |
ags hub status | List all registered repos and their installed/served skill status. |
| Option | Description |
|---|
--format text|json | Output format (default: text). |
-v, --verbose | Enable verbose output. |
--test-env <DIR> | Use specified directory as HOME (for sandbox testing). |