27 Commits
Author SHA1 Message Date
Austin Horstman cadadbc6f4 claude-code: omit unsupported mcp enabled field 2026-06-10 08:38:54 -05:00
MalikandAustin Horstman ebc55fd103 claude-code, codex, antigravity-cli, github-copilot-cli, opencode, vscode, zed-editor: use mcp lib
- use lib.hm.mcp.transformMcpServer for MCP integration
- Update tests to reflect new merged server configuration
2026-06-09 23:03:52 -05:00
Austin Horstman 09ff165ba6 claude-code: use lib.hm.strings.isPathLike 2026-06-05 11:39:28 -05:00
Austin Horstman d0af9b8bf3 claude-code: mark hook scripts executable
Inline hooks are scripts, so write them with the executable bit set. Add NMT assertions covering default and custom config directories.
2026-06-01 16:06:08 -05:00
Alvaro ViejoandAustin Horstman 26aaab785b claude-code: fixes enableMcpIntegration option docstring
Fixes typo in enableMcpIntegration option's docstring referencing
opencode's option instead of claude-code's.
2026-05-16 13:00:30 -05:00
jiezhuzzzandAustin Horstman e7a7c550e2 claude-code: add configDir option
Make the location of Claude Code's configuration files configurable.
The option defaults to `~/.claude` so existing setups are unaffected,
and exports the `CLAUDE_CONFIG_DIR` environment variable automatically
whenever the directory differs from the upstream default so the CLI
reads from the same location home-manager wrote to.

The option follows the convention established by
`programs.github-copilot-cli`: an absolute-path string with a
`defaultText` for clean documentation rendering, an `upstreamConfigDir`
constant, and a session variable wired only when the user opts out of
the upstream default.
2026-05-15 08:13:54 -05:00
Austin Horstman d181e6ac2a treewide: support store path strings for skills dirs
Filtered or generated skill directories can evaluate to Nix store path
strings rather than path values. The previous top-level skills handling
only used lib.isPath, so those directory values fell through instead of
being linked or expanded.

Treat store-path strings as path-like for the top-level skills option in
Codex, Claude Code, Gemini CLI, and OpenCode, matching the behavior
already used for individual skill entries. Add NMT coverage for
store-path-string skill directories.
2026-05-01 09:54:56 -05:00
Benedikt RipsandAustin Horstman 71402c5df3 treewide: mark unused lambda arguments 2026-04-13 22:02:40 -05:00
Vinicius DeolindoandAustin Horstman 13df3b4e44 claude-code: migrate memory to context & skills{,Dir} to skills 2026-04-12 10:53:57 -05:00
Pat L.andGitHub 7126ec6a55 claude-code: Add support for installing plugins (#8934)
Allow for configuring marketplaces or individual plugins.

Both are provided as a list of either paths or packages.

The lone plugins are enabled by adding a --plugin-dir argument to the wrapper script.

Marketplaces are saved to the nix store and enabled by adding to the claude settings and known_marketplaces files.

With the marketplace "installed", the plugin can just be enabled via the enabledPlugins setting.
2026-03-26 22:59:48 -05:00
Austin Horstman ecf019baf4 claude-code: code style/lint cleanup
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-19 00:32:52 -05:00
Austin Horstman 0d200e1da7 claude-code: deduplicate module helpers
Factor the repeated claude-code module patterns into a small set of local helpers instead of open-coding them over and over.

This keeps the behavior the same, but removes duplication in the inline-or-path option declarations, the inline-vs-directory assertions, and the repeated .claude file generation code. The claude-code NMT test slice still passes after the refactor.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-19 00:32:52 -05:00
Austin Horstman 4fcef56c15 claude-code: load MCP config via plugin dir
Claude Code rejects `--mcp-config` once the Home Manager wrapper injects
it around subcommands, which breaks commands like `claude mcp list`.
Claude Code 2.1.76 fixed `--plugin-dir` so it no longer consumes
following subcommands, so use that path for the generated MCP config
instead.

Generate a plugin directory with a manifest and `.mcp.json`, wrap
`claude` with `--plugin-dir` before user arguments, and snapshot that
wrapper directly in the tests. Keep the existing LSP support in the
generated plugin directory as well, and add coverage for the combined
MCP+LSP case plus the MCP integration merge path.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-18 23:58:36 -05:00
natsukiumandAustin Horstman a455ac1bb3 claude-code: add lsp servers support 2026-03-17 23:52:47 -05:00
RaneandAustin Horstman bff85cb66b claude-code: add support for output styles
Adds an option to populate the output_styles directory,
which is used by Claude Code to make custom output styles available.
2026-02-26 21:37:08 -06:00
Austin Horstman 91be7cce76 claude-code: fix skills implementation
Claude skills are only found when using `SKILL.md` entrypoints.
Attribute names should be used for the directory structure, not the
filename.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-19 14:00:06 -06:00
Thierry DelafontaineandGitHub 83bcb17377 claude-code: add enableMcpIntegration
Add `enableMcpIntegration` option to merge MCP servers from
`programs.mcp.servers` into Claude Code configuration. Claude Code
servers take precedence over general MCP servers when both define
the same server name.
2026-01-17 21:33:01 -06:00
Austin Horstman 9bf54edf10 claude-code: add rules support
Support the `rules` directory for modular memory files.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-12-19 13:19:35 -06:00
Austin Horstman 519828bf1c claude-code: refactor wrapper to use append-flags
Alternative approach suggested in
https://github.com/nix-community/home-manager/pull/8290#discussion_r2593114782

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-12-05 10:42:15 -06:00
Austin Horstman 05a56dbf24 claude-code: fix wrapper to inject --mcp-config after subcommands
Manually wrap program to maintain options called from cli.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-12-04 12:19:32 -06:00
t-monaghanandAustin Horstman 6aff254343 claude-code: added 'skills' option to specify skills from filesystem 2025-11-25 23:35:00 -06:00
Austin Horstman 846f27fba8 claude-code: support paths for agents/commands
Support passing actual files to the agents/commands since they will be
used to generate files.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-09-17 00:07:05 -05:00
Sewer56andAustin Horstman 5e06d0f184 claude-code: added 'hooks' and 'hooksDir' options to specify hooks from filesystem 2025-09-14 23:29:18 -05:00
Sewer56andAustin Horstman be37a3492d claude-code: added 'commandsDir' option to specify commands from filesystem 2025-09-14 23:29:18 -05:00
Sewer56andAustin Horstman a641bbbb9b claude-code: added 'agentsDir' option to specify agents from filesystem 2025-09-14 23:29:18 -05:00
Sewer56andAustin Horstman 343e555657 claude-code: added memories (claude.md) generation 2025-09-14 23:29:18 -05:00
Austin HorstmanandGitHub 8b4ac14968 claude-code: init module (#7685)
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-08-16 21:33:06 -05:00