Expand description
Local-marketplace installer for Claude Code integration.
gw setup-claude writes a self-contained Claude Code marketplace tree
under the OS data-local dir (e.g. ~/.local/share/git-worktree-manager/ claude-marketplace/ on Linux/macOS, %LOCALAPPDATA%\git-worktree- manager\claude-marketplace\ on Windows). After writing, we shell out
to the claude CLI to register the marketplace and install/update the
plugin so Claude Code actually loads it.
Re-runs are idempotent: file content is content-addressed, and the
claude CLI calls switch between fresh install and update based on a
sentinel marker we drop on first run.
Modules§
- claude_
cli - Wrapper around the external
claudeCLI for plugin/marketplace ops. - command_
gw - Body of the
/gwslash command. Acts as a thin trigger that hands off to the bundleddelegateskill, which contains the actual task-routing logic. - legacy
- Removal of pre-marketplace install locations.
- manifest
- JSON manifests for the local Claude Code marketplace + plugin.
- paths
- Filesystem layout for the local-marketplace install.
- writer
- File-write helpers used by the marketplace install. Writes are
content-addressed (skip when bytes match) so re-running
gw setup-claudeis a true no-op when nothing changed.
Functions§
- is_
installed - True if our marketplace tree exists at the canonical data-local path.
- is_
plugin_ installed - Backward-compat alias kept for diagnostics.rs. Same meaning as
is_installed(). - is_
skill_ installed - Backward-compat alias used by
gw doctor. Returns true if either the new install OR a legacy install (any of three layouts) is present. - setup_
claude - Production entry point: resolves real home + data-local dirs and uses
the real
claudeCLI. - setup_
claude_ with_ cli - Test/composition entry point. Lets callers inject the home root, the
data-local root, and a
ClaudeCliimpl independently.