Credentials vault CLI reference
The safeguard vault and safeguard secrets commands, their options, and the /vault panel in the interactive terminal.
Credentials vault CLI reference
Sign in first with safeguard login. No command on this page prints a secret. Update the CLI with safeguard self-update.
Commands that name an entry take its handle or its numeric id. --scope shared (the default) or --scope personal chooses the store, and --json prints output a script can read.
safeguard vault
| Command | What it does |
|---|---|
safeguard vault list [--scope shared|personal] [--json] | List entries: name, handle, kind and provider. --json prints every field except the secret. |
safeguard vault show <handle|id> [--scope ...] [--json] | Show one entry, without its secret. |
safeguard vault add --name <name> [options] | Add an entry. Asks for the secret at a hidden prompt, or reads it from stdin with --secret-stdin or when stdin is piped. |
safeguard vault edit <handle|id> [options] | Change an entry's name, username, notes, address or type. --secret-stdin replaces its secret. |
safeguard vault delete <handle|id> [--yes] | Delete an entry. Asks first unless --yes. |
safeguard vault history <handle|id> [--limit 50] [--json] | Show the entry's history: creates, changes, reveals, scan reads, imports and deletes. |
safeguard vault test <handle|id> [--json] | Read a shared entry on this machine the way a scan would, and print OK or the reason. Never the value. |
safeguard vault import --from <source> <file.csv> | Import saved logins into your Personal store. See Import from a browser or password manager. |
Options for add
| Option | Meaning |
|---|---|
--name | Entry name. Required. |
--ref | Handle scans use as sgvault://<handle>. Only shared entries can be used by handle. |
--username | Login username, not secret. |
--category | LOGIN, API_KEY, DATABASE, SERVER or OTHER. |
--notes | Notes. |
--secret-stdin | Read the secret from stdin. |
--scope | shared (default) or personal. |
Options for edit
--name, --username, --notes, --url, --category, --secret-stdin and --scope, with the same meanings as above. Only the options you give are changed.
Options for import
| Option | Meaning |
|---|---|
--from | chrome, edge, brave, arc, opera, firefox, safari, 1password, bitwarden, lastpass or csv. |
--dry-run | Show what would be imported and stop. Nothing is sent. |
--on-duplicate | skip (default) or update. |
--yes | Import without asking. |
--json | One JSON result object. Needs --yes or --dry-run. |
safeguard secrets test
safeguard secrets test sgvault://<handle> [--json]Reads one vault reference on this machine and prints OK and a length class (short, medium or long), or the code and reason. Exits 0 on success and 1 otherwise, so it works as a health check before a scheduled scan.
Credential flags on scans
--git-token, --git-username, --git-password, --registry-username and --registry-password accept sgvault://<handle> in place of the value. See Using vault credentials in scans.
The /vault panel
In the interactive terminal, /vault opens a panel listing your workspace's shared entries. Press Enter for details and t to test an entry on this machine. /vault list and /vault import run those actions directly.
Rolling out
Commands for approval requests, the workspace audit log, external PAM providers and safeguard vault exec are part of the PAM capabilities rolling out. safeguard vault --help already lists some commands that your workspace cannot use (policy, requests, versions, rotate, audit, providers register). The vault refuses them and nothing is changed.
Troubleshooting
What the Credentials Vault's messages and error codes mean, and how to fix the common problems with the vault page, scans that use a handle, the CLI and imports.
PAM capabilities rolling out
The privileged access management capabilities being added to the Credentials Vault in the coming weeks, what each one does, and how they change the vault. Not available yet, so this page has no set-up steps.