depwire-cli 0.7.0 → 0.7.1
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.
- package/README.md +81 -2
- package/dist/index.js +1 -0
- package/dist/viz/public/temporal.js +33 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,8 +40,8 @@ Depwire fixes this by giving AI tools a complete dependency graph of your codeba
|
|
|
40
40
|
- **Live graph, always current** — edit a file and the dependency map updates in real-time. No re-indexing, no waiting.
|
|
41
41
|
- **Works locally, stays private** — zero cloud accounts, zero data leaving your machine. Just `npm install` and go.
|
|
42
42
|
|
|
43
|
-
###
|
|
44
|
-
Depwire isn't just a pretty graph. It's a full context engine with
|
|
43
|
+
### 14 MCP Tools, Not Just Visualization
|
|
44
|
+
Depwire isn't just a pretty graph. It's a full context engine with 14 tools that AI assistants call autonomously — architecture summaries, dependency tracing, symbol search, file context, health scores, temporal evolution, and more. The AI decides which tool to use based on your question.
|
|
45
45
|
|
|
46
46
|
## Installation
|
|
47
47
|
|
|
@@ -66,10 +66,15 @@ depwire viz
|
|
|
66
66
|
depwire parse
|
|
67
67
|
depwire docs
|
|
68
68
|
depwire health
|
|
69
|
+
depwire temporal
|
|
69
70
|
|
|
70
71
|
# Or specify a directory explicitly
|
|
71
72
|
npx depwire-cli viz ./my-project
|
|
72
73
|
npx depwire-cli parse ./my-project
|
|
74
|
+
npx depwire-cli temporal ./my-project
|
|
75
|
+
|
|
76
|
+
# Temporal visualization options
|
|
77
|
+
npx depwire-cli temporal --commits 20 --strategy monthly --verbose --stats
|
|
73
78
|
|
|
74
79
|
# Exclude test files and node_modules
|
|
75
80
|
npx depwire-cli parse --exclude "**/*.test.*" "**/node_modules/**"
|
|
@@ -134,6 +139,7 @@ Settings → Features → Experimental → Enable MCP → Add Server:
|
|
|
134
139
|
| `get_project_docs` | Retrieve auto-generated codebase documentation |
|
|
135
140
|
| `update_project_docs` | Regenerate documentation on demand |
|
|
136
141
|
| `get_health_score` | Get 0-100 dependency health score with recommendations |
|
|
142
|
+
| `get_temporal_graph` | Show how the graph evolved over git history |
|
|
137
143
|
|
|
138
144
|
## Supported Languages
|
|
139
145
|
|
|
@@ -179,6 +185,41 @@ Opens an interactive arc diagram in your browser:
|
|
|
179
185
|
- Export as SVG or PNG
|
|
180
186
|
- **Port collision handling** — Automatically finds an available port if default is in use
|
|
181
187
|
|
|
188
|
+
## Temporal Graph
|
|
189
|
+
|
|
190
|
+
Visualize how your codebase architecture evolved over git history. Scrub through time with an interactive timeline slider.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Auto-detects project root
|
|
194
|
+
depwire temporal
|
|
195
|
+
|
|
196
|
+
# Sample 20 commits with monthly snapshots
|
|
197
|
+
depwire temporal --commits 20 --strategy monthly
|
|
198
|
+
|
|
199
|
+
# Verbose mode with detailed progress
|
|
200
|
+
depwire temporal --verbose --stats
|
|
201
|
+
|
|
202
|
+
# Custom port
|
|
203
|
+
depwire temporal --port 3335
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Options:**
|
|
207
|
+
- `--commits <number>` — Number of commits to sample (default: 20)
|
|
208
|
+
- `--strategy <type>` — Sampling strategy: `even`, `weekly`, `monthly` (default: `even`)
|
|
209
|
+
- `-p, --port <number>` — Server port (default: 3334)
|
|
210
|
+
- `--output <path>` — Save snapshots to custom path (default: `.depwire/temporal/`)
|
|
211
|
+
- `--verbose` — Show progress for each commit being parsed
|
|
212
|
+
- `--stats` — Show summary statistics at end
|
|
213
|
+
|
|
214
|
+
Opens an interactive temporal visualization in your browser:
|
|
215
|
+
- Timeline slider showing all sampled commits
|
|
216
|
+
- Arc diagram morphing between snapshots
|
|
217
|
+
- Play/pause animation with speed controls (0.5×, 1×, 2×)
|
|
218
|
+
- Statistics panel with growth deltas
|
|
219
|
+
- Evolution chart tracking files/symbols/edges over time
|
|
220
|
+
- Auto-zoom to fit all arcs on snapshot change
|
|
221
|
+
- Search to highlight specific files across time
|
|
222
|
+
|
|
182
223
|
## How It Works
|
|
183
224
|
|
|
184
225
|
1. **Parser** — tree-sitter extracts every symbol and reference
|
|
@@ -360,6 +401,44 @@ depwire health --json
|
|
|
360
401
|
|
|
361
402
|
Health history is stored in `.depwire/health-history.json` (last 50 checks).
|
|
362
403
|
|
|
404
|
+
### `depwire temporal [directory]`
|
|
405
|
+
|
|
406
|
+
Visualize how the dependency graph evolved over git history.
|
|
407
|
+
|
|
408
|
+
**Directory argument is optional** — Auto-detects project root.
|
|
409
|
+
|
|
410
|
+
**Options:**
|
|
411
|
+
- `--commits <number>` — Number of commits to sample (default: 20)
|
|
412
|
+
- `--strategy <type>` — Sampling strategy: `even` (every Nth), `weekly`, `monthly` (default: `even`)
|
|
413
|
+
- `-p, --port <number>` — Server port (default: 3334)
|
|
414
|
+
- `--output <path>` — Save snapshots to custom path (default: `.depwire/temporal/`)
|
|
415
|
+
- `--verbose` — Show progress for each commit being parsed
|
|
416
|
+
- `--stats` — Show summary statistics at end
|
|
417
|
+
|
|
418
|
+
**Examples:**
|
|
419
|
+
```bash
|
|
420
|
+
# Auto-detect and analyze 20 commits
|
|
421
|
+
depwire temporal
|
|
422
|
+
|
|
423
|
+
# Sample 50 commits with monthly snapshots
|
|
424
|
+
depwire temporal --commits 50 --strategy monthly
|
|
425
|
+
|
|
426
|
+
# Verbose mode with stats
|
|
427
|
+
depwire temporal --verbose --stats
|
|
428
|
+
|
|
429
|
+
# Custom output directory
|
|
430
|
+
depwire temporal --output ./temp-snapshots
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
**Output:**
|
|
434
|
+
- Interactive browser visualization at `http://127.0.0.1:3334`
|
|
435
|
+
- Timeline slider to scrub through git history
|
|
436
|
+
- Arc diagram morphing between snapshots
|
|
437
|
+
- Growth statistics showing files/symbols/edges evolution
|
|
438
|
+
- Auto-zoom to fit full diagram on each snapshot change
|
|
439
|
+
|
|
440
|
+
Snapshots are cached in `.depwire/temporal/` for fast re-rendering.
|
|
441
|
+
|
|
363
442
|
### Error Handling
|
|
364
443
|
|
|
365
444
|
Depwire gracefully handles parse errors:
|
package/dist/index.js
CHANGED
|
@@ -418,6 +418,7 @@ async function runTemporalAnalysis(projectDir, options) {
|
|
|
418
418
|
if (hadStash) {
|
|
419
419
|
await popStash(projectDir);
|
|
420
420
|
}
|
|
421
|
+
snapshots.reverse();
|
|
421
422
|
console.log(`\u2713 Created ${snapshots.length} snapshots`);
|
|
422
423
|
if (options.stats) {
|
|
423
424
|
printStats(snapshots);
|
|
@@ -352,6 +352,39 @@ function renderArcDiagram(snapshot) {
|
|
|
352
352
|
});
|
|
353
353
|
}, 1000);
|
|
354
354
|
}
|
|
355
|
+
|
|
356
|
+
fitToViewport(zoom, width, height, margin);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
function fitToViewport(zoom, width, height, margin) {
|
|
360
|
+
setTimeout(() => {
|
|
361
|
+
try {
|
|
362
|
+
const bounds = g.node().getBBox();
|
|
363
|
+
|
|
364
|
+
if (!bounds || bounds.width === 0 || bounds.height === 0) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
const fullWidth = bounds.width;
|
|
369
|
+
const fullHeight = bounds.height;
|
|
370
|
+
|
|
371
|
+
const padding = 0.9;
|
|
372
|
+
const scale = Math.min(
|
|
373
|
+
(width * padding) / fullWidth,
|
|
374
|
+
(height * padding) / fullHeight,
|
|
375
|
+
1.0
|
|
376
|
+
);
|
|
377
|
+
|
|
378
|
+
svg.transition()
|
|
379
|
+
.duration(750)
|
|
380
|
+
.call(
|
|
381
|
+
zoom.transform,
|
|
382
|
+
d3.zoomIdentity.scale(scale)
|
|
383
|
+
);
|
|
384
|
+
} catch (e) {
|
|
385
|
+
console.warn('Could not fit to viewport:', e);
|
|
386
|
+
}
|
|
387
|
+
}, 100);
|
|
355
388
|
}
|
|
356
389
|
|
|
357
390
|
function highlightConnections(filePath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "depwire-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Code cross-reference visualization and AI context engine for TypeScript, JavaScript, Python, and Go. Zero native dependencies — works on Windows, macOS, and Linux.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|