About

Why share-env exists.

Built out of frustration with watching secrets get pasted into Slack. Again. And again.

The Problem We Kept Seeing

Every developer team has the same ritual: a new person joins the project. Someone pastes the .env file into Slack. Or emails it. Or creates a shared Google Doc. The file — containing database passwords, API keys, and payment credentials — now lives in four insecure places instead of one.

Those Slack messages are searchable forever. Slack admins can read them. Bots can read them. Future employees can search for them. A single workspace breach exposes every secret ever shared in that workspace. The industry knows this is wrong, but no tool made it easy to do the right thing.

What share-env Is

share-env is a zero-configuration CLI tool that solves this specific problem — and nothing else. It encrypts your .env file with AES-256-GCM on your own machine, uploads only the ciphertext to a temporary relay server, and gives you a one-time share code.

The relay server is architecturally blind: it stores only ciphertext. The decryption key lives only in your share code. The payload is deleted after the first pull. If nobody collects it within 10 minutes, it is automatically destroyed. The relay cannot decrypt what it stores, and nothing persists.

Design Philosophy

Security by default
The tool refuses to run if .gitignore does not protect .env. It is not possible to use share-env and simultaneously expose secrets to git. The guardrail is mandatory, not optional.
Zero friction
No accounts. No API keys. No configuration. One command to share, one command to receive. Anyone with Node.js 18+ can use it immediately with npx.
Open source
The entire codebase is public, auditable, and MIT licensed. You can read every line of the encryption logic, host your own relay, and verify that the tool does exactly what it claims.
Do one thing well
share-env does not try to be a secrets manager, a vault, or a deployment tool. It solves the specific problem of developer-to-developer .env sharing, and does it well.

Technical Details

EncryptionAES-256-GCM (Node.js crypto module)
Key size256 bits (32 bytes), randomly generated per push
IV size96 bits (12 bytes), randomly generated per push
Auth tag128 bits (GCM mode)
LanguageTypeScript
RuntimeNode.js 18+
Distributionnpm (share-env package)
LicenseMIT
Relay storageIn-memory (no database)
Relay TTL600 seconds (10 minutes)