[Feature Request] Support system package managers (Nix, Homebrew, etc.) - add CLAUDE_INSTALL_METHOD env var

Resolved 💬 3 comments Opened Dec 28, 2025 by Mic92 Closed Dec 28, 2025

Environment

  • Claude CLI version: 2.0.76
  • Operating System: macOS / Linux (NixOS)
  • Installation method: Nix package manager

Problem

When claude-code is installed via system package managers like Nix, the doctor command shows a warning:

Warning: Running native installation but config install method is 'unknown'
Fix: Run claude install to update configuration

The runtime correctly detects the binary as "native" (Bun binary), but since the package was installed via Nix rather than claude install, no config file exists with installMethod set.

Current workaround requires:

  1. Creating ~/.claude/.config.json with {"installMethod":"native"}
  2. Creating a symlink at ~/.local/bin/claude pointing to the actual binary

This is not maintainable for system packages where users expect things to "just work".

Proposed Solution

Add an environment variable CLAUDE_INSTALL_METHOD that overrides the config-based detection. Package maintainers can set this in their wrapper scripts:

export CLAUDE_INSTALL_METHOD=native

Or alternatively:

  1. Add a new install method system for package managers
  2. Don't warn when runtime detection succeeds (native binary running) but config is unknown

Use Case

This would benefit:

  • Nix/NixOS users
  • Homebrew users (if/when a formula exists)
  • Linux distro packages (apt, dnf, pacman, etc.)
  • Any system-level package manager

References

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗