You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/gitnexus/gitnexus-cli/SKILL.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,16 @@ description: "Use when the user needs to run GitNexus CLI commands like analyze/
5
5
6
6
# GitNexus CLI Commands
7
7
8
-
All commands work via `npx` — no global install required.
8
+
Commands below use `node .gitnexus/run.cjs <command>` — the project-local runner `gitnexus analyze` drops next to the index. It auto-selects an available runner at call time (global `gitnexus`, else `pnpm dlx`, else `npx`), so no package-manager assumption and no global install is required.
9
+
10
+
> **Not analyzed yet, or `node .gitnexus/run.cjs` reports `Cannot find module`** (the gitignored runner is absent — e.g. a fresh clone or `git clean`)? (Re)generate it with `npx gitnexus analyze` from the project root. On **npm 11.x**, if `npx` crashes during install (`node.target is null`), install once with `npm i -g gitnexus` (then `gitnexus analyze`) or use `pnpm --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter dlx gitnexus@latest analyze`. See [#1939](https://github.com/abhigyanpatwari/GitNexus/issues/1939).
9
11
10
12
## Commands
11
13
12
14
### analyze — Build or refresh the index
13
15
14
16
```bash
15
-
npx gitnexus analyze
17
+
node .gitnexus/run.cjs analyze
16
18
```
17
19
18
20
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,15 +30,15 @@ Run from the project root. This parses all source files, builds the knowledge gr
28
30
### status — Check index freshness
29
31
30
32
```bash
31
-
npx gitnexus status
33
+
node .gitnexus/run.cjs status
32
34
```
33
35
34
36
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.
35
37
36
38
### clean — Delete the index
37
39
38
40
```bash
39
-
npx gitnexus clean
41
+
node .gitnexus/run.cjs clean
40
42
```
41
43
42
44
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 +51,7 @@ Deletes the `.gitnexus/` directory and unregisters the repo from the global regi
49
51
### wiki — Generate documentation from the graph
50
52
51
53
```bash
52
-
npx gitnexus wiki
54
+
node .gitnexus/run.cjs wiki
53
55
```
54
56
55
57
Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use).
@@ -66,7 +68,7 @@ Generates repository documentation from the knowledge graph using an LLM. Requir
66
68
### list — Show all indexed repos
67
69
68
70
```bash
69
-
npx gitnexus list
71
+
node .gitnexus/run.cjs list
70
72
```
71
73
72
74
Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information.
`list_repos` is paginated so a large registry is not truncated by MCP/LLM token limits. It takes optional `limit` (default **50**, max **200**) and `offset`, and returns:
Notes: `offset` ≥ `total` returns an empty page (with `total` still reported). Out-of-range or malformed `limit`/`offset` (non-integer, `limit` outside `[1, 200]`, `offset < 0`) are rejected with a clear error — `limit` above the max is rejected, not silently capped. The order is deterministic (lower-cased name, then path), so paging never skips or duplicates an entry while the registry is unchanged.
0 commit comments