The simplest way to sync .env files across all your machines.
lsh is an encrypted secrets manager that syncs your environment files across development machines with AES-256 encryption via the IPFS network. Push once, pull anywhere.
- Registry Fallback - Pull now automatically checks the Storacha registry when local metadata is missing
- Improved Error Messages - Clear, actionable error messages with environment context
- One-Command Setup -
lsh inithandles everything with interactive prompts - Zero-Config IPFS Sync - Storacha network enabled by default after email authentication
- Smart Environment Detection - Automatic repository-based namespacing
# Install
npm install -g lsh-framework
# Interactive setup (recommended)
lsh init
# Or quick start
cd ~/your-project
lsh syncThat's it! Your secrets are now encrypted and synced.
| Feature | LSH | dotenv-vault | 1Password | Doppler |
|---|---|---|---|---|
| Free | Yes | Limited | No | No |
| Self-Hosted | Yes | No | No | No |
| Auto Rotation | Built-in | No | No | No |
| IPFS Storage | Yes | No | No | No |
| Setup Time | 2 min | 5 min | 10 min | 10 min |
# Setup
lsh init # Interactive setup wizard
lsh key # Generate encryption key
# Daily use
lsh push # Upload encrypted .env to cloud
lsh pull # Download .env from cloud
lsh sync # Smart sync (auto push/pull)
lsh list # List local secrets
lsh env # List cloud environments
# Get/Set individual secrets
lsh get API_KEY # Get a secret value
lsh set API_KEY xxx # Set a secret value
printenv | lsh set # Batch import from stdin
# Multi-environment
lsh push --env prod
lsh pull --env stagingYour Machine Storacha (IPFS Network)
┌─────────────┐ ┌─────────────────────┐
│ .env │ AES-256 │ Encrypted Blob │
│ (secrets) │ ───encrypt───► │ (content-addressed)│
└─────────────┘ └─────────────────────┘
│
▼
Another Machine ┌─────────────────────┐
┌─────────────┐ AES-256 │ Registry │
│ .env │ ◄──decrypt──── │ (points to blob) │
│ (secrets) │ └─────────────────────┘
└─────────────┘
- Your
.envis encrypted locally with AES-256 - Encrypted data uploads to IPFS via Storacha
- A registry tracks the latest version per repository
- Other machines pull via the content ID (CID)
- Decryption happens locally with your shared key
- Node.js 20.18.0+
- npm 10.0.0+
npm install -g lsh-framework
lsh --version# Interactive setup (handles everything)
lsh init
# Or manual setup:
lsh key # Generate encryption key
echo "LSH_SECRETS_KEY=..." >> .env
lsh push # Push to cloudThe killer feature. Sync secrets across all your machines:
# Machine 1: Push secrets
cd ~/repos/my-project
lsh push
# Machine 2: Pull secrets (same encryption key)
cd ~/repos/my-project
lsh pull
# That's it - your .env is synced!# 1. Install LSH
npm install -g lsh-framework
# 2. Authenticate with Storacha (one-time)
lsh storacha login your@email.com
# 3. Add your encryption key
echo "LSH_SECRETS_KEY=your-shared-key" > .env
# 4. Pull secrets
lsh pull# Development
lsh push --env dev
# Staging
lsh push --file .env.staging --env staging
# Production
lsh push --file .env.prod --env prod
# Pull any environment
lsh pull --env prodSetup (Team Lead):
lsh key # Generate team key
lsh push --env prod # Push team secrets
# Share LSH_SECRETS_KEY via 1Password/LastPassTeam Members:
# Get key from 1Password
echo "LSH_SECRETS_KEY=shared-key" > .env
lsh pull --env prod
# Done!Use the built-in daemon for automated rotation:
# Start daemon
lsh daemon start
# Schedule monthly key rotation
lsh cron add \
--name "rotate-keys" \
--schedule "0 0 1 * *" \
--command "./scripts/rotate.sh && lsh push"
# List scheduled jobs
lsh cron listExport secrets in multiple formats:
lsh list --format json # JSON
lsh list --format yaml # YAML
lsh list --format toml # TOML
lsh list --format export # Shell export statements
# Load into current shell
eval "$(lsh list --format export)"- AES-256-CBC encryption for all secrets
- Content-addressed storage - tamper-proof IPFS CIDs
- Zero-knowledge - Storacha never sees your unencrypted data
- Local-first - Works offline with cached secrets
DO:
- Store
LSH_SECRETS_KEYin shell profile (~/.zshrc) - Share keys via password manager (1Password, etc.)
- Use different keys per project/team
- Rotate keys periodically
DON'T:
- Commit
LSH_SECRETS_KEYto git - Share keys in plain text (Slack, email)
- Store production secrets in dev environment
# Check what environments exist
lsh env
# Push if missing
lsh push --env devWrong encryption key. Make sure LSH_SECRETS_KEY matches.
# Check current key
cat .env | grep LSH_SECRETS_KEY
# If lost, generate new key and re-push
lsh key
lsh push --forcelsh storacha login your@email.com
# Check email for verificationv3.0.0 fix: Pull now automatically checks the Storacha registry when local metadata is missing.
# If secrets were pushed before, pull should auto-recover
lsh pull
# If truly no secrets exist, push first
lsh push- Secrets Guide - Complete secrets management guide
- Smart Sync Guide - One-command sync guide
- Quick Reference - Daily use cheatsheet
- Installation - Detailed installation
- Developer Guide - Contributing to LSH
LSH includes a full automation platform:
- Persistent Daemon - Background job execution
- Cron Scheduling - Time-based job scheduling
- REST API - HTTP API for integration
- CI/CD Webhooks - GitHub/GitLab webhook support
- POSIX Shell - Interactive shell with ZSH features
# Start daemon
lsh daemon start
# API server
LSH_API_KEY=xxx lsh api start --port 3030
# Interactive shell
lsh -i# Required
LSH_SECRETS_KEY=<your-encryption-key>
# Optional - Storacha (default enabled)
LSH_STORACHA_ENABLED=true
# Optional - Supabase backend
SUPABASE_URL=https://xxx.supabase.co
SUPABASE_ANON_KEY=<key>
# Optional - API server
LSH_API_ENABLED=true
LSH_API_PORT=3030
LSH_API_KEY=<key>~/.config/lsh/lshrc # LSH configuration
~/.lsh/secrets-cache/ # Encrypted secrets cache
~/.lsh/secrets-metadata.json # Metadata index
git clone https://github.com/gwicho38/lsh.git
cd lsh
npm install
npm run build
npm test
npm linkSee CLAUDE.md for development guidelines.
MIT
- Issues: https://github.com/gwicho38/lsh/issues
- Discussions: https://github.com/gwicho38/lsh/discussions
Stop copying .env files. Start syncing.
npm install -g lsh-framework
lsh init