depwire-cli 0.9.12 → 0.9.13
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 +0 -24
- package/dist/index.js +0 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,30 +78,6 @@ Or use directly with `npx`:
|
|
|
78
78
|
npx depwire-cli --help
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
## Telemetry
|
|
82
|
-
|
|
83
|
-
Depwire collects **anonymous usage data** to help us understand which features are most useful and prioritize development.
|
|
84
|
-
|
|
85
|
-
**What we collect:**
|
|
86
|
-
- Command name (e.g. `parse`, `mcp`, `viz`)
|
|
87
|
-
- Depwire version
|
|
88
|
-
- Operating system (mac/linux/windows)
|
|
89
|
-
- Node.js version
|
|
90
|
-
|
|
91
|
-
**What we never collect:**
|
|
92
|
-
- File paths or code content
|
|
93
|
-
- Repo names or URLs
|
|
94
|
-
- Usernames, emails, or any personal data
|
|
95
|
-
|
|
96
|
-
**To opt out**, set this environment variable:
|
|
97
|
-
```bash
|
|
98
|
-
DEPWIRE_NO_TELEMETRY=1 depwire parse
|
|
99
|
-
# Or add to your shell profile:
|
|
100
|
-
export DEPWIRE_NO_TELEMETRY=1
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Telemetry data is used solely to improve Depwire. [View our privacy policy](https://depwire.dev/privacy)
|
|
104
|
-
|
|
105
81
|
## Quick Start
|
|
106
82
|
|
|
107
83
|
### CLI Usage
|
package/dist/index.js
CHANGED
|
@@ -474,28 +474,6 @@ function printStats(snapshots) {
|
|
|
474
474
|
Overall Trend: ${trend}`);
|
|
475
475
|
}
|
|
476
476
|
|
|
477
|
-
// src/telemetry.ts
|
|
478
|
-
import os from "os";
|
|
479
|
-
var TELEMETRY_URL = "https://telemetry.depwire.dev/event";
|
|
480
|
-
async function trackCommand(command, version = "unknown") {
|
|
481
|
-
if (process.env.DEPWIRE_NO_TELEMETRY === "1" || process.env.DEPWIRE_NO_TELEMETRY === "true" || process.env.DO_NOT_TRACK === "1") {
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
const payload = {
|
|
485
|
-
command,
|
|
486
|
-
version,
|
|
487
|
-
os: os.platform(),
|
|
488
|
-
node: process.version
|
|
489
|
-
};
|
|
490
|
-
fetch(TELEMETRY_URL, {
|
|
491
|
-
method: "POST",
|
|
492
|
-
headers: { "Content-Type": "application/json" },
|
|
493
|
-
body: JSON.stringify(payload),
|
|
494
|
-
signal: AbortSignal.timeout(2e3)
|
|
495
|
-
}).catch(() => {
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
|
|
499
477
|
// src/index.ts
|
|
500
478
|
var __filename2 = fileURLToPath2(import.meta.url);
|
|
501
479
|
var __dirname2 = dirname2(__filename2);
|
|
@@ -504,7 +482,6 @@ var packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
|
|
|
504
482
|
var program = new Command();
|
|
505
483
|
program.name("depwire").description("Code cross-reference graph builder for TypeScript projects").version(packageJson.version);
|
|
506
484
|
program.command("parse").description("Parse a TypeScript project and build dependency graph").argument("[directory]", "Project directory to parse (defaults to current directory or auto-detected project root)").option("-o, --output <path>", "Output JSON file path", "depwire-output.json").option("--pretty", "Pretty-print JSON output").option("--stats", "Print summary statistics").option("--exclude <patterns...>", 'Glob patterns to exclude (e.g., "**/*.test.*" "dist/**")').option("--verbose", "Show detailed parsing progress").action(async (directory, options) => {
|
|
507
|
-
trackCommand("parse", packageJson.version);
|
|
508
485
|
const startTime = Date.now();
|
|
509
486
|
try {
|
|
510
487
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
@@ -544,7 +521,6 @@ Orphan Files (no cross-references): ${summary.orphanFiles.length}`);
|
|
|
544
521
|
}
|
|
545
522
|
});
|
|
546
523
|
program.command("query").description("Query impact analysis for a symbol").argument("<directory>", "Project directory").argument("<symbol-name>", "Symbol name to query").action(async (directory, symbolName) => {
|
|
547
|
-
trackCommand("query", packageJson.version);
|
|
548
524
|
try {
|
|
549
525
|
const projectRoot = resolve(directory);
|
|
550
526
|
const cacheFile = "depwire-output.json";
|
|
@@ -593,7 +569,6 @@ Total Transitive Dependents: ${impact.transitiveDependents.length}`);
|
|
|
593
569
|
}
|
|
594
570
|
});
|
|
595
571
|
program.command("viz").description("Launch interactive arc diagram visualization").argument("[directory]", "Project directory to visualize (defaults to current directory or auto-detected project root)").option("-p, --port <number>", "Server port", "3333").option("--no-open", "Don't auto-open browser").option("--exclude <patterns...>", 'Glob patterns to exclude (e.g., "**/*.test.*" "dist/**")').option("--verbose", "Show detailed parsing progress").action(async (directory, options) => {
|
|
596
|
-
trackCommand("viz", packageJson.version);
|
|
597
572
|
try {
|
|
598
573
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
599
574
|
console.log(`Parsing project: ${projectRoot}`);
|
|
@@ -616,7 +591,6 @@ program.command("viz").description("Launch interactive arc diagram visualization
|
|
|
616
591
|
}
|
|
617
592
|
});
|
|
618
593
|
program.command("temporal").description("Visualize how the dependency graph evolved over git history").argument("[directory]", "Project directory to analyze (defaults to current directory or auto-detected project root)").option("--commits <number>", "Number of commits to sample", "20").option("--strategy <type>", "Sampling strategy: even, weekly, monthly", "even").option("-p, --port <number>", "Server port", "3334").option("--output <path>", "Save snapshots to custom path (default: .depwire/temporal/)").option("--verbose", "Show progress for each commit being parsed").option("--stats", "Show summary statistics at end").action(async (directory, options) => {
|
|
619
|
-
trackCommand("temporal", packageJson.version);
|
|
620
594
|
try {
|
|
621
595
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
622
596
|
await runTemporalAnalysis(projectRoot, {
|
|
@@ -633,7 +607,6 @@ program.command("temporal").description("Visualize how the dependency graph evol
|
|
|
633
607
|
}
|
|
634
608
|
});
|
|
635
609
|
program.command("mcp").description("Start MCP server for AI coding tools").argument("[directory]", "Project directory to analyze (optional - auto-detects project root or use connect_repo tool to connect later)").action(async (directory) => {
|
|
636
|
-
trackCommand("mcp", packageJson.version);
|
|
637
610
|
try {
|
|
638
611
|
const state = createEmptyState();
|
|
639
612
|
let projectRootToConnect = null;
|
|
@@ -696,7 +669,6 @@ program.command("mcp").description("Start MCP server for AI coding tools").argum
|
|
|
696
669
|
}
|
|
697
670
|
});
|
|
698
671
|
program.command("docs").description("Generate comprehensive codebase documentation").argument("[directory]", "Project directory to document (defaults to current directory or auto-detected project root)").option("-o, --output <path>", "Output directory (default: .depwire/ inside project)").option("--format <type>", "Output format: markdown | json", "markdown").option("--gitignore", "Add .depwire/ to .gitignore automatically").option("--no-gitignore", "Don't modify .gitignore").option("--include <docs>", "Comma-separated list of docs to generate (default: all)", "all").option("--update", "Regenerate existing docs").option("--only <docs>", "Used with --update, regenerate only specific docs").option("--verbose", "Show generation progress").option("--stats", "Show generation statistics at the end").option("--exclude <patterns...>", 'Glob patterns to exclude (e.g., "**/*.test.*" "dist/**")').action(async (directory, options) => {
|
|
699
|
-
trackCommand("docs", packageJson.version);
|
|
700
672
|
const startTime = Date.now();
|
|
701
673
|
try {
|
|
702
674
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
@@ -794,7 +766,6 @@ ${pattern}
|
|
|
794
766
|
}
|
|
795
767
|
}
|
|
796
768
|
program.command("health").description("Analyze dependency architecture health (0-100 score)").argument("[directory]", "Project directory to analyze (defaults to current directory or auto-detected project root)").option("--json", "Output as JSON").option("--verbose", "Show detailed breakdown").action(async (directory, options) => {
|
|
797
|
-
trackCommand("health", packageJson.version);
|
|
798
769
|
try {
|
|
799
770
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
800
771
|
const startTime = Date.now();
|
|
@@ -818,7 +789,6 @@ program.command("health").description("Analyze dependency architecture health (0
|
|
|
818
789
|
}
|
|
819
790
|
});
|
|
820
791
|
program.command("dead-code").description("Identify dead code - symbols defined but never referenced").argument("[directory]", "Project directory to analyze (defaults to current directory or auto-detected project root)").option("--confidence <level>", "Minimum confidence level to show: high, medium, low (default: medium)", "medium").option("--json", "Output as JSON (for CI/automation)").option("--verbose", "Show detailed info for each dead symbol").option("--stats", "Show summary statistics").option("--include-tests", "Include test files in analysis").option("--include-low", "Shortcut for --confidence low").option("--debug", "Show debug information (exclusion stats)").action(async (directory, options) => {
|
|
821
|
-
trackCommand("dead-code", packageJson.version);
|
|
822
792
|
try {
|
|
823
793
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
824
794
|
const startTime = Date.now();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "depwire-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.13",
|
|
4
4
|
"description": "Code cross-reference visualization and AI context engine for TypeScript, JavaScript, Python, Go, Rust, and C. Zero native dependencies — works on Windows, macOS, and Linux.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|