How Project Keys Replace .env Files
Instead of maintaining .env files on disk, localWiki injects project keys directly into your process as environment variables using the lol run command. This avoids the risks of .env files being committed to version control or going stale.
Injecting Variables with lol run
$ lol run -- npm run dev
lol: injecting 5 env vars into processThe lol CLI communicates with the running localWiki desktop app over IPC, retrieves the decrypted keys for the current directory’s mapped workspace and environment, and passes them as environment variables to the child process.
Targeting a Specific Environment
$ lol run --env staging -- cargo runBy default, lol run uses the development environment (or whatever default is set in ~/.localwiki/lol.toml). Use --env to override.
Copying Individual Env Lines
In the desktop app, expand any key in the Secrets Vault and click Copy env line to copy a single KEY=value line to your clipboard. This is useful for one-off use without running a full process.
A dedicated .env file export feature (both in the UI and via a lol env CLI command) is planned but not yet available. For now, use lol run to inject variables directly into your process.
CI/CD Usage
For CI pipelines that need env files at build time, the recommended approach today is to use lol run to wrap your build command:
$ lol run --env production -- docker compose up --buildThe lol CLI requires the localWiki desktop app to be running. For headless CI environments where the desktop app is not available, you will need to manage .env files through another mechanism until headless support is added.