Highlights
- Git-native — secrets live in your repo as encrypted values, access control is git commits
- No server required — no SaaS, no cloud dependency, no infrastructure to manage
- Team-friendly —
knock/admitworkflow for access requests, all through git - Multi-vault — separate secrets for dev, staging, prod in the same repo
- Encrypted at rest — age encryption by default, optional AWS KMS, GCP KMS
- Hardware-backed security — automatic macOS Keychain integration with Secure Enclave & TouchID
- Zero config —
dugout initand start adding secrets - Auto-detect —
dugout .detects your stack and runs with secrets injected - Fast — encrypts in ~100µs, single binary, no runtime dependencies
- Vendor-agnostic — works with any git host, any infrastructure, any language
Comparison
| dugout | sops | dotenvx | Vault | Doppler | Infisical | |
|---|---|---|---|---|---|---|
| Secrets in repo | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| No server | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| No config file | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
| Team access via git | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Auto-detect & run | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
| Single binary | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Encrypt speed | ~100µs | ~1ms | N/A | N/A | N/A | N/A |
| Free & open source | ✅ | ✅ | ✅ | ✅* | ❌ | ✅ |
| Written in | Rust | Go | JS | Go | — | TS |
*Vault BSL license
Installation
Install dugout with our standalone installers:
# On macOS and Linux.
|
# On Windows.
Or, with Homebrew:
Or, from crates.io:
Or, from source:
&&
Quick Start
# One-time identity setup
# Initialize in your project
# Add secrets
# Run your app with secrets (auto-detect)
# Or run any command with secrets injected
Team Workflow
# Alice creates the project
&& &&
# Bob clones and requests access
&&
&& &&
# Alice approves
&&
# Bob pulls and runs
No Slack DMs. No shared password vaults. No .env files in git history. Access requests and approvals are git commits.
Commands
| Command | Description |
|---|---|
dugout setup |
Generate global identity |
dugout init |
Initialize vault in current directory |
dugout set KEY VALUE |
Set a secret |
dugout get KEY |
Get a secret value |
dugout add KEY |
Add a secret interactively |
dugout list |
List all secret keys |
dugout rm KEY |
Remove a secret |
dugout . |
Auto-detect project and run with secrets |
dugout run -- CMD |
Run a command with secrets injected |
dugout knock |
Request vault access |
dugout admit NAME |
Approve an access request |
dugout pending |
List pending requests |
dugout team add/rm/list |
Manage team members |
dugout secrets diff |
Compare vault and .env |
dugout secrets rotate |
Rotate encryption keys |
dugout secrets lock/unlock |
Lock or decrypt secrets |
dugout secrets import/export |
Import or export .env files |
dugout vault list |
List all vaults in repository |
dugout check status |
Vault overview |
dugout check audit |
Audit for leaked secrets |
dugout migrate-keychain |
Migrate keys to macOS Keychain (macOS only) |
dugout reset-keychain |
Remove identities from macOS Keychain (macOS only) |
macOS Keychain Integration
Keychain integration is default on macOS:
If Keychain is unavailable or you're in a headless environment (CI, SSH, Docker), you must explicitly enable filesystem storage:
# Use filesystem storage instead of Keychain
DUGOUT_NO_KEYCHAIN=1
DUGOUT_NO_KEYCHAIN=1
Migrating Existing Keys
If you have existing file-based keys, migrate them to Keychain:
# Migrate all identities (global + project keys)
# Migrate and delete files after successful migration
# Skip confirmation prompts
Verifying Keychain Storage
Check if your identity is stored in Keychain:
# Open Keychain Access app
# Search for "dugout" in the search box
# Look for items with:
# - Service: "com.usemantle.dugout"
# - Account: "global" or your project ID
Or use the command line:
# Check for global identity in Keychain
# Check for project-specific identity
If the key exists in Keychain, you'll see output like:
keychain: "/Users/you/Library/Keychains/login.keychain-db"
class: "genp"
attributes:
"acct"<blob>="global"
"svce"<blob>="com.usemantle.dugout"
...
Multi-Vault
Manage separate secret sets for different environments (dev, staging, prod) in the same repository.
# Create vaults for different environments
# Set secrets in specific vaults
# List all vaults
# Run with specific vault
# Or use environment variable
When only one vault exists, no flag is needed. With multiple vaults, use --vault or DUGOUT_VAULT to select one.
Cipher Backends
| Backend | Flag | Use Case |
|---|---|---|
| age (default) | — | Local development, small teams |
| AWS KMS | --features aws |
AWS infrastructure, compliance requirements |
| GCP KMS | --features gcp |
Google Cloud infrastructure |
# Initialize with hybrid encryption (age + KMS)
# Install with AWS KMS support
See the full KMS Integration Guide for AWS, GCP, IAM setup, and multi-region.
CI/CD
GitHub Actions
- uses: usemantle/setup-dugout@v1
with:
identity: ${{ secrets.DUGOUT_IDENTITY }}
env:
DUGOUT_NO_KEYCHAIN: "1" # Required on macOS runners
- run: dugout run -- npm test
env:
DUGOUT_NO_KEYCHAIN: "1" # Required on macOS runners
See usemantle/setup-dugout for version pinning, KMS-only mode, and more examples.
Other environments
# Any CI — set both DUGOUT_IDENTITY and DUGOUT_NO_KEYCHAIN
# Disable Keychain in CI
# Docker (macOS host)
See the full Deployment Guide for GitLab, Kubernetes, and more.
Benchmarks
Measured with Criterion. See BENCHMARKS.md for methodology.
| Operation | 32B | 4KB | 16KB |
|---|---|---|---|
| Encrypt | 105µs | 113µs | 138µs |
| Decrypt | 135µs | 154µs | 195µs |
| Roundtrip | 258µs | 271µs | 355µs |
Contributing
See CONTRIBUTING.md for setup and guidelines.
License
Licensed under either of:
at your option.