# How to install GSD Core on your runtime Install GSD Core (`@opengsd/gsd-core`) into the AI coding runtime you use every day. This guide gives you the standard installer path for each supported runtime, then covers the manual path for machines without Node.js. **What you need:** Node.js 18+ and npm (or npx). If you do not have Node.js, jump to [Installing without Node.js](#installing-without-nodejs). --- ## Why the installer is required GSD Core ships agent and command files in Claude Code's native frontmatter format. Each supported runtime expects a different schema, directory layout, and command-invocation syntax. The installer performs the necessary transformations — for example, converting tool lists and colour values for OpenCode, writing TOML agent entries for Codex, and rewriting every command body from hyphen form (`/gsd-update`) to colon form (`/gsd:update`) for Gemini CLI. **Do not copy files from `agents/` or `commands/` directly.** Doing so bypasses the transformations and produces schema-validation errors or missing commands. --- ## Standard install Run the installer from any directory. It prompts for your runtime and whether to install globally (all projects) or locally (this project only). ```bash npx @opengsd/gsd-core@latest ``` That is the only command you need for a fresh install or to re-run the installer after switching runtimes. --- ## Per-runtime instructions ### Claude Code ```bash npx @opengsd/gsd-core@latest --claude --global ``` Skills land in `~/.claude/`. Commands appear as `/gsd-*` slash commands in your next Claude Code session. Restart Claude Code to pick them up. **Override the install directory:** ```bash CLAUDE_CONFIG_DIR=~/.claude-alt npx @opengsd/gsd-core@latest --claude --global ``` **Hook coverage** GSD registers the following Claude Code hook events automatically on install: | Event | Hook | Purpose | |---|---|---| | `SessionStart` | `gsd-check-update.js`, `gsd-session-state.sh` | Update check, session orientation | | `PostToolUse` | `gsd-context-monitor.js`, `gsd-read-injection-scanner.js`, `gsd-phase-boundary.sh`, `gsd-graphify-update.sh` | Context monitoring, read-time scan, phase boundary detection | | `PreToolUse` | `gsd-prompt-guard.js`, `gsd-read-guard.js`, `gsd-workflow-guard.js`, `gsd-worktree-path-guard.js`, `gsd-validate-commit.sh` | Prompt guard, read-before-edit, workflow + worktree safety, commit validation | | `SubagentStop` | `gsd-context-monitor.js` | Context headroom tracking after subagent completion | | `Stop` | `gsd-context-monitor.js` | Context headroom tracking before model stop | | `PreCompact` | `gsd-context-monitor.js` | Context awareness before conversation compaction | | `FileChanged` (matcher: `config.json`) | `gsd-config-reload.js` | Hot-reloads `.planning/config.json` context mid-session when you edit your GSD config — no session restart required | The `FileChanged` hook is always-on and a no-op when `.planning/config.json` does not exist in the project. Editing that file while a session is running injects an `additionalContext` summary of the new configuration so the agent picks up model overrides, workflow toggles, and hook settings immediately. --- ### Claude Code — native plugin install GSD Core ships a `.claude-plugin/plugin.json` manifest, which enables installation and lifecycle management through the Claude Code plugin system. This path is **additive** — the npm installer above remains fully supported, and the two approaches differ in namespace and lifecycle only. **Install paths** *Option A — marketplace or git install (once listed):* ```bash claude plugin install gsd-core ``` *Option B — zero-friction skills-dir load:* Claude Code automatically discovers any directory under `~/.claude/skills/` that contains a `.claude-plugin/plugin.json` as a plugin. To use gsd-core this way, place (or symlink) the gsd-core package directory there: ```bash # Example: place the package under ~/.claude/skills/gsd-core/ # Claude Code loads it as gsd-core@skills-dir on the next session start. # No explicit install step required. ``` **Command namespace** Plugin commands are namespaced as `/gsd-core:` — for example, `/gsd-core:plan-phase`. This is distinct from the classic npm/file-copy installer, which exposes commands as `/gsd:`. Use whichever namespace corresponds to your install method. **Lifecycle** ```bash claude plugin enable gsd-core claude plugin disable gsd-core claude plugin update gsd-core ``` **Hooks** The plugin wires gsd-core's always-on guard and update hooks automatically via `hooks/hooks.json`. No manual hook registration is required. **Prerequisites** The `gsd-tools` binary (installed as part of the `@opengsd/gsd-core` npm package) must be available on your `PATH` for gsd commands to execute their backing logic. The plugin delivers the command, agent, and hook surface; the npm package delivers the runtime CLI. Node.js (`node`) must also be available on your `PATH`. The plugin's always-on guard hooks (wired in `hooks/hooks.json`) are invoked as `node "${CLAUDE_PLUGIN_ROOT}/hooks/