Shell Autocompletion
The AgentSecrets CLI includes built-in autocompletion support for Bash, Zsh, Fish, and PowerShell. Setting up completions makes command execution faster and reduces spelling errors.
1Zsh
To configure completions for Zsh, run the following commands to generate the completion script and load it automatically on startup:
Create the completions directory if it doesn't exist:
mkdir -p ~/.agentsecrets/completions/zsh
Generate the completion script:
agentsecrets completion zsh > ~/.agentsecrets/completions/zsh/_agentsecrets
Add the completions path and load the function in your ~/.zshrc:
Open your ~/.zshrc file and add the following lines before compinit:
fpath=(~/.agentsecrets/completions/zsh $fpath) autoload -U compinit; compinit
Reload your shell:
source ~/.zshrc
2Bash
To load completions in Bash, ensure the bash-completion package is installed, then configure your shell:
Generate and load completions in the current session:
source <(agentsecrets completion bash)
Load completions automatically on new sessions:
- On Linux:
agentsecrets completion bash > /etc/bash_completion.d/agentsecrets - On macOS (using Homebrew):
agentsecrets completion bash > $(brew --prefix)/etc/bash_completion.d/agentsecrets
3Fish
Completions for Fish are stored in user configuration paths and load automatically:
Generate the completion script:
agentsecrets completion fish > ~/.config/fish/completions/agentsecrets.fish
4PowerShell
To configure completions for PowerShell:
Generate and import the completion script in your profile:
agentsecrets completion powershell | Out-String | Invoke-Expression
Add the above line to your PowerShell profile (check $PROFILE path) to load completions automatically on start.
Command Shortcuts & Dual-Number Aliases
AgentSecrets supports both plural/singular noun forms (secret/secrets, project/projects, workspace/workspaces, log/logs) as well as top-level verb-noun shortcuts:
| Resource | Full Command | Top-Level Shortcut Alias |
|---|---|---|
| Secrets | agentsecrets secrets list | agentsecrets list-secrets |
agentsecrets secrets set KEY=val | agentsecrets set-secrets KEY=val | |
agentsecrets secrets delete KEY | agentsecrets delete-secrets KEY | |
agentsecrets secrets pull | agentsecrets pull-secrets | |
agentsecrets secrets push | agentsecrets push-secrets | |
agentsecrets secrets diff | agentsecrets diff-secrets | |
| Projects | agentsecrets projects list | agentsecrets list-projects |
agentsecrets projects create <name> | agentsecrets create-project <name> | |
agentsecrets projects switch <name> | agentsecrets use-project <name> | |
agentsecrets projects update <name> | agentsecrets update-project <name> | |
agentsecrets projects delete <name> | agentsecrets delete-project <name> | |
agentsecrets projects invite <email> | agentsecrets invite-project <email> | |
| Workspaces | agentsecrets workspaces list | agentsecrets list-workspaces |
agentsecrets workspaces switch <name> | agentsecrets switch-workspace <name> | |
agentsecrets workspaces create <name> | agentsecrets create-workspace <name> | |
agentsecrets workspaces invite <email> | agentsecrets invite-workspace <email> | |
agentsecrets workspaces members | agentsecrets list-members | |
agentsecrets workspaces remove-member | agentsecrets remove-member | |
agentsecrets workspaces promote | agentsecrets promote-member | |
agentsecrets workspaces demote | agentsecrets demote-member | |
agentsecrets workspaces delete | agentsecrets delete-workspace | |
| Allowlists | agentsecrets workspace allowlist add <d> | agentsecrets add-allowlist <d> |
agentsecrets workspace allowlist remove <d> | agentsecrets remove-allowlist <d> | |
agentsecrets workspace allowlist list | agentsecrets list-allowlists | |
agentsecrets workspace allowlist log | agentsecrets get-allowlist-logs | |
| Agents | agentsecrets agents register <name> | agentsecrets register-agent <name> |
agentsecrets agents list | agentsecrets list-agents | |
agentsecrets agents delete <name> | agentsecrets delete-agent <name> | |
agentsecrets agents token issue <name> | agentsecrets issue-token <name> | |
agentsecrets agents token list <name> | agentsecrets list-tokens <name> | |
agentsecrets agents token revoke <id> | agentsecrets revoke-token <id> | |
agentsecrets agents policy get <name> | agentsecrets get-agent-policy <name> | |
agentsecrets agents policy set <name> | agentsecrets set-agent-policy <name> | |
| Logs | agentsecrets logs list | agentsecrets list-logs |
agentsecrets logs show <id> | agentsecrets show-log <id> | |
agentsecrets logs summary | agentsecrets summarize-logs | |
agentsecrets logs watch | agentsecrets watch-logs | |
agentsecrets logs export | agentsecrets export-logs | |
agentsecrets logs verify | agentsecrets verify-logs | |
agentsecrets logs replay <id> | agentsecrets replay-log <id> |