Skip to main content

lazyenv

A beautiful, lazygit-inspired TUI for managing .env files.

PyPI version Python 3.10+ CI License: MIT Downloads

┌──────────────────────────────────────────────────────────────────────┐
│ lazyenv                                              12:34:56        │
├─────────────────────┬────────────────────────────────────────────────┤
│ 📁 ENV FILES        │  KEY                 = VALUE                   │
│ ✓ .env              │                                                │
│ ⚠ .env.local        │  # Database                                    │
│ · .env.example      │  DATABASE_URL        = postgres://localhost/db  │
│ ✓ services/api/.env │  DB_PASSWORD         = ••••••••••••            │
│                     │                                                │
│                     │  # API Keys                                    │
│                     │  STRIPE_SECRET_KEY   = ••••••••••••            │
│                     │  OPENAI_API_KEY      = ••••••••••••            │
│                     │                                                │
│                     │  # App config                                  │
│                     │  APP_ENV             = development             │
│                     │  APP_PORT            = 3000                    │
│                     │  DEBUG               = false                   │
├─────────────────────┴────────────────────────────────────────────────┤
│ lazyenv  .env  │  4 files  │  MASK ON  │                            │
│  q Quit  d Diff  m Mask  c Copy  e Edit  / Filter  ? Help           │
└──────────────────────────────────────────────────────────────────────┘

Stop guessing which keys are missing. lazyenv gives you a real-time, searchable, side-by-side view of all your .env files — with instant diff against .env.example and secrets masked by default.

Why lazyenv?

Every developer has been there:

  • 😤 Cloned a repo, spent 20 minutes figuring out which env vars to set
  • 😤 Deployed to staging and got a cryptic error because one key was missing
  • 😤 Shared your .env with a teammate and accidentally included a secret
  • 😤 Lost track of which keys are in .env vs .env.local vs .env.production

lazyenv fixes all of this.

Features

  • Beautiful TUI — keyboard-driven interface inspired by lazygit
  • Auto-discovery — finds all .env* files recursively in your project
  • Secrets masking — sensitive keys (API_KEY, SECRET, PASSWORD, etc.) are masked by default
  • Side-by-side diff — instantly compare any two .env files
  • Validation — highlights missing/extra/changed keys vs .env.example
  • Live search — filter keys in real-time with /
  • Copy to clipboard — c copies the selected value
  • Open in editor — e opens the file in your $EDITOR
  • CLI mode — non-interactive --diff and --validate commands for CI pipelines
  • Cross-platform — Windows, macOS, Linux

Installation

# pip
pip install lazyenv

# uv (recommended)
uv tool install lazyenv

# pipx
pipx install lazyenv

One-liner (no install)

uvx lazyenv

Pre-built binaries

Download from the latest release — no Python required.

Usage

# Open TUI in current directory
lazyenv

# Open TUI in a specific project
lazyenv /path/to/my/project

# Short alias
le

# List all .env files (no TUI)
lazyenv --list

# Diff two files (CI-friendly, exits 1 if different)
lazyenv --diff .env .env.example

# Validate .env against .env.example
lazyenv --validate .env .env.example

Keyboard Reference

Key Action
↑/↓ Navigate
Tab Switch panel (file list ↔ content)
d Toggle diff view
m Toggle secret masking
/ or f Filter keys
c Copy selected value to clipboard
e Open in $EDITOR
r Reload all files
? Help
q Quit

Diff View

Press d to enter diff mode. lazyenv automatically selects .env.example (or .env.sample) as the reference.

┌──────────────────┬─────────────────────────┬─────────────────────────┐
│ KEY              │ REFERENCE (.env.example)│ CURRENT (.env)          │
├──────────────────┼─────────────────────────┼─────────────────────────┤
│   DATABASE_URL   │ postgres://localhost/db  │ postgres://localhost/db  │
│ ✗ STRIPE_KEY     │ (empty)                 │ (absent)                │
│ ~ APP_PORT       │ 3000                    │ 8080                    │
│ + INTERNAL_FLAG  │ (absent)                │ true                    │
└──────────────────┴─────────────────────────┴─────────────────────────┘
  ✗ 1 missing  ~ 1 changed  + 1 extra  ✓ 8 matching

CLI Mode (CI Integration)

# In your CI pipeline — exits with code 1 if .env is missing keys
lazyenv --validate .env .env.example

# In a Makefile
check-env:
    lazyenv --validate .env .env.example

Contributing

lazyenv is actively looking for contributors! Great first issues:

  • Add support for additional secret key patterns
  • Shell completion (bash, zsh, fish)
  • Theme support (light mode)
  • Integration with Doppler / Infisical
  • .env schema definition files (type validation)
  • Export to Docker --env-file format

See CONTRIBUTING.md for setup instructions.

Roadmap

See ROADMAP.md.

License

MIT — see LICENSE.


Made with ♥ by the lazyenv community · Report a bug · Discussions

Metadata

Release files for lazyenv-tui 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lazyenv-tui 0.1.0
File Size Uploaded
lazyenv_tui-0.1.0.tar.gz 39.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lazyenv-tui 0.1.0
File Interpreter ABI Platform
lazyenv_tui-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 61.2 kB

Release files / lazyenv_tui-0.1.0.tar.gz

Download URL lazyenv_tui-0.1.0.tar.gz
Size 39.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9b4481a5dc493e975fc18bd413cb1145ee4536e2124feccdcfcffc2b25fb2431
BLAKE2b-256 checksum
How to use checksums
8403aeb766d81f775317a6072d84b53ffbd6c25e790af91ba8596fc129c5e427
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / lazyenv_tui-0.1.0-py3-none-any.whl

Download URL lazyenv_tui-0.1.0-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58650011edeb1c50a578c05db14138aae5f8f9fabe9eeb659b3f376b5bcf2a57
BLAKE2b-256 checksum
How to use checksums
e2a745336122954e52dc5409f20924be380ced85fbe4c794350744f84439690a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page