@cruxhive/cli 0.3.1 → 0.4.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/bin/cruxhive.js CHANGED
@@ -8,10 +8,11 @@ const { ui } = require("../lib/ui");
8
8
  const { index } = require("../lib/index");
9
9
  const { propose } = require("../lib/propose");
10
10
  const { review } = require("../lib/review");
11
+ const { stats } = require("../lib/stats");
11
12
 
12
13
  const [, , cmd, ...args] = process.argv;
13
14
 
14
- const commands = { init, sync, health, ui, index, propose, review };
15
+ const commands = { init, sync, health, ui, index, propose, review, stats };
15
16
 
16
17
  if (!cmd || cmd === "--help" || cmd === "-h") {
17
18
  console.log(`cruxhive v${require("../package.json").version}
@@ -25,6 +26,7 @@ Commands:
25
26
  review Interactively approve or reject pending proposals
26
27
  sync Sync org-layer context from the configured remote
27
28
  health Show knowledge base health summary
29
+ stats Usage observability — searches, hit rate, gaps, by AI tool
28
30
  ui Open the approval queue dashboard (localhost:3847)
29
31
 
30
32
  Options:
package/lib/stats.js ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ const { spawnSync } = require("child_process");
4
+
5
+ async function stats(args) {
6
+ const r = spawnSync("cruxhive-stats", args, { stdio: "inherit" });
7
+ if (r.error) {
8
+ console.error("\n \x1b[31m✗\x1b[0m cruxhive-stats not found.");
9
+ console.error(" Install: \x1b[36muv tool install cruxhive-mcp\x1b[0m\n");
10
+ process.exit(1);
11
+ }
12
+ if (r.status !== 0) process.exit(r.status);
13
+ }
14
+
15
+ module.exports = { stats };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cruxhive/cli",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "CruxHive — team AI knowledge governance layer",
5
5
  "license": "MIT",
6
6
  "repository": {