claude-code-nix  by sadjow

Nix package for an AI coding assistant, always up-to-date

Created 9 months ago
301 stars

Top 88.7% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides an always up-to-date Nix package for the Claude Code AI assistant, targeting Nix users who require immediate access to the latest versions. It solves the problem of delayed updates in upstream nixpkgs and the unreliability of global npm installations across different Node.js environments, offering a declarative and reproducible solution.

How It Works

The project leverages Nix flakes for declarative packaging and employs GitHub Actions to automatically check for and build new Claude Code releases hourly. It offers pre-built binaries via Cachix for rapid installation and supports three runtime options: a self-contained native binary, Node.js 22 LTS, or Bun, providing flexibility and avoiding external runtime dependencies for the default option. This automated, flake-first approach ensures immediate availability and seamless integration into Nix-managed systems.

Quick Start & Requirements

  • Primary install / run command:
    • Run directly: nix run github:sadjow/claude-code-nix
    • Install to profile: nix profile install github:sadjow/claude-code-nix
  • Non-default prerequisites and dependencies: Nix package manager.
  • Links: Repository: https://github.com/sadjow/claude-code-nix

Highlighted Details

  • Hourly Automated Updates: GitHub Actions ensure new Claude Code versions are available within an hour of release.
  • Runtime Flexibility: Supports native binary (default, ~180MB, no dependencies), Node.js 22 LTS, and Bun runtimes.
  • Cachix Binary Cache: Pre-built binaries available for fast installation, reducing build times.
  • Declarative & Reproducible: Integrates with NixOS and Home Manager for configuration management.
  • Version Pinning: Supports exact version tags (e.g., v2.1.71) or moving refs (latest, v2) for controlled updates.

Maintenance & Community

The project's maintenance is heavily automated via GitHub Actions for hourly updates. Specific community channels or detailed contributor information beyond the repository owner are not detailed in the README.

Licensing & Compatibility

  • License type: The Nix packaging is MIT licensed.
  • Compatibility notes: Claude Code itself is proprietary software by Anthropic. The Nix packaging is compatible with NixOS and Home Manager. Commercial use of Claude Code is subject to Anthropic's terms.

Limitations & Caveats

On macOS, Claude Code may prompt for permissions after each Nix update due to changing binary paths; a stable symlink workaround is provided. A "Claude symlink points to invalid binary" warning during /status checks is a known false positive and can be safely ignored. The trust model relies on the maintainer account and GitHub Actions workflow for automated updates, though building locally or using exact pins mitigates this.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
31
Issues (30d)
3
Star History
66 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.