[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:
- Creating
~/.claude/.config.jsonwith{"installMethod":"native"} - Creating a symlink at
~/.local/bin/claudepointing 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:
- Add a new install method
systemfor package managers - 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
- Downstream issue: https://github.com/numtide/llm-agents.nix/issues/1574
- Related: #5540 (Windows install method flipping), #4946 (NixOS issues)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗