depwire-cli 0.9.14 → 0.9.15
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 +15 -0
- package/dist/index.js +30 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,6 +78,21 @@ 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 prioritize development.
|
|
84
|
+
|
|
85
|
+
**What we collect:** Command name, Depwire version, OS, Node.js version
|
|
86
|
+
|
|
87
|
+
**What we never collect:** File paths, code content, repo names, usernames, emails, or any personal data.
|
|
88
|
+
|
|
89
|
+
**To opt out:**
|
|
90
|
+
```bash
|
|
91
|
+
export DEPWIRE_NO_TELEMETRY=1
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
We also respect `DO_NOT_TRACK=1`. [Privacy Policy](https://depwire.dev/privacy)
|
|
95
|
+
|
|
81
96
|
## Quick Start
|
|
82
97
|
|
|
83
98
|
### CLI Usage
|
package/dist/index.js
CHANGED
|
@@ -474,6 +474,28 @@ 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
|
+
|
|
477
499
|
// src/index.ts
|
|
478
500
|
var __filename2 = fileURLToPath2(import.meta.url);
|
|
479
501
|
var __dirname2 = dirname2(__filename2);
|
|
@@ -482,6 +504,7 @@ var packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
|
|
|
482
504
|
var program = new Command();
|
|
483
505
|
program.name("depwire").description("Code cross-reference graph builder for TypeScript projects").version(packageJson.version);
|
|
484
506
|
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);
|
|
485
508
|
const startTime = Date.now();
|
|
486
509
|
try {
|
|
487
510
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
@@ -521,6 +544,7 @@ Orphan Files (no cross-references): ${summary.orphanFiles.length}`);
|
|
|
521
544
|
}
|
|
522
545
|
});
|
|
523
546
|
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);
|
|
524
548
|
try {
|
|
525
549
|
const projectRoot = resolve(directory);
|
|
526
550
|
const cacheFile = "depwire-output.json";
|
|
@@ -569,6 +593,7 @@ Total Transitive Dependents: ${impact.transitiveDependents.length}`);
|
|
|
569
593
|
}
|
|
570
594
|
});
|
|
571
595
|
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);
|
|
572
597
|
try {
|
|
573
598
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
574
599
|
console.log(`Parsing project: ${projectRoot}`);
|
|
@@ -591,6 +616,7 @@ program.command("viz").description("Launch interactive arc diagram visualization
|
|
|
591
616
|
}
|
|
592
617
|
});
|
|
593
618
|
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);
|
|
594
620
|
try {
|
|
595
621
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
596
622
|
await runTemporalAnalysis(projectRoot, {
|
|
@@ -607,6 +633,7 @@ program.command("temporal").description("Visualize how the dependency graph evol
|
|
|
607
633
|
}
|
|
608
634
|
});
|
|
609
635
|
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);
|
|
610
637
|
try {
|
|
611
638
|
const state = createEmptyState();
|
|
612
639
|
let projectRootToConnect = null;
|
|
@@ -669,6 +696,7 @@ program.command("mcp").description("Start MCP server for AI coding tools").argum
|
|
|
669
696
|
}
|
|
670
697
|
});
|
|
671
698
|
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);
|
|
672
700
|
const startTime = Date.now();
|
|
673
701
|
try {
|
|
674
702
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
@@ -766,6 +794,7 @@ ${pattern}
|
|
|
766
794
|
}
|
|
767
795
|
}
|
|
768
796
|
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);
|
|
769
798
|
try {
|
|
770
799
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
771
800
|
const startTime = Date.now();
|
|
@@ -789,6 +818,7 @@ program.command("health").description("Analyze dependency architecture health (0
|
|
|
789
818
|
}
|
|
790
819
|
});
|
|
791
820
|
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);
|
|
792
822
|
try {
|
|
793
823
|
const projectRoot = directory ? resolve(directory) : findProjectRoot();
|
|
794
824
|
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.15",
|
|
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": {
|