@magic5644/graph-it-live 1.13.5 → 1.13.6

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)
@@ -473,6 +479,123 @@ graph-it path src/index.ts --format json | jq '.files | length'
473
479
 
474
480
  ---
475
481
 
482
+ ### path-in
483
+
484
+ Find incoming dependencies — which files import a given target file.
485
+
486
+ ```
487
+ graph-it path-in <file> [options]
488
+ ```
489
+
490
+ **Arguments:**
491
+
492
+ | Argument | Description |
493
+ |----------|-------------|
494
+ | `<file>` | Target file whose importers should be listed |
495
+
496
+ **Options:**
497
+
498
+ | Option | Default | Description |
499
+ |--------|---------|-------------|
500
+ | `--workspace, -w` | auto-detected | Project root |
501
+ | `--format, -f` | `text` | Output format (`mermaid` generates a flowchart) |
502
+
503
+ **Examples:**
504
+
505
+ ```bash
506
+ graph-it path-in src/index.ts
507
+ graph-it path-in src/index.ts --format mermaid
508
+ ```
509
+
510
+ ---
511
+
512
+ ### check-dependencies
513
+
514
+ Check both incoming and outgoing dependencies for a file in one call — combines `path` and `path-in` for a single target.
515
+
516
+ ```
517
+ graph-it check-dependencies <file> [options]
518
+ ```
519
+
520
+ **Arguments:**
521
+
522
+ | Argument | Description |
523
+ |----------|-------------|
524
+ | `<file>` | Target file to analyze |
525
+
526
+ **Options:**
527
+
528
+ | Option | Default | Description |
529
+ |--------|---------|-------------|
530
+ | `--workspace, -w` | auto-detected | Project root |
531
+ | `--format, -f` | `text` | Output format |
532
+
533
+ **Examples:**
534
+
535
+ ```bash
536
+ graph-it check-dependencies src/index.ts
537
+ ```
538
+
539
+ ---
540
+
541
+ ### cycles
542
+
543
+ List confirmed circular-dependency cycles that involve a given file.
544
+
545
+ ```
546
+ graph-it cycles <file> [options]
547
+ ```
548
+
549
+ **Arguments:**
550
+
551
+ | Argument | Description |
552
+ |----------|-------------|
553
+ | `<file>` | Target file to inspect for cycles |
554
+
555
+ **Options:**
556
+
557
+ | Option | Default | Description |
558
+ |--------|---------|-------------|
559
+ | `--workspace, -w` | auto-detected | Project root |
560
+ | `--format, -f` | `text` | Output format |
561
+
562
+ **Examples:**
563
+
564
+ ```bash
565
+ graph-it cycles src/index.ts
566
+ ```
567
+
568
+ ---
569
+
570
+ ### architecture
571
+
572
+ Build the full workspace dependency architecture graph by aggregating direct dependencies across every source file.
573
+
574
+ ```
575
+ graph-it architecture [options]
576
+ ```
577
+
578
+ **Options:**
579
+
580
+ | Option | Default | Description |
581
+ |--------|---------|-------------|
582
+ | `--maxFiles <N>` | unlimited | Cap on the number of analyzed source files |
583
+ | `--workspace, -w` | auto-detected | Project root |
584
+ | `--format, -f` | `text` | Output format (`toon` recommended for large graphs; `mermaid` for diagrams) |
585
+
586
+ **Examples:**
587
+
588
+ ```bash
589
+ graph-it architecture
590
+ graph-it architecture --format mermaid
591
+ graph-it architecture --format toon
592
+ graph-it architecture --maxFiles 2000
593
+ ```
594
+
595
+ > **Use case:** Bootstrap AI-assisted exploration of an unfamiliar codebase — pipe `--format toon` into an LLM prompt for a token-efficient architecture snapshot.
596
+
597
+ ---
598
+
476
599
  ### check
477
600
 
478
601
  Find unused exported symbols (dead code) — either workspace-wide, scoped to a directory, or for a single file.
@@ -750,10 +873,14 @@ graph-it wiki [options]
750
873
  | Option | Default | Description |
751
874
  |--------|---------|-------------|
752
875
  | `--output <dir>` | `wiki` | Output directory (relative to workspace root, or absolute) |
876
+ | `--scope <rel-path>` | entire workspace | Restrict the wiki to a relative path within the workspace |
877
+ | `--exclude <pattern>` | — | Glob-like pattern to exclude (repeatable). Replaces the default exclusions when passed |
753
878
  | `--top <N>` | `10` | Number of top hub files to list in the index (1–50) |
754
879
  | `--format <fmt>` | `markdown` | Output summary format: `markdown`, `json`, `toon` |
755
880
  | `--workspace, -w` | auto-detected | Project root |
756
881
 
882
+ `tests/`, `dist/`, `*.test.ts` and similar are excluded automatically unless `--exclude` is passed.
883
+
757
884
  **Examples:**
758
885
 
759
886
  ```bash
@@ -761,6 +888,7 @@ graph-it wiki # write to ./wiki/
761
888
  graph-it wiki --output docs/wiki # write to ./docs/wiki/
762
889
  graph-it wiki --top 20 --format json # JSON summary, top 20 hubs
763
890
  graph-it wiki --output /tmp/preview # absolute output path
891
+ graph-it wiki --scope src/analyzer --exclude "**/*.spec.ts"
764
892
  ```
765
893
 
766
894
  **Output structure:**
@@ -786,6 +914,37 @@ Each article contains:
786
914
 
787
915
  ---
788
916
 
917
+ ### export
918
+
919
+ Export the dependency graph as a standalone, self-contained HTML file (no server required) — open it directly in a browser.
920
+
921
+ ```
922
+ graph-it export [scope] --format html [options]
923
+ ```
924
+
925
+ **Arguments:**
926
+
927
+ | Argument | Description |
928
+ |----------|-------------|
929
+ | `[scope]` | Optional relative path to scope the exported graph to |
930
+
931
+ **Options:**
932
+
933
+ | Option | Default | Description |
934
+ |--------|---------|-------------|
935
+ | `--output, -o <file>` | `graph.html` | Output HTML file path |
936
+ | `--format, -f` | — | Must be `html` — this is the only supported format for `export` |
937
+ | `--workspace, -w` | auto-detected | Project root |
938
+
939
+ **Examples:**
940
+
941
+ ```bash
942
+ graph-it export --format html
943
+ graph-it export src/analyzer --format html --output analyzer.html
944
+ ```
945
+
946
+ ---
947
+
789
948
  ### tool
790
949
 
791
950
  Invoke any of the 22 MCP analysis tools directly from the terminal — full MCP parity without a running server.
@@ -1020,7 +1179,7 @@ Requires an active internet connection and `npm` in `PATH`.
1020
1179
 
1021
1180
  ## MCP Tools Reference (via `graph-it tool`)
1022
1181
 
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)).
1182
+ 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
1183
 
1025
1184
  ### Tool Details
1026
1185
 
@@ -1464,13 +1623,16 @@ graph-it tool verify_dependency_usage \
1464
1623
 
1465
1624
  ## Tool Count: CLI vs MCP
1466
1625
 
1467
- The CLI exposes **22 tools** via `graph-it tool --list`, while the MCP server provides **23 tools** in total. This is by design:
1626
+ The CLI exposes **21 tools** via `graph-it tool --list`, while the MCP server provides **26 tools** in total. This is by design:
1468
1627
 
1469
1628
  | Context | Tool count | Notes |
1470
1629
  |---------|-----------|-------|
1471
- | `graph-it tool --list` | 22 | All analysis tools |
1472
- | MCP server (`graph-it serve`) | 23 | Same 22 + `set_workspace` |
1630
+ | `graph-it tool --list` | 21 | General-purpose analysis tools |
1631
+ | MCP server (`graph-it serve`) | 26 | Same 21 + 5 excluded (see below) |
1632
+
1633
+ The 5 tools excluded from `tool --list` fall into two groups:
1473
1634
 
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.
1635
+ - **`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.
1636
+ - **`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
1637
 
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.
1638
+ **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.13.6",
6
6
  "publisher": "magic5644",
7
7
  "author": {
8
8
  "name": "magic56"
@@ -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": {