[FEATURE] Declarative plugin management for Nix/NixOS users
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Nix/NixOS users manage their system configuration declaratively, but Claude Code's plugin system requires interactive installation via /plugin commands. This creates friction for users who want:
- Reproducible environments: Plugin configuration should be version-controlled alongside other dotfiles
- Atomic updates: Plugins should update with
nix flake update, not manual intervention - Multi-machine sync: Same plugin configuration across all machines without manual setup
Currently, workarounds involve:
- Manually configuring
extraKnownMarketplacesandenabledPluginsinsettings.json - Hoping Claude Code respects these settings (behavior is inconsistent)
- No way to pin plugin versions or ensure reproducibility
Related issues:
- #11676 -
claude plugin update-all(addresses updates but not declarative config) - #4946 - NixOS agents/commands bug (partially resolved)
- #12880 - ralph-wiggum hardcoded
/bin/bashshebang
Proposed Solution
Support declarative plugin configuration via settings.json:
{
"extraKnownMarketplaces": {
"anthropics/claude-code": {
"source": { "source": "git", "url": "https://github.com/anthropics/claude-code.git" }
}
},
"enabledPlugins": {
"commit-commands@anthropics/claude-code": true,
"code-review@anthropics/claude-code": true,
"feature-dev@anthropics/claude-code": true
}
}
Expected behavior:
- Claude Code reads
enabledPluginsfromsettings.jsonon startup - Plugins are fetched/cached automatically if not present
- No interactive
/plugincommand required for initial setup - Plugin versions can be pinned via flake inputs (for Nix users)
Bonus: CLI support for non-interactive installation:
claude plugin install commit-commands@anthropics/claude-code --no-interactive
claude plugin sync # Install all plugins from settings.json
Alternative Solutions
- Current workaround: Manually symlink plugin directories from Nix store to
~/.claude/plugins/
- Fragile, breaks on Claude Code updates
- Requires understanding internal plugin structure
- Third-party tools: Community scripts to manage plugins
- Not officially supported
- May break with Claude Code updates
Priority
Medium - Nice to have for reproducible development environments
Feature Category
CLI commands and flags / Configuration
Use Case Example
Nix configuration (desired):
# claude-plugins.nix
{
enabledPlugins = {
"commit-commands@anthropics/claude-code" = true;
"code-review@anthropics/claude-code" = true;
"feature-dev@anthropics/claude-code" = true;
"security-guidance@anthropics/claude-code" = true;
};
}
Current workaround:
- Run
darwin-rebuild switchto generatesettings.json - Open Claude Code interactively
- Run
/pluginand manually enable each plugin - Repeat on every machine
With this feature:
- Run
darwin-rebuild switch - Claude Code automatically has all plugins available
Additional Context
This is increasingly important as Claude Code's plugin ecosystem grows. The 13 official plugins (commit-commands, code-review, feature-dev, pr-review-toolkit, security-guidance, plugin-dev, hookify, agent-sdk-dev, frontend-design, explanatory-output-style, learning-output-style, claude-opus-4-5-migration, ralph-wiggum) represent significant functionality that Nix users want to manage declaratively.
See also: Nix configuration example for how users are currently attempting to manage this.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗