LORRI(1)
π LORRI(1) β like, the lorri manual but make it make sense π
okay bestie, grab a strawberry π and sit down, because this is the General Commands Manual page for lorri and we're gonna go through it together. No cap.
β¨ NAME β¨
lorri β it's a nix-shell replacement for project development. literally that's the whole vibe.
π¦ SYNOPSIS π¦
lorri daemon [--extra-nix-options json]
lorri direnv [--shell-file shell.nix]
lorri info --shell-file shell.nix
lorri init
lorri self-upgrade [local <path> | canon | rolling-release]
lorri shell [--cached] [--shell-file shell.nix]
πΈ DESCRIPTION πΈ
So. lorri is a nix-shell replacement for project development, and the whole thing is built around fast direnv(1) integration so you get robust CLI integration and editor integration. chef's kiss.
Honestly, lorri is about experimenting with and improving your dev experience with Nix. The particular focus? Managing your project's external dependencies, editor integration, and quick feedback. π₯
Here's the tea: lorri gives you a daemon that automatically builds your project environment whenever its nix files change, and the direnv(1) integration instantly loads that project environment β in your shell and in your editor. the way that just works? iconic.
lorri supports Linux and macOS. periodt.
This man page documents the available commands, but there are also setup and installation instructions which you can find on the project page: https://github.com/nix-community/lorri/. iykyk π
π Subcommands π
lorri daemon [--extra-nix-options json]β Start the lorri daemon. It is required for most other commands to function (yes, required, so don't skip her, she's the main character). The daemon keeps track of the projects watched and will rebuild whenever a dependency of your project'sshell.nixfile changes. This includes nix files, source files, as well as non-nix source files β like, for example, json files loaded viaβbuiltins.fromJSON (builtins.readFile β¦)β.
The --extra-nix-options flag takes a json description of nix options to overwrite. Only a subset is supported. See βlorri daemon --helpβ for a description of the supported options. π«Ά
lorri direnv [--shell-file shell.nix]β Print a piece ofdirenv(1)bash code, intended to be sourced in the.envrcof your project. Source it by adding
eval "$(lorri direnv)"
to your project's .envrc. It will then cause direnv to reload your environment whenever lorri finishes a rebuild. obsessed. β¨
.shell.nix is the file built and watched by lorri. Use the --shell-file flag to overwrite the file name:
eval "$(lorri direnv --shell-file foo.nix)"
The path is relative to the location of your .envrc. (yes, relative, don't come for me π)
lorri info --shell-file shell.nixβ Show project information for the given shell file. that's it, that's the command πlorri initβ Bootstrap a lorri project. The following files are created if they do not exist yet:shell.nixβ Minimal nix shell file.envrcβ A direnv config with the lorri direnv call.
lorri self-upgrade [local <path> | canon | rolling-release]β Upgrade lorri to a newer version. This usesnix-env(1)internally, and will install the new lorri to your user profile. It is intended as a quick way to update to latest canon, or to try out a specific branch. ngl, pretty handy πlocalwill use the lorri checkout in<path>.canonwill update to the canon branch of https://github.com/nix-community/lorri/.rolling-releasewill update to the rolling-release branch of that repository.rolling-releaseis not updated any more, please use the official release from nixpkgs. β οΈ
If no argument is given, rolling-release is assumed. (even though, see above, bestie π)
lorri shell [--cached] [--shell-file shell.nix]β Open a project shell. This is essentially a beefed-upnix-shell(1), with the following improvements:
--shell-file opens a shell for the given shell.nix instead of the one in the current directory.
π RELATED WORK π
- direnv's
βuse nixββ Built-in support for watching a nix file with direnv. It will block on the evaluation of theshell.nix. If a dependency of theshell.nixchanges, direnv will not pick it up, so you have to manually add them to the watch list withwatch_file. Seedirenv-stdlib(1). lowkey annoying but okay. shadowenv(1)β In spirit an alternative todirenv(1), it defines a domain specific S-expression format,shadowlisp(5), to specify environment changes. In the future, we might want to provide a way to generate this format. π
β SEE ALSO β
direnv(1), direnv-stdlib(1), nix-instantiate(1), nix-shell(1), nix-store(1), shadowenv(1), shadowlisp(5)
(go read them, bestie, they're all right there π«Ά)
π KNOWN ISSUES π
- Source files referenced by Import from Derivation (IfD) are not picked up. So, for example, if you use the
callCabal2nixfunction to convert your project'sβ.cabalβfile to a nix expression on the fly, and you change theβ.cabalβfile, lorri will not notice. π There is some discussion in https://github.com/target/lorri/issues/309 on how to solve this issue.
okay that's the whole page, you ate that ππ
ngl this one's from the Debian crew, dated July 20, 2020, and yeah β it's the LORRI(1) page, exactly like you'd find it in the manual. mwah, bye bestie! ππ
π¦ where this page comes from
- nixpkgs unstable: lorri 1.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms