[FEATURE] Declarative plugin management for Nix/NixOS users

Resolved 💬 2 comments Opened Dec 9, 2025 by JacobPEvans-personal Closed Dec 9, 2025

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:

  1. Reproducible environments: Plugin configuration should be version-controlled alongside other dotfiles
  2. Atomic updates: Plugins should update with nix flake update, not manual intervention
  3. Multi-machine sync: Same plugin configuration across all machines without manual setup

Currently, workarounds involve:

  • Manually configuring extraKnownMarketplaces and enabledPlugins in settings.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/bash shebang

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:

  1. Claude Code reads enabledPlugins from settings.json on startup
  2. Plugins are fetched/cached automatically if not present
  3. No interactive /plugin command required for initial setup
  4. 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

  1. Current workaround: Manually symlink plugin directories from Nix store to ~/.claude/plugins/
  • Fragile, breaks on Claude Code updates
  • Requires understanding internal plugin structure
  1. 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:

  1. Run darwin-rebuild switch to generate settings.json
  2. Open Claude Code interactively
  3. Run /plugin and manually enable each plugin
  4. Repeat on every machine

With this feature:

  1. Run darwin-rebuild switch
  2. 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.

View original on GitHub ↗

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