Vault is a lightweight, secure, and open-source zero-knowledge secret vault and ephemeral sharing tool designed for software developers and engineering teams.
- Zero-Knowledge Local Storage: Store secrets in local, encrypted vault files (
.vault.enc) using industry-standard authenticated encryption (AES-256-GCM) and memory-hard key derivation (Argon2id). - Developer-Friendly CLI: Effortlessly manage secrets with an intuitive CLI (
vault init,vault set,vault get,vault list,vault delete,vault share,vault open). - Seamless
.envIntegration:vault env push: Safely ingest.envfiles into the encrypted vault.vault env pull: Decrypt vault secrets into a local.envfile.vault run -- <command>: Inject secrets directly into a child process's memory without leaving unencrypted files on disk.
- Ephemeral Secret Sharing: Share sensitive credentials peer-to-peer using time-to-live (TTL) encrypted envelopes (
vault share,vault open). - Memory Hygiene: Defensive memory clearing (
CryptographicOperations.ZeroMemory) for sensitive keys and buffers.
- .NET 10.0 SDK or later
- C# 10+ compatible development environment
Clone the repository:
git clone https://github.com/laborges94/vault.git
cd vaultdotnet builddotnet test# Initialize a new encrypted container (default: .vault.enc)
vault init
# Specify a custom vault path
vault init ./secrets/app.vault.enc# Store or update a secret
vault set DB_PASSWORD "s3cur3P@ssw0rd!"
# Store secret in a specific environment namespace
vault set API_KEY "prod-secret-token" --env production --description "Production API Key" --tags "api,auth"
# Retrieve secret (standard formatted)
vault get DB_PASSWORD
# Retrieve raw secret value (useful for piping / scripting)
vault get DB_PASSWORD --raw
# List secrets in default environment
vault list
# List secrets across all environments
vault list --all-envs
# Delete a secret
vault delete DB_PASSWORD --force# Import key-value pairs from .env into vault
vault env push .env
# Export vault secrets to a .env file
vault env pull .env --forceInject decrypted secrets directly into child process memory without creating unencrypted files on disk:
vault run --env production -- dotnet runEncrypt sensitive credentials into self-contained, TTL-bounded envelopes for secure sharing via chat or email:
# Create an ephemeral share (default TTL: 15m)
vault share DB_PASSWORD --ttl 1h
# Or share a raw value directly
vault share --value "one-time-token" --ttl 30m
# Recipient consumes the envelope using the provided key
vault open <envelope> --key <decryption-key>
# Or with combined token fragment
vault open <envelope>#<decryption-key> --rawPassphrases can be supplied non-interactively via environment variable, stdin, or file:
# Via environment variable
export VAULT_PASSPHRASE="your-master-passphrase"
vault get DB_PASSWORD --raw
# Via standard input
echo "your-master-passphrase" | vault get DB_PASSWORD --passphrase-stdin
# Via passphrase file
vault get DB_PASSWORD --passphrase-file /path/to/keyfile├── .agents/ # AI Agents & Skills
├── .github/
│ ├── workflows/ # GitHub Actions CI/CD pipelines
│ └── copilot-instructions.md # Coding styles and prompt configurations
├── src/ # Source code directory
│ ├── Vault.Core/ # Core domain, cryptography, and storage abstractions
│ └── Vault.Cli/ # Command-line interface
├── tests/ # Unit & Integration tests
│ ├── Vault.Core.Tests/
│ └── Vault.Cli.Tests/
├── docs/ # Wiki & Documentation
├── specs/ # Spec-Driven Development (SDD)
│ ├── constitution.md # Invariants & Security Principles
│ ├── features/ # Feature specifications
│ │ └── 001-secret-vault-core/
│ │ └── spec.md # Core Vault & Developer Sharing specification
│ ├── templates/ # Spec and plan templates
│ └── prompts/ # AI-assisted SDD workflow prompts
├── .editorconfig # Formatting and style rules
├── .gitattributes # Line endings configuration
├── .gitignore # Git ignore patterns
├── AGENTS.md # Instructions for AI coding assistants
├── LICENSE # Open source license (MIT)
└── README.md # Project documentation
This repository follows a strict Spec-Driven Development workflow:
- specs/constitution.md: Foundational project invariants, engineering rules, and cryptographic security standards.
- specs/features/001-secret-vault-core/spec.md: Approved foundational specification for the core vault and sharing system.
- specs/templates/: Functional and technical specification templates.
- specs/prompts/: Structured prompts guiding AI assistants through review, planning, and task execution.
See specs/README.md for the complete lifecycle guide.
Contributions, issues, and feature requests are welcome! Feel free to check the Contributing Guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.