devlens-mcp 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.
package/README.md CHANGED
@@ -17,18 +17,13 @@ DevLens keeps a single Chromium instance alive for the duration of your Claude C
17
17
 
18
18
  ## Setup
19
19
 
20
- ```bash
21
- npm install -g devlens-mcp
22
- npx playwright install chromium
23
- ```
24
-
25
- Then in your project root:
20
+ In your project root:
26
21
 
27
22
  ```bash
28
23
  npx devlens-mcp init
29
24
  ```
30
25
 
31
- This creates `.mcp.json`, `.claude/skills/devlens.md`, and `devlens.config.ts` automatically.
26
+ This creates `.mcp.json`, `.claude/skills/devlens.md`, and `devlens.config.ts`, and installs the Chromium browser automatically.
32
27
 
33
28
  Edit `devlens.config.ts` to map your source files to dev server routes, then restart Claude Code.
34
29
 
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  // src/cli/init.ts
4
4
  import { writeFileSync, mkdirSync, existsSync, readFileSync } from "fs";
5
5
  import { resolve, join } from "path";
6
+ import { spawnSync } from "child_process";
6
7
  var SKILL_CONTENT = `---
7
8
  name: devlens
8
9
  description: Real-time visual QA for frontend development. Auto-invoked when editing frontend files.
@@ -103,15 +104,19 @@ async function runInit() {
103
104
  } else {
104
105
  console.log(" \u2713 devlens.config.ts already exists \u2014 skipped");
105
106
  }
107
+ console.log(" Installing Chromium browser...");
108
+ const result = spawnSync("npx", ["playwright", "install", "chromium"], { stdio: "inherit", shell: true });
109
+ if (result.status === 0) {
110
+ console.log(" \u2713 Chromium installed");
111
+ } else {
112
+ console.warn(' \u26A0 Chromium install failed \u2014 run "npx playwright install chromium" manually');
113
+ }
106
114
  console.log("");
107
- console.log("DevLens initialized. Next steps:");
108
- console.log("");
109
- console.log(" 1. Install Chromium (one-time):");
110
- console.log(" npx playwright install chromium");
115
+ console.log("DevLens initialized. Next step:");
111
116
  console.log("");
112
- console.log(" 2. Edit devlens.config.ts to map your pages to routes");
117
+ console.log(" 1. Edit devlens.config.ts to map your pages to routes");
113
118
  console.log("");
114
- console.log(" 3. Restart Claude Code");
119
+ console.log(" 2. Restart Claude Code");
115
120
  console.log("");
116
121
  console.log(" Claude will then automatically screenshot your UI after every file write.");
117
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devlens-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Real-time visual feedback plugin for Claude Code frontend development",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",