Like age, but the keys come from GitHub.
Encrypt files to any GitHub user. No key exchange, no setup, no accounts to create. If they have SSH keys on GitHub, you can encrypt a file for them.
demo.mp4
- You run
nvlp encrypt secret.env --to alice -o secret.env.age - nvlp fetches Alice's SSH public keys from GitHub
- Your file is encrypted using age with those keys
- You get
secret.env.ageand send it however you want (Slack, email, etc.)
Alice runs nvlp decrypt secret.env.age -o secret.env and the file is decrypted with her local SSH private key.
That's it. No PGP, no key servers, no pre-shared secrets.
cargo install --path clicargo install nvlpnvlp encrypt secret.env --to alice -o secret.env.ageEncrypt for multiple recipients:
nvlp encrypt secret.env --to alice --to bob -o secret.env.ageEncrypt from stdin:
echo "the password is hunter2" | nvlp encrypt --to alice -o message.ageOutput defaults to stdout, so you can pipe or redirect:
nvlp encrypt secret.env --to alice > secret.env.ageTo encrypt multiple files, bundle them first:
tar czf bundle.tar.gz file1.txt file2.txt
nvlp encrypt bundle.tar.gz --to alice -o bundle.tar.gz.agenvlp decrypt secret.env.age -o secret.envDecrypt from stdin:
cat secret.env.age | nvlp decrypt -o secret.envOutput defaults to stdout, so you can pipe to other tools:
nvlp decrypt secret.json.age | jq '.api_key'Specify a different SSH key:
nvlp decrypt secret.env.age --identity ~/.ssh/id_rsa -o secret.envIf you want nvlp to handle delivery too, use send. It encrypts the file and uploads it
as a private Gist.
nvlp send secret.env --to aliceSend to multiple recipients:
nvlp send secret.env --to alice --to bobAdd a custom description and comment:
nvlp send secret.env --to alice \
--description "Q4 financials" \
--comment "Hey Alice, here are the numbers you asked for"The open command fetches the gist, decrypts it, and restores the original filename:
nvlp open https://gist.github.com/bob/abc123def456
# -> secret.env (original filename preserved)Print to stdout instead of saving:
nvlp open https://gist.github.com/bob/abc123def456 --stdoutSpecify a different SSH key or output file:
nvlp open https://gist.github.com/bob/abc123def456 \
--identity ~/.ssh/id_rsa \
--output secret.envnvlp keys aliceThe encrypt, decrypt, and keys commands need no authentication at all.
The send and open commands interact with the GitHub API. nvlp needs a GitHub token,
which it checks for in this order:
- The
--tokenflag - The
GITHUB_TOKENenvironment variable - The output of
gh auth token(if you have the GitHub CLI installed)
Your token needs the gist scope. You can create one at
github.com/settings/tokens.
nvlp uses the age encryption format under the hood, specifically its SSH key support. When you encrypt a file:
- All of the recipient's SSH public keys are fetched from
github.com/<user>.keys - When encrypting to multiple recipients, all of their keys are combined
- The file is encrypted to every key, so any recipient can decrypt with any of their keys
- The ciphertext is ASCII-armored for safe transport
When decrypting:
- Your local SSH private key (defaults to
~/.ssh/id_ed25519) is used - Both Ed25519 and RSA keys are supported
The sender never sees or handles private keys. GitHub acts as a public key directory.
| Key type | Encrypt | Decrypt |
|---|---|---|
| Ed25519 | Yes | Yes |
| RSA | Yes | Yes |
nvlp/
core/ # Library: encryption, GitHub API
cli/ # Binary: the 'nvlp' command
Contributions are welcome! Some areas that could use help:
- Platform-specific packaging (Homebrew, AUR, Nix)
- Better error messages and progress output
- Support for alternative transports beyond GitHub Gists