depwire-cli 0.7.1 → 0.9.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.
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ analyzeDeadCode,
3
4
  buildGraph,
4
5
  calculateHealthScore,
5
6
  checkoutCommit,
@@ -26,7 +27,7 @@ import {
26
27
  stashChanges,
27
28
  updateFileInGraph,
28
29
  watchProject
29
- } from "./chunk-65H7HCM4.js";
30
+ } from "./chunk-MGMDHXPB.js";
30
31
 
31
32
  // src/index.ts
32
33
  import { Command } from "commander";
@@ -787,4 +788,32 @@ program.command("health").description("Analyze dependency architecture health (0
787
788
  process.exit(1);
788
789
  }
789
790
  });
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").action(async (directory, options) => {
792
+ try {
793
+ const projectRoot = directory ? resolve(directory) : findProjectRoot();
794
+ const startTime = Date.now();
795
+ const parsedFiles = await parseProject(projectRoot);
796
+ const graph = buildGraph(parsedFiles);
797
+ const confidence = options.includeLow ? "low" : options.confidence || "medium";
798
+ const report = analyzeDeadCode(graph, projectRoot, {
799
+ confidence,
800
+ includeTests: options.includeTests || false,
801
+ verbose: options.verbose || false,
802
+ stats: options.stats || false,
803
+ json: options.json || false
804
+ });
805
+ if (options.json) {
806
+ console.log(JSON.stringify(report, null, 2));
807
+ }
808
+ const totalTime = Date.now() - startTime;
809
+ if (!options.json) {
810
+ console.log(`
811
+ Analysis completed in ${(totalTime / 1e3).toFixed(2)}s
812
+ `);
813
+ }
814
+ } catch (err) {
815
+ console.error("Error analyzing dead code:", err);
816
+ process.exit(1);
817
+ }
818
+ });
790
819
  program.parse();
@@ -6,7 +6,7 @@ import {
6
6
  startMcpServer,
7
7
  updateFileInGraph,
8
8
  watchProject
9
- } from "./chunk-65H7HCM4.js";
9
+ } from "./chunk-MGMDHXPB.js";
10
10
 
11
11
  // src/mcpb-entry.ts
12
12
  import { resolve } from "path";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "depwire-cli",
3
- "version": "0.7.1",
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.",
3
+ "version": "0.9.0",
4
+ "description": "Code cross-reference visualization and AI context engine for TypeScript, JavaScript, Python, Go, and Rust. Zero native dependencies — works on Windows, macOS, and Linux.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "depwire": "dist/index.js"
@@ -31,7 +31,7 @@
31
31
  "cross-reference"
32
32
  ],
33
33
  "author": "Atef Ataya (https://www.youtube.com/@atefataya)",
34
- "license": "BSL-1.1",
34
+ "license": "BUSL-1.1",
35
35
  "repository": {
36
36
  "type": "git",
37
37
  "url": "git+https://github.com/depwire/depwire.git"
@@ -51,6 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@modelcontextprotocol/sdk": "1.26.0",
54
+ "chalk": "^5.6.2",
54
55
  "chokidar": "5.0.0",
55
56
  "commander": "14.0.3",
56
57
  "express": "5.2.1",