Skip to content

LpassEnv

Dennis Lee edited this page May 27, 2026 · 1 revision

title: lpass-env radar_quadrant: Tools radar_ring: Hold radar_position: center source_url: https://github.com/luketurner/lpass-env

lpass-env

lpass-env is a single Bash script that bridges LastPass to shell environment variables. Environment variable declarations are stored in the notes field of LastPass credential entries; lpass-env retrieves them via the lastpass-cli and injects them into the shell at runtime, keeping secrets out of plaintext files.

Radar Assessment

Teams using LastPass as their password manager have no first-class integration with developer secrets tooling — Infisical, Varlock, and dotenvx all lack native LastPass connectors. lpass-env fills this gap with a minimal wrapper: store KEY=value lines in a LastPass note, then call lpass-env shell <entry> to spawn a subshell with those variables injected, or lpass-env export <entry> to generate export statements for the current shell.

The tool supports three modes: shell (subshell with injected vars), print (write declarations to a file), and export (emit export KEY=val lines). The export mode has a known quoting bug with values containing spaces, requiring eval as a workaround — a security consideration. Each invocation incurs a LastPass CLI round-trip, adding noticeable overhead compared to file-based approaches. The project is lightly maintained.

Moved to Hold. lpass-env filled a real gap when no LastPass-native secrets tooling existed for local development. That gap is now closed: lpassrc provides full CRUD lifecycle management of LastPass Secure Notes, a working auto-load block, and confirmed production use. lpass-env is read-only, carries a known eval quoting bug with space-containing values, and is lightly maintained. Starting new work with lpass-env when lpassrc is available is the wrong choice. Existing integrations should migrate to lpassrc.

Clone this wiki locally