Person/Sadjow Leão/GitHub/claude-code-nix
Properties
- created-by
- Person/Sadjow Leão
sadjow/claude-code-nix
- Repository: sadjow/claude-code-nix
- Created by: Person/Sadjow Leão
- Created: 2025-06-20
- GitHub status on 2026-03-12: 251 stars, 17 forks, 0 open issues
- Always up-to-date Nix package for Claude Code with hourly updates, native binary default, and Node.js/Bun alternatives.
- It packages Claude/Code for Nix users who want faster updates than upstream
nixpkgs, plus explicit version pinning and rollback. Why It Exists
- Targets the gap between Anthropic's official installer and the slower update cadence of upstream
nixpkgs - Keeps new Claude/Code releases available within about an hour of upstream release
- Gives Nix users a declarative install that does not disappear when switching Node.js versions with tools like
asdfornvm
- Targets the gap between Anthropic's official installer and the slower update cadence of upstream
Packaging Model
- Default package is a native self-contained binary with no runtime dependency
- Alternative packages are available for Node.js 22 LTS and Bun
- The flake can be used directly with
nix run, installed withnix profile install, or consumed through an overlay in NixOS or Home Manager - Cachix is supported for faster installs, but local builds are also supported for users who prefer stronger verification
Runtime Options
Versioning and Updates
- GitHub Actions checks for new Claude/Code versions every hour
- The repository supports both moving refs and immutable refs
- Exact version tags such as
v2.1.71and commit SHAs are the real reproducible pins - Major tags like
v2, thelatesttag, and the default branch intentionally move forward over time
Trust Model
- The package fetches npm tarballs and native binaries with fixed hashes
flake.lockpins inputs for a given repo revision- The packaged binaries disable Claude's built-in auto-updater so updates flow through Nix instead
- Trust still extends to the maintainer account, the auto-update GitHub Actions workflow, Anthropic's upstream artifacts, and optionally the project's Cachix cache
Useful Commands
Comparison Notes
- Compared with
npm install -g @anthropic-ai/claude-code, this flake is more declarative and survives Node.js version switching - Compared with upstream
nixpkgs, this repo optimizes for freshness, runtime choice, and a dedicated maintenance path - Compared with Anthropic's official installer, this flake adds Nix-native pinning, rollback, and configuration ergonomics
- Compared with
Links
- README: README.md
- Issues: GitHub Issues
- Actions: GitHub Actions