diff --git a/gitnexus/skills/gitnexus-cli.md b/gitnexus/skills/gitnexus-cli.md index cd9a83be0..7ec06f471 100644 --- a/gitnexus/skills/gitnexus-cli.md +++ b/gitnexus/skills/gitnexus-cli.md @@ -5,14 +5,14 @@ description: "Use when the user needs to run GitNexus CLI commands like analyze/ # GitNexus CLI Commands -All commands work via `npx` — no global install required. +Commands below use the installed `gitnexus` CLI. If the CLI is not installed, use the equivalent `npx gitnexus ...` invocation. ## Commands ### analyze — Build or refresh the index ```bash -npx gitnexus analyze +gitnexus analyze ``` Run from the project root. This parses all source files, builds the knowledge graph, writes it to `.gitnexus/`, and generates CLAUDE.md / AGENTS.md context files. @@ -28,7 +28,7 @@ Run from the project root. This parses all source files, builds the knowledge gr ### status — Check index freshness ```bash -npx gitnexus status +gitnexus status ``` Shows whether the current repo has a GitNexus index, when it was last updated, and symbol/relationship counts. Use this to check if re-indexing is needed. @@ -36,7 +36,7 @@ Shows whether the current repo has a GitNexus index, when it was last updated, a ### clean — Delete the index ```bash -npx gitnexus clean +gitnexus clean ``` Deletes the `.gitnexus/` directory and unregisters the repo from the global registry. Use before re-indexing if the index is corrupt or after removing GitNexus from a project. @@ -49,7 +49,7 @@ Deletes the `.gitnexus/` directory and unregisters the repo from the global regi ### wiki — Generate documentation from the graph ```bash -npx gitnexus wiki +gitnexus wiki ``` Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use). @@ -66,7 +66,7 @@ Generates repository documentation from the knowledge graph using an LLM. Requir ### list — Show all indexed repos ```bash -npx gitnexus list +gitnexus list ``` Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information. diff --git a/gitnexus/skills/gitnexus-debugging.md b/gitnexus/skills/gitnexus-debugging.md index 9510b97ac..0b558300c 100644 --- a/gitnexus/skills/gitnexus-debugging.md +++ b/gitnexus/skills/gitnexus-debugging.md @@ -22,7 +22,7 @@ description: "Use when the user is debugging a bug, tracing an error, or asking 4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if needed ``` -> If "Index is stale" → run `npx gitnexus analyze` in terminal. +> If "Index is stale" → run `gitnexus analyze` in terminal (or `npx gitnexus analyze` if the CLI is not installed). ## Checklist diff --git a/gitnexus/skills/gitnexus-exploring.md b/gitnexus/skills/gitnexus-exploring.md index 927a4e4b6..5162458ab 100644 --- a/gitnexus/skills/gitnexus-exploring.md +++ b/gitnexus/skills/gitnexus-exploring.md @@ -23,7 +23,7 @@ description: "Use when the user asks how code works, wants to understand archite 5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow ``` -> If step 2 says "Index is stale" → run `npx gitnexus analyze` in terminal. +> If step 2 says "Index is stale" → run `gitnexus analyze` in terminal (or `npx gitnexus analyze` if the CLI is not installed). ## Checklist diff --git a/gitnexus/skills/gitnexus-guide.md b/gitnexus/skills/gitnexus-guide.md index 937ac73d1..158556c2f 100644 --- a/gitnexus/skills/gitnexus-guide.md +++ b/gitnexus/skills/gitnexus-guide.md @@ -15,7 +15,7 @@ For any task involving code understanding, debugging, impact analysis, or refact 2. **Match your task to a skill below** and **read that skill file** 3. **Follow the skill's workflow and checklist** -> If step 1 warns the index is stale, run `npx gitnexus analyze` in the terminal first. +> If step 1 warns the index is stale, run `gitnexus analyze` in the terminal first (or `npx gitnexus analyze` if the CLI is not installed). ## Skills diff --git a/gitnexus/skills/gitnexus-impact-analysis.md b/gitnexus/skills/gitnexus-impact-analysis.md index e19af280c..8e242a0af 100644 --- a/gitnexus/skills/gitnexus-impact-analysis.md +++ b/gitnexus/skills/gitnexus-impact-analysis.md @@ -23,7 +23,7 @@ description: "Use when the user wants to know what will break if they change som 4. Assess risk and report to user ``` -> If "Index is stale" → run `npx gitnexus analyze` in terminal. +> If "Index is stale" → run `gitnexus analyze` in terminal (or `npx gitnexus analyze` if the CLI is not installed). ## Checklist diff --git a/gitnexus/skills/gitnexus-pr-review.md b/gitnexus/skills/gitnexus-pr-review.md index e112f47ba..3770dcef1 100644 --- a/gitnexus/skills/gitnexus-pr-review.md +++ b/gitnexus/skills/gitnexus-pr-review.md @@ -26,7 +26,7 @@ description: "Use when the user wants to review a pull request, understand what 6. Summarize findings with risk assessment ``` -> If "Index is stale" → run `npx gitnexus analyze` in terminal before reviewing. +> If "Index is stale" → run `gitnexus analyze` in terminal before reviewing (or `npx gitnexus analyze` if the CLI is not installed). ## Checklist diff --git a/gitnexus/skills/gitnexus-refactoring.md b/gitnexus/skills/gitnexus-refactoring.md index f48cc01bd..ec2ac7da9 100644 --- a/gitnexus/skills/gitnexus-refactoring.md +++ b/gitnexus/skills/gitnexus-refactoring.md @@ -22,7 +22,7 @@ description: "Use when the user wants to rename, extract, split, move, or restru 4. Plan update order: interfaces → implementations → callers → tests ``` -> If "Index is stale" → run `npx gitnexus analyze` in terminal. +> If "Index is stale" → run `gitnexus analyze` in terminal (or `npx gitnexus analyze` if the CLI is not installed). ## Checklists