@veolab/discoverylab 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. package/README.md +2 -18
  2. package/dist/cli.js +30 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -34,26 +34,10 @@ flowchart LR
34
34
 
35
35
  ## Quick Start
36
36
 
37
- **Install:**
38
37
  ```bash
39
38
  npm install -g @veolab/discoverylab
40
- ```
41
-
42
- **Configure** `~/.claude.json`:
43
- ```json
44
- {
45
- "mcpServers": {
46
- "discoverylab": {
47
- "command": "npx",
48
- "args": ["-y", "@veolab/discoverylab@latest", "mcp"]
49
- }
50
- }
51
- }
52
- ```
53
-
54
- **Run:**
55
- ```bash
56
- discoverylab serve
39
+ discoverylab install # configures Claude Code MCP
40
+ discoverylab serve # opens web UI
57
41
  ```
58
42
 
59
43
  ## Features
package/dist/cli.js CHANGED
@@ -76,6 +76,36 @@ program.command("init").description("Initialize DiscoveryLab data directories").
76
76
  process.exit(1);
77
77
  }
78
78
  });
79
+ program.command("install").description("Install DiscoveryLab as Claude Code MCP server").action(async () => {
80
+ const { homedir } = await import("os");
81
+ const { existsSync, readFileSync, writeFileSync } = await import("fs");
82
+ const { join } = await import("path");
83
+ const claudeConfigPath = join(homedir(), ".claude.json");
84
+ console.log(chalk.cyan("\n Installing DiscoveryLab MCP...\n"));
85
+ try {
86
+ let config = {};
87
+ if (existsSync(claudeConfigPath)) {
88
+ const content = readFileSync(claudeConfigPath, "utf-8");
89
+ config = JSON.parse(content);
90
+ }
91
+ if (!config.mcpServers) {
92
+ config.mcpServers = {};
93
+ }
94
+ config.mcpServers.discoverylab = {
95
+ command: "npx",
96
+ args: ["-y", "@veolab/discoverylab@latest", "mcp"]
97
+ };
98
+ writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2));
99
+ console.log(chalk.green(" \u2713 Added to ~/.claude.json"));
100
+ console.log();
101
+ console.log(chalk.white(" Restart Claude Code to activate."));
102
+ console.log(chalk.gray(" Or run: discoverylab serve"));
103
+ console.log();
104
+ } catch (error) {
105
+ console.error(chalk.red(` Failed to install: ${error}`));
106
+ process.exit(1);
107
+ }
108
+ });
79
109
  program.command("mcp").description("Run as MCP server (for Claude Code integration)").action(async () => {
80
110
  try {
81
111
  const { getDatabase } = await import("./db-IWIL65EX.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veolab/discoverylab",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "AI-powered app testing & evidence generator - Claude Code Plugin",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",