Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Nix CLI

$ nix Foundation Low Risk
NixOS Foundation · Code & DevOps · LGPL-2.1 · macos / linux

Purely functional package manager and reproducible environment builder. Modern nix commands expose --json across eval, search, and flake show, plus --dry-run build planning, though daemon setup and flakes flags add onboarding friction.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
https://nixos.org/download/
CLI vs MCP Decision CLI Only

Evaluates local flake.nix derivations and builds /nix/store paths directly on the host.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

First-class --json on eval, search, flake show, and path-info, plus --dry-run and nix develop --command.

  • nix eval --json and nix flake show --json emit exact JSON
  • nix build --dry-run previews build/fetch plans
Trust & Safety 22 / 25

Immutable /nix/store hashing and pure evaluation prevent mutating host libraries, with --dry-run before builds.

  • Content-addressed /nix/store isolation
Setup & Portability 11 / 15

Requires multi-user daemon installation on Linux/macOS (Windows only via WSL2) and enabling nix-command flakes.

  • No native Windows support outside WSL2
  • Daemon installer and experimental-features config needed
Utility & Efficiency 13 / 15

Bit-for-bit reproducible devShells eliminate 'works on my machine' dependency drift for agents.

  • Pinned flake.lock guarantees exact tool versions
Maintenance & Lineage 9 / 10

Backed by the NixOS Foundation under LGPL-2.1.

  • Official NixOS/nix repository
Docs & Verifiability 8 / 10

Comprehensive manual at nix.dev, though legacy nix-* vs modern nix subcommands can confuse newcomers.

  • Official reference at nix.dev/manual/nix/stable/

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Public store operations need no auth; optional GitHub access tokens or binary cache netrc files are configured in ~/.config/nix/nix.conf.

Side Effects
Read-Only Local Write
Cost & Quotas

LGPL-2.1 open-source software; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Nix CLI (nix) Agent Rules
- Use `nix develop --command <cmd>` instead of bare `nix develop` so the shell does not enter an interactive subshell.
- Run `nix flake show --json` and `nix build --dry-run` before triggering large derivations.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect flake outputs as JSON
nix flake show --json

Enumerates packages, devShells, and checks exposed by flake.nix in JSON.

Preview a build without downloading or compiling
nix build --dry-run

Lists store paths that would be fetched or built without modifying /nix/store.

Controlled Writes & Previews

Run a command inside the flake devShell
nix develop --command pytest

Enters the pinned flake.nix development environment non-interactively to run pytest.

Strengths for Agents

  • + nix eval --json and nix flake show --json provide exact, structured metadata.
  • + nix develop --command <cmd> executes tools inside reproducible pinned environments.
  • + --dry-run previews every download or local derivation build.

Caveats & Pitfalls

  • ! Heavy installer/daemon footprint and requires enabling experimental-features = nix-command flakes on default installs.
  • ! Not natively supported on Windows without WSL2.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI