nix-shell.2
provides ad-hoc development environments
TLDR
Quick package shell
$ nix-shell -p [package]
Shell with multiple packages$ nix-shell -p [git] [curl] [jq]
Execute and exit$ nix-shell -p [ripgrep] --run "rg pattern"
From expression$ nix-shell -E "with import <nixpkgs> {}; mkShell { buildInputs = [hello]; }"
SYNOPSIS
nix-shell [options]
DESCRIPTION
nix-shell provides ad-hoc development environments. This is alternate documentation.The tool is essential for quick environment setup. No permanent changes.
PARAMETERS
-p PKG
Add package to shell.--run CMD
Run command and exit.-E EXPR
Evaluate expression.--help
Display help information.
CAVEATS
Downloads packages. Network required. Uses Nix store.
HISTORY
nix-shell is a foundational Nix tool for reproducible development environments.
SEE ALSO
nix-shell(1), nix-develop(1), nix(1)
