Skip to content

ov run

ov run is the CLI equivalent of vault_run. It fetches secrets for the active app, injects them as env vars, runs a command, and exits. Use it in scripts, CI, deploy pipelines, or anywhere you need secrets without the MCP layer.


Terminal window
ov run [flags] -- <command>

Run database migrations with all secrets for the default app:

Terminal window
ov run -- go run ./cmd/migrate

Run with a specific app:

Terminal window
ov run --app my-saas -- npm test

Inject only specific secrets:

Terminal window
ov run --app my-saas --secrets DATABASE_URL,STRIPE_SECRET_KEY -- go test ./...

Run non-interactively in CI or a systemd service (no password prompt):

Terminal window
ov run --machine-key /etc/ov/machine.kek --app my-saas -- ./server

By default, ov run prompts for your master password on every invocation. For automated deployments — CI pipelines, Docker containers, systemd services — use a machine key file instead:

Terminal window
# One-time setup (as a human, interactive)
ov auth derive-machine-key --out /etc/ov/machine.kek --app my-saas
# Every subsequent run (no prompt)
ov run --machine-key /etc/ov/machine.kek --app my-saas -- ./server

See the Machine Keys guide for full setup instructions, Docker and systemd examples, key rotation, and security properties.


FlagDescription
--app NAMETarget app (overrides config default)
--secrets NAME1,NAME2Explicit list of secrets to inject
--machine-key PATHPath to a machine key file — skips password prompt (see Machine Keys)