The vault CLI
Fetch, set, rotate, and run with your secrets — never touching disk. Resolve a single value to stdout, inject the whole scope into your dev server, or rotate a key everywhere it's used, all from the terminal.
Install & quickstart
Install once, authenticate with a service token, then read a secret or run your app with every secret injected — no .env file required.
Command reference
Every command, grouped by what it's for. All secret-scoped commands accept --project, --env, and an optional --branch override.
Point the CLI at your vault and authenticate once.
Initialize configuration at ~/.dialed-vault/config.json. Prompts for a service token (hidden input) unless one is passed; won't clobber an existing config's other fields.
--token <token>Service token to store (dvst_<org>.<secret>). Prefer the hidden prompt — a flag leaks into ps and shell history.--api-url <url>Base URL of the vault API (default http://localhost:3000).Authenticate with a service token and optionally store default org / project / environment for reference. Prompts securely (hidden) if --token is omitted.
--token <token>Service token (dvst_<org>.<secret>); if omitted, you'll be prompted.--org <org>Default organization id (optional, for reference).--project <project>Default project slug (optional).--env <env>Default environment slug (optional).--api-url <url>Base URL of the vault API.Read, write, rotate, and run with secrets. Values pipe cleanly and never hit disk unless you export.
Fetch every secret for the scope and inject them as environment variables into the child process, then run your command. Nothing is written to disk. By default vault values do not override existing env vars; the process exits with the child's exit code.
--project <slug>Project to resolve secrets for.--environment <slug>Environment to resolve (development, staging, production).--branch <name>Branch override (optional).--overloadLet vault values win over existing environment variables (off by default).-- <command…>Everything after -- is the command to run with the injected secrets.Resolve and print a single secret to stdout — raw value only, so it pipes cleanly. Never written to disk.
--project <p>Project ID (required).--env <e>Environment: development, staging, production (required).--branch <b>Branch override (optional).Create or update a secret, writing a new version. Pass the value via --value or, recommended, via the hidden stdin prompt to keep it out of shell history.
--project <p>Project ID (required).--env <e>Environment (required).--value <val>Secret value. If omitted, reads from a hidden prompt / stdin.--branch <b>Branch override (optional).Rotate one or more secrets — each gets a fresh version. Prompts (hidden) for every key's new value unless --value is given (only valid for a single key).
--project <p>Project ID (required).--env <e>Environment (required).--value <val>New value — only valid when rotating exactly one key.--branch <b>Branch override (optional).Export resolved secrets as a .env file for local development. Refuses to write unless the target is gitignored, and stamps the file with a generated-by header.
--project <p>Project ID (required).--env <e>Environment (required).--output <path>Output file path (default: .env.local).--stdoutWrite to stdout instead of a file.--forceWrite even if the target isn't gitignored (warns instead of refusing).--branch <b>Branch override (optional).Bulk-load a .env file into the vault. Handles comments, blanks, quoted and multi-line values; warns on malformed lines and duplicate keys (last occurrence wins).
--project <p>Project ID (required).--env <e>Environment (required).--branch <b>Branch override (optional).Audit access and stay ahead of expiring or rotation-due secrets.
View access history for secrets. Shows the actor, action, and resolved key alongside the raw project / environment ids.
--project <p>Filter by project ID (optional).--key <k>Filter by secret key (optional).--limit <n>Number of entries to display (default: 50).List secrets that are expired, expiring soon, or overdue for rotation — metadata only, never values. Cron-friendly: exit 0 = all clear, 1 = attention needed, 2 = the check itself failed.
--within-days <n>Look-ahead window in days, 1–365 (default: 14).--project <p>Filter by project slug (optional).--jsonPrint the raw JSON response (for scripts / cron).Keep plaintext secrets out of git for good.
Install a git pre-commit hook that blocks committing plaintext dotenv files (.env, .env.*) — except .env.example / .sample / .template. Run `vault precommit` on its own to perform the check.
--installInstall the pre-commit hook into the current repository.