diff --git a/README.md b/README.md index 6bbb0b1..bc8fe44 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,10 @@ Battle-tested across real production repositories; examples below use neutral pl ```bash git clone https://github.com/ReidenXerx/gitnexus-agent-kit.git cd gitnexus-agent-kit -./bin/install.sh # interactive — pick Cursor, Zed, or both -./bin/install.sh /path/to/repo --runtime zed # Zed + Ollama profile -./bin/install.sh /path/to/repo --runtime both # Cursor hooks + Zed profile +./bin/install.sh # interactive — pick Cursor, Zed, Claude Code, or all +./bin/install.sh /path/to/repo --runtime all # Cursor + Zed + Claude Code +./bin/install.sh /path/to/repo --runtime claude # Claude Code hooks + MCP + CLAUDE.md +./bin/install.sh /path/to/repo --runtime zed # Zed + Ollama profile # → restart your IDE → npm run gitnexus:health → new Agent chat ``` diff --git a/bin/install.sh b/bin/install.sh index 25e120c..6402266 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Install gitnexus-agent-kit into a target git repo (interactive if no path given). -# Usage: ./bin/install.sh [/path/to/repo] [--runtime cursor|zed|both] [--quick] [--no-setup] +# Usage: ./bin/install.sh [/path/to/repo] [--runtime cursor|zed|claude|both|all] [--quick] [--no-setup] +# runtime: cursor · zed · claude · both (=cursor+zed, default) · all (=cursor+zed+claude) · comma-list e.g. cursor,claude set -euo pipefail KIT_ROOT="$(cd "$(dirname "$0")/.." && pwd)" @@ -8,13 +9,14 @@ TARGET="${1:-}" if [[ -z "$TARGET" ]] || [[ "$TARGET" == "--interactive" ]] || [[ "$TARGET" == "-h" ]] || [[ "$TARGET" == "--help" ]]; then if [[ "$TARGET" == "-h" ]] || [[ "$TARGET" == "--help" ]]; then - sed -n '2,3p' "$0" | sed 's/^# *//' + sed -n '2,4p' "$0" | sed 's/^# *//' echo "" echo "Examples:" echo " $0 # interactive (pick IDE + repo path)" echo " $0 --interactive # interactive" echo " $0 ../my-service" - echo " $0 ../my-app --runtime zed --quick" + echo " $0 ../my-app --runtime all # Cursor + Zed + Claude Code" + echo " $0 ../my-app --runtime claude --no-setup" echo " $0 ../my-app --runtime both --repo-name my-app" exit 0 fi diff --git a/bin/update.sh b/bin/update.sh index 75e1f18..ad75941 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -1,14 +1,17 @@ #!/usr/bin/env bash -# Update gitnexus-agent-kit in a target repo. -# Usage: ./bin/update.sh /path/to/repo [--runtime cursor|zed|both] [--full] [--no-setup] [--skip-verify] -# ./bin/update.sh --all [search-root] [--runtime cursor|zed|both] [--no-setup] [--skip-verify] +# Update gitnexus-agent-kit in a target repo. Reads the runtime from the manifest — pass +# --runtime only to CHANGE it (cursor|zed|claude|both|all, comma-list allowed). +# Fresh clone? The manifest (.gitnexus/agent-kit-manifest.json) is gitignored, so it's absent and +# update prints "Not installed. Run install first." — use ./bin/install.sh --runtime instead. +# Usage: ./bin/update.sh /path/to/repo [--runtime ...] [--full] [--no-setup] [--skip-verify] +# ./bin/update.sh --all [search-root] [--runtime ...] [--no-setup] [--skip-verify] set -euo pipefail KIT_ROOT="$(cd "$(dirname "$0")/.." && pwd)" TARGET="${1:-}" if [[ -z "$TARGET" ]] || [[ "$TARGET" == "-h" ]] || [[ "$TARGET" == "--help" ]]; then - sed -n '2,4p' "$0" | sed 's/^# *//' + sed -n '2,7p' "$0" | sed 's/^# *//' exit 0 fi diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index e1ce2ce..1a1f8fe 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -11,7 +11,7 @@ Install **gitnexus-agent-kit** into any git repo. The kit copies hooks, rules, s | Node.js ≥ 22.9.0 | `node -v` | | git | Target must be a worktree | | bash | macOS / Linux / WSL | -| Cursor and/or Zed | Pick runtime at install (default: both) | +| Cursor / Zed / Claude Code | Pick runtime at install: `cursor` · `zed` · `claude` · `both` (=cursor+zed, default) · `all` (=cursor+zed+claude) | After `--quick` install, run `npm run gitnexus:agent-refresh` in the **target repo** before graph tools work. @@ -33,6 +33,12 @@ cd gitnexus-agent-kit # Zed + Ollama profile only ./bin/install.sh /path/to/your-repo --runtime zed +# Everything — Cursor + Zed + Claude Code +./bin/install.sh /path/to/your-repo --runtime all + +# Claude Code only (hooks + MCP + CLAUDE.md) +./bin/install.sh /path/to/your-repo --runtime claude + # Hooks/skills only — index later ./bin/install.sh /path/to/your-repo --quick @@ -48,7 +54,7 @@ Custom GitNexus registry name (when folder basename ≠ indexed repo name): ## After install (target repo) -1. **Restart your IDE** on the target project — MCP + hooks (Cursor) or agent profile (Zed) load on restart. +1. **Restart your IDE** on the target project — MCP + hooks (Cursor), agent profile (Zed), or hooks + MCP + `CLAUDE.md` (Claude Code) load on restart. 2. `npm run gitnexus:verify` — runtime-aware kit audit (also runs at end of install). 3. `npm run gitnexus:health` — human-friendly status for your team. 4. Open a **new Agent chat** and describe your task. @@ -76,11 +82,13 @@ Skills live once in `.gnkit/skills/` and are **symlinked** — not copied — in ## Update ```bash -./bin/update.sh /path/to/your-repo -./bin/update.sh /path/to/your-repo --runtime both # ensure Cursor + Zed after old Cursor-only install +./bin/update.sh /path/to/your-repo # keeps the installed runtime (read from the manifest) +./bin/update.sh /path/to/your-repo --runtime all # CHANGE runtime, e.g. add Claude Code to an old install ``` -Default: `--quick` (skips full re-index). **Migration runs on every update** — old rsync'd `.cursor/skills/*`, `.claude/skills/*`, legacy manifest, and Zed profile key `gitnexus` are cleaned automatically. +`update` reads the runtime from the manifest, so you only pass `--runtime` to **change** it. Default: `--quick` (skips full re-index). **Migration runs on every update** — old rsync'd `.cursor/skills/*`, `.claude/skills/*`, legacy manifest, and Zed profile key `gitnexus` are cleaned automatically. + +> **Fresh clone of an already-installed repo?** The manifest (`.gitnexus/agent-kit-manifest.json`) is **gitignored**, so it isn't in a new clone — `update` will stop with *"Not installed. Run install first."* That's expected: run **`./bin/install.sh /path/to/repo --runtime all --no-setup`** instead. Install is idempotent — it re-materializes the current bundle and rewrites the manifest without touching your code. Bulk update every installed repo under a workspace root: