Developer secret vault + OIDC token provider — for developers, scripts, and AI agents
Project description
dev-vault
All your secrets in one command. Developer secret vault + OIDC token provider for developers, scripts, and AI agents.
Why dev-vault?
AI agents need secrets (API keys, bearer tokens) but can't safely read .env files, and hardcoding secrets in prompts is a security risk. dev-vault stores secrets in your OS keyring and exposes them via a simple CLI -- the secret never appears in conversation context, only where it's needed.
Quick Start
pip install dev-vault
Store a secret
dv set datadog api_key # prompts for value (masked)
dv set datadog api_key "abc123" # inline (for scripts)
dv set datadog app_key "def456" # multiple fields per item
Retrieve a secret
dv get datadog # primary field -> stdout
dv get datadog api_key # specific field (planned: prefix matching)
dv get default datadog api_key # explicit vault
Use with AI agents
# Agent prompt: "use dv to get the bearer for the endpoint /api/motorcycles"
curl -H "Authorization: Bearer $(dv get prod caetano)" https://api.mottu.com/api/motorcycles
# Agent prompt: "query datadog for error rates"
DD_API_KEY=$(dv get datadog) python check_errors.py
# Or with dv run -- agent just says "run the script"
dv run -- python check_errors.py # secrets injected from .dv.yaml
Run commands with secrets injected
# Explicit mapping
dv run -s DD_API_KEY=datadog/api_key -s DD_APP_KEY=datadog/app_key -- python app.py
# Using .dv.yaml manifest (checked into git, no secrets)
dv run -- python app.py
Project manifest (.dv.yaml)
Place in your project root. Maps environment variables to secret references:
secrets:
DD_API_KEY: datadog/api_key
DD_APP_KEY: datadog/app_key
BEARER_TOKEN: prod/admin@example.com # OIDC -> fresh token
Template injection
echo 'KEY={{dv://default/datadog/api_key}}' | dv inject
# Output: KEY=abc123
OIDC Token Provider
dev-vault can fetch fresh OIDC tokens from Keycloak (with more providers planned):
dv setup # interactive wizard
dv get prod admin@example.com # returns a fresh access_token
dv get prod api-client # client_credentials flow
Migrating from sso-cli
pip install dev-vault
dv migrate sso-cli # imports config + keyring secrets
dv get prod admin@example.com # same token, new tool
Commands
| Command | Description |
|---|---|
dv get [vault] <item> [field] |
Retrieve secret or OIDC token |
dv set [vault] <item> <field> [value] |
Store a secret |
dv run [-s KEY=ref] -- <cmd> |
Run command with secrets as env vars |
dv inject |
Replace {{dv://...}} refs in stdin |
dv item list|create|show|delete |
Manage items |
dv vault list|create|delete |
Manage vaults |
dv setup [--reset] |
Interactive setup wizard |
dv migrate sso-cli |
Import from sso-cli |
dv config show |
Display current config |
All commands support --json for programmatic output and -v for debug logging.
Security
dev-vault is built with a strict security-first approach:
- Secrets never touch disk. All secret values are stored exclusively in the OS keyring (macOS Keychain, Linux Secret Service, Windows Credential Manager). The config YAML only contains metadata (vault names, item names, field names, OIDC provider URLs).
- No secrets in logs or output. Debug/verbose mode (
-v) never logs secret values. Human-friendly output goes to stderr; only raw secret values go to stdout (for$(dv get ...)substitution). - Masked input. Interactive secret entry uses
getpass(no terminal echo). - Subprocess isolation.
dv runinjects secrets as environment variables only into the child process -- they don't leak into the parent shell or shell history. - No network calls for static secrets. Only OIDC items make network requests, and only to the configured SSO endpoint.
- Config file permissions. The config directory (
~/.config/dev-vault/) inherits your user's default umask. No world-readable files. - No telemetry. dev-vault makes zero calls home. No analytics, no crash reporting.
Supply chain
- Minimal dependencies:
httpx,pyyaml,keyring,rich,inquirer,pyperclip-- all well-established, actively maintained packages. - Published to PyPI with standard setuptools build.
- Source available on GitHub for audit.
How It Works
- Config location:
~/.config/dev-vault/config.yaml(XDG-compliant), fallback~/.dv.yaml. Override withDV_CONFIGenv var. - OIDC items fetch fresh tokens on every call (no caching, no stale tokens). Static items return stored keyring values.
- Secret references use
dv://vault/item/fieldURIs or shorthand (item/field,vault/item).
PyPI package: https://pypi.org/project/dev-vault/
See Also
- Agent State -- Persistent memory and tools for AI agents
- sso-cli -- Single Sign-On token CLI (the ancestor of dev-vault)
- terminal-to-here -- VS Code extension to open terminal at any folder
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dev_vault-0.1.2.tar.gz.
File metadata
- Download URL: dev_vault-0.1.2.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c58b1c6013473eb2807141df69000e4d96b2ba39a842599559f2f7eb46489b6
|
|
| MD5 |
7107dfcd86fa33988877a1a472f233d5
|
|
| BLAKE2b-256 |
0470b0df5494b4a02b61381f4bc22577a0512f4850dc01bc6f5460049bc1a712
|
Provenance
The following attestation bundles were made for dev_vault-0.1.2.tar.gz:
Publisher:
bump_and_release.yml on caetanominuzzo/dev-vault
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dev_vault-0.1.2.tar.gz -
Subject digest:
9c58b1c6013473eb2807141df69000e4d96b2ba39a842599559f2f7eb46489b6 - Sigstore transparency entry: 1229471638
- Sigstore integration time:
-
Permalink:
caetanominuzzo/dev-vault@5ea5cfcbdb8f3076f344dd79bf9d8c7d9c37b2b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/caetanominuzzo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
bump_and_release.yml@5ea5cfcbdb8f3076f344dd79bf9d8c7d9c37b2b6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file dev_vault-0.1.2-py3-none-any.whl.
File metadata
- Download URL: dev_vault-0.1.2-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
580bf08e5d9d233c444a1c939d041cbe01aab42d7d66e61e3e92cd3e7cf82695
|
|
| MD5 |
90491a13ce5c9ed56a3e1db5d4f7ee90
|
|
| BLAKE2b-256 |
a42402d94ee93c1486788944ee28199d469f310899b979c2e436b7544d0c27ea
|
Provenance
The following attestation bundles were made for dev_vault-0.1.2-py3-none-any.whl:
Publisher:
bump_and_release.yml on caetanominuzzo/dev-vault
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dev_vault-0.1.2-py3-none-any.whl -
Subject digest:
580bf08e5d9d233c444a1c939d041cbe01aab42d7d66e61e3e92cd3e7cf82695 - Sigstore transparency entry: 1229471657
- Sigstore integration time:
-
Permalink:
caetanominuzzo/dev-vault@5ea5cfcbdb8f3076f344dd79bf9d8c7d9c37b2b6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/caetanominuzzo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
bump_and_release.yml@5ea5cfcbdb8f3076f344dd79bf9d8c7d9c37b2b6 -
Trigger Event:
workflow_dispatch
-
Statement type: