@magic5644/graph-it-live 1.13.5 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/docs/CLI.md CHANGED
@@ -16,11 +16,17 @@ The `graph-it` CLI gives you full access to the dependency analysis engine of Gr
16
16
  - [summary](#summary)
17
17
  - [explain](#explain)
18
18
  - [path](#path)
19
+ - [path-in](#path-in)
20
+ - [check-dependencies](#check-dependencies)
21
+ - [cycles](#cycles)
22
+ - [architecture](#architecture)
19
23
  - [check](#check)
20
24
  - [trace](#trace)
25
+ - [review-pr](#review-pr)
21
26
  - [query](#query)
22
27
  - [stats](#stats)
23
28
  - [wiki](#wiki)
29
+ - [export](#export)
24
30
  - [tool](#tool)
25
31
  - [serve](#serve)
26
32
  - [install](#install)
@@ -68,6 +74,21 @@ If you have the VS Code extension installed, you can expose the bundled binary t
68
74
  graph-it install # adds graph-it to your system PATH
69
75
  ```
70
76
 
77
+ **Troubleshooting: `graph-it` runs but prints nothing (fixed in v1.14.0)**
78
+
79
+ Versions v1.13.6 and earlier shipped a `bin/graph-it` wrapper that silently
80
+ broke `npm install -g` installs — every command exited `0` with no output at
81
+ all. If you're stuck on an affected version, `graph-it update` can't fix
82
+ itself (the whole CLI is dead on arrival, including the update command).
83
+ Reinstall manually instead:
84
+
85
+ ```bash
86
+ npm install -g @magic5644/graph-it-live@latest
87
+ ```
88
+
89
+ Once you're on v1.14.0+, `graph-it update` works normally again for future
90
+ releases.
91
+
71
92
  ---
72
93
 
73
94
  ## Quick Start
@@ -473,6 +494,123 @@ graph-it path src/index.ts --format json | jq '.files | length'
473
494
 
474
495
  ---
475
496
 
497
+ ### path-in
498
+
499
+ Find incoming dependencies — which files import a given target file.
500
+
501
+ ```
502
+ graph-it path-in <file> [options]
503
+ ```
504
+
505
+ **Arguments:**
506
+
507
+ | Argument | Description |
508
+ |----------|-------------|
509
+ | `<file>` | Target file whose importers should be listed |
510
+
511
+ **Options:**
512
+
513
+ | Option | Default | Description |
514
+ |--------|---------|-------------|
515
+ | `--workspace, -w` | auto-detected | Project root |
516
+ | `--format, -f` | `text` | Output format (`mermaid` generates a flowchart) |
517
+
518
+ **Examples:**
519
+
520
+ ```bash
521
+ graph-it path-in src/index.ts
522
+ graph-it path-in src/index.ts --format mermaid
523
+ ```
524
+
525
+ ---
526
+
527
+ ### check-dependencies
528
+
529
+ Check both incoming and outgoing dependencies for a file in one call — combines `path` and `path-in` for a single target.
530
+
531
+ ```
532
+ graph-it check-dependencies <file> [options]
533
+ ```
534
+
535
+ **Arguments:**
536
+
537
+ | Argument | Description |
538
+ |----------|-------------|
539
+ | `<file>` | Target file to analyze |
540
+
541
+ **Options:**
542
+
543
+ | Option | Default | Description |
544
+ |--------|---------|-------------|
545
+ | `--workspace, -w` | auto-detected | Project root |
546
+ | `--format, -f` | `text` | Output format |
547
+
548
+ **Examples:**
549
+
550
+ ```bash
551
+ graph-it check-dependencies src/index.ts
552
+ ```
553
+
554
+ ---
555
+
556
+ ### cycles
557
+
558
+ List confirmed circular-dependency cycles that involve a given file.
559
+
560
+ ```
561
+ graph-it cycles <file> [options]
562
+ ```
563
+
564
+ **Arguments:**
565
+
566
+ | Argument | Description |
567
+ |----------|-------------|
568
+ | `<file>` | Target file to inspect for cycles |
569
+
570
+ **Options:**
571
+
572
+ | Option | Default | Description |
573
+ |--------|---------|-------------|
574
+ | `--workspace, -w` | auto-detected | Project root |
575
+ | `--format, -f` | `text` | Output format |
576
+
577
+ **Examples:**
578
+
579
+ ```bash
580
+ graph-it cycles src/index.ts
581
+ ```
582
+
583
+ ---
584
+
585
+ ### architecture
586
+
587
+ Build the full workspace dependency architecture graph by aggregating direct dependencies across every source file.
588
+
589
+ ```
590
+ graph-it architecture [options]
591
+ ```
592
+
593
+ **Options:**
594
+
595
+ | Option | Default | Description |
596
+ |--------|---------|-------------|
597
+ | `--maxFiles <N>` | unlimited | Cap on the number of analyzed source files |
598
+ | `--workspace, -w` | auto-detected | Project root |
599
+ | `--format, -f` | `text` | Output format (`toon` recommended for large graphs; `mermaid` for diagrams) |
600
+
601
+ **Examples:**
602
+
603
+ ```bash
604
+ graph-it architecture
605
+ graph-it architecture --format mermaid
606
+ graph-it architecture --format toon
607
+ graph-it architecture --maxFiles 2000
608
+ ```
609
+
610
+ > **Use case:** Bootstrap AI-assisted exploration of an unfamiliar codebase — pipe `--format toon` into an LLM prompt for a token-efficient architecture snapshot.
611
+
612
+ ---
613
+
476
614
  ### check
477
615
 
478
616
  Find unused exported symbols (dead code) — either workspace-wide, scoped to a directory, or for a single file.
@@ -750,10 +888,14 @@ graph-it wiki [options]
750
888
  | Option | Default | Description |
751
889
  |--------|---------|-------------|
752
890
  | `--output <dir>` | `wiki` | Output directory (relative to workspace root, or absolute) |
891
+ | `--scope <rel-path>` | entire workspace | Restrict the wiki to a relative path within the workspace |
892
+ | `--exclude <pattern>` | — | Glob-like pattern to exclude (repeatable). Replaces the default exclusions when passed |
753
893
  | `--top <N>` | `10` | Number of top hub files to list in the index (1–50) |
754
894
  | `--format <fmt>` | `markdown` | Output summary format: `markdown`, `json`, `toon` |
755
895
  | `--workspace, -w` | auto-detected | Project root |
756
896
 
897
+ `tests/`, `dist/`, `*.test.ts` and similar are excluded automatically unless `--exclude` is passed.
898
+
757
899
  **Examples:**
758
900
 
759
901
  ```bash
@@ -761,6 +903,7 @@ graph-it wiki # write to ./wiki/
761
903
  graph-it wiki --output docs/wiki # write to ./docs/wiki/
762
904
  graph-it wiki --top 20 --format json # JSON summary, top 20 hubs
763
905
  graph-it wiki --output /tmp/preview # absolute output path
906
+ graph-it wiki --scope src/analyzer --exclude "**/*.spec.ts"
764
907
  ```
765
908
 
766
909
  **Output structure:**
@@ -786,6 +929,37 @@ Each article contains:
786
929
 
787
930
  ---
788
931
 
932
+ ### export
933
+
934
+ Export the dependency graph as a standalone, self-contained HTML file (no server required) — open it directly in a browser.
935
+
936
+ ```
937
+ graph-it export [scope] --format html [options]
938
+ ```
939
+
940
+ **Arguments:**
941
+
942
+ | Argument | Description |
943
+ |----------|-------------|
944
+ | `[scope]` | Optional relative path to scope the exported graph to |
945
+
946
+ **Options:**
947
+
948
+ | Option | Default | Description |
949
+ |--------|---------|-------------|
950
+ | `--output, -o <file>` | `graph.html` | Output HTML file path |
951
+ | `--format, -f` | — | Must be `html` — this is the only supported format for `export` |
952
+ | `--workspace, -w` | auto-detected | Project root |
953
+
954
+ **Examples:**
955
+
956
+ ```bash
957
+ graph-it export --format html
958
+ graph-it export src/analyzer --format html --output analyzer.html
959
+ ```
960
+
961
+ ---
962
+
789
963
  ### tool
790
964
 
791
965
  Invoke any of the 22 MCP analysis tools directly from the terminal — full MCP parity without a running server.
@@ -1020,7 +1194,7 @@ Requires an active internet connection and `npm` in `PATH`.
1020
1194
 
1021
1195
  ## MCP Tools Reference (via `graph-it tool`)
1022
1196
 
1023
- The `graph-it tool` command provides direct access to all 21 analysis tools (the MCP server exposes 22 including `set_workspace`, which is server-management only and not needed in CLI context — see [Tool Count: CLI vs MCP](#tool-count-cli-vs-mcp)).
1197
+ The `graph-it tool` command provides direct access to 21 general-purpose analysis tools. The MCP server exposes 26 tools in total — the same 21 plus `review_pr`, `query_natural_language`, `generate_wiki`, and `get_session_stats` (which have first-class CLI commands: `review-pr`, `query`, `wiki`, `stats`), plus `set_workspace` (server-management only, not needed in CLI context — see [Tool Count: CLI vs MCP](#tool-count-cli-vs-mcp)).
1024
1198
 
1025
1199
  ### Tool Details
1026
1200
 
@@ -1464,13 +1638,16 @@ graph-it tool verify_dependency_usage \
1464
1638
 
1465
1639
  ## Tool Count: CLI vs MCP
1466
1640
 
1467
- The CLI exposes **22 tools** via `graph-it tool --list`, while the MCP server provides **23 tools** in total. This is by design:
1641
+ The CLI exposes **21 tools** via `graph-it tool --list`, while the MCP server provides **26 tools** in total. This is by design:
1468
1642
 
1469
1643
  | Context | Tool count | Notes |
1470
1644
  |---------|-----------|-------|
1471
- | `graph-it tool --list` | 22 | All analysis tools |
1472
- | MCP server (`graph-it serve`) | 23 | Same 22 + `set_workspace` |
1645
+ | `graph-it tool --list` | 21 | General-purpose analysis tools |
1646
+ | MCP server (`graph-it serve`) | 26 | Same 21 + 5 excluded (see below) |
1647
+
1648
+ The 5 tools excluded from `tool --list` fall into two groups:
1473
1649
 
1474
- The extra tool, `set_workspace`, is a **server management tool** it tells a running MCP server instance which directory to analyze. In CLI context this is handled by the `--workspace` flag (or auto-detection from `cwd`), so it is intentionally excluded from the CLI tool list.
1650
+ - **`set_workspace`** a **server management tool**. It tells a running MCP server instance which directory to analyze. In CLI context this is handled by the `--workspace` flag (or auto-detection from `cwd`), so it is intentionally excluded from the CLI tool list.
1651
+ - **`review_pr`, `query_natural_language`, `generate_wiki`, `get_session_stats`** — each has a dedicated, first-class CLI command instead of being invoked generically via `tool`: [`review-pr`](#review-pr), [`query`](#query), [`wiki`](#wiki), [`stats`](#stats).
1475
1652
 
1476
- **Summary:** The CLI gives you 100% parity with the MCP analysis tools. `set_workspace` is the only tool that exists in MCP but not in the CLI, and it would be redundant there.
1653
+ **Summary:** The CLI gives you 100% parity with the MCP tools. Nothing in MCP is unreachable from the CLI — `set_workspace` is redundant in CLI context, and the other 4 tools are exposed via friendlier dedicated commands rather than the generic `tool` invocation.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@magic5644/graph-it-live",
3
3
  "displayName": "Graph-It-Live",
4
4
  "description": "AI-first dependency graph & code intelligence for VS Code. Visualize file imports, symbol call hierarchies, and cross-file call graphs. Detect circular dependencies, dead code, and breaking changes. Built-in MCP Server with 21 tools for GitHub Copilot, Cursor, Claude, Windsurf, and Antigravity. Generate AI-friendly codemaps. TypeScript, JavaScript, C#, Go, Java, Python, Rust, Vue, Svelte, GraphQL.",
5
- "version": "1.13.5",
5
+ "version": "1.14.0",
6
6
  "publisher": "magic5644",
7
7
  "author": {
8
8
  "name": "magic56"
@@ -1102,7 +1102,7 @@
1102
1102
  }
1103
1103
  },
1104
1104
  "bin": {
1105
- "graph-it": "./bin/graph-it"
1105
+ "graph-it": "./dist/graph-it.js"
1106
1106
  },
1107
1107
  "scripts": {
1108
1108
  "vscode:prepublish": "npm run build -- --production",
@@ -1138,10 +1138,10 @@
1138
1138
  "dependencies": {
1139
1139
  "@dagrejs/dagre": "^2.0.4",
1140
1140
  "@inquirer/core": "^11.2.1",
1141
- "@inquirer/prompts": "^8.5.2",
1142
- "@modelcontextprotocol/sdk": "^1.30.0",
1141
+ "@inquirer/prompts": "^8.7.0",
1142
+ "@modelcontextprotocol/server": "^2.0.0",
1143
1143
  "chokidar": "^5.0.0",
1144
- "cytoscape": "^3.34.1",
1144
+ "cytoscape": "^3.34.2",
1145
1145
  "cytoscape-fcose": "^2.2.0",
1146
1146
  "ink": "^7.1.1",
1147
1147
  "react": "^19.2.8",
@@ -1152,16 +1152,16 @@
1152
1152
  "tree-sitter-wasms": "^0.1.13",
1153
1153
  "ts-morph": "^27.0.2",
1154
1154
  "vis-network": "10.1.0",
1155
- "web-tree-sitter": "^0.26.12",
1155
+ "web-tree-sitter": "^0.26.13",
1156
1156
  "zod": "^4.4.3"
1157
1157
  },
1158
1158
  "devDependencies": {
1159
1159
  "@eslint/js": "^10.0.1",
1160
- "@testing-library/react": "^16.3.2",
1160
+ "@testing-library/react": "^16.3.3",
1161
1161
  "@types/mocha": "^10.0.10",
1162
1162
  "@types/node": "^25.9.5",
1163
1163
  "@types/react": "^19.2.18",
1164
- "@types/react-dom": "^19.2.4",
1164
+ "@types/react-dom": "^19.2.5",
1165
1165
  "@types/sql.js": "^1.4.11",
1166
1166
  "@types/vscode": "^1.96.0",
1167
1167
  "@vitest/coverage-v8": "^4.1.11",
@@ -1170,14 +1170,14 @@
1170
1170
  "@vscode/vsce": "^3.9.2",
1171
1171
  "esbuild": "^0.28.2",
1172
1172
  "esbuild-css-modules-plugin": "^3.1.5",
1173
- "eslint": "^10.8.1",
1173
+ "eslint": "^10.9.1",
1174
1174
  "fast-check": "^4.9.0",
1175
1175
  "glob": "^13.0.6",
1176
1176
  "globals": "^17.11.0",
1177
- "happy-dom": "^20.11.2",
1177
+ "happy-dom": "^20.11.12",
1178
1178
  "mocha": "^11.8.0",
1179
1179
  "typescript": "^6.0.3",
1180
- "typescript-eslint": "^8.67.0",
1180
+ "typescript-eslint": "^8.68.0",
1181
1181
  "vitest": "^4.1.11"
1182
1182
  },
1183
1183
  "overrides": {
package/bin/graph-it DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- require('../dist/graph-it.js');