Stop sharing .env files over Slack.
Stop keeping cleartext credentials on your disk.
Rapg (Rapid/pg) is a secure, TUI-based secret manager designed specifically for developers who live in the terminal. It allows you to store credentials securely and inject them directly into your development processes without ever writing .env files to disk.
Required: Go 1.25+
go install github.com/kanywst/rapg/cmd/rapg@latestRun rapg for the first time to initialize your secure vault.
rapgYou will be prompted to Create a Master Password.
Note: Choose a strong password (min 12 chars). This password is used to derive your encryption key and is never stored. If you lose it, your data is lost forever.
Once unlocked, you are in the TUI mode.
- Navigation: Use
j/korUp/Downarrows. - Add Secret: Press
n.- Service/Username: Identifiers for your secret.
- Password: Leave empty to auto-generate a secure random password.
- TOTP Secret: (Optional) Enter your 2FA seed key to generate codes.
- Env Key: (Important) The environment variable name (e.g.,
DATABASE_PASSWORD) used for injection.
- View Details: Press
EnterorSpaceto decrypt and view a secret. - Copy Password: Press
Enteron the detail view. - Copy TOTP: Press
Ctrl+tto generate and copy the 2FA code. - Delete: Press
dto delete the selected entry. - Quit: Press
q.
This is the core feature. Instead of creating a .env file, wrap your command with rapg run.
Rapg will decrypt secrets that have an Env Key set and inject them into the child process environment.
# Inject secrets into your Node.js app
rapg run -- npm start
# Inject into Python script
rapg run -- python main.py
# Or any other command
rapg run -- printenv DATABASE_PASSWORDWe included a simple Python script in examples/main.py to test the injection.
- Add a secret in Rapg with Env Key
DATABASE_PASSWORD. - Run the script:
rapg run -- python examples/main.pySecurity: The secrets exist only in the memory of the process. They are never written to disk.
Check if you are reusing passwords across different services.
rapg auditMigrate from other tools or generate a .env file if absolutely necessary (e.g., for Docker).
# Import from CSV
rapg import passwords.csv
# Export to stdout (can redirect to .env)
rapg export > .env.local- Zero-Knowledge: Master password is never stored.
- Encryption: AES-256-GCM.
- Key Derivation: Argon2id (RFC 9106).
- Memory Safety: Uses
memguardto protect keys in memory.
MIT License - see LICENSE for details.
