figma-lupa 0.2.0 → 0.2.1

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
@@ -97,18 +97,28 @@ The full format is in [docs/FORMAT.md](docs/FORMAT.md).
97
97
  Requirements: Node 20+ and Figma (desktop app or browser).
98
98
 
99
99
  ```bash
100
- git clone <this repo> figma-lupa && cd figma-lupa
101
- npm ci && npm run build
102
- npm link # puts `lupa` on your PATH
103
- mkdir -p ~/.claude/skills && cp -r skills/figma-implement ~/.claude/skills/
100
+ npm install -g figma-lupa
101
+ lupa setup
104
102
  ```
105
103
 
106
- 1. **Import the plugin.** In any Figma file, go to *Plugins → Development → Import plugin from manifest…* and pick `plugin/manifest.json`.
107
- 2. **The skill** you just copied teaches Claude the commands and the output format. It loads only for Figma work, so Lupa costs no context in other sessions.
108
- 3. **Browser for `compare --url`:** Lupa uses Playwright. It looks for `LUPA_BROWSER`, then Playwright's browsers, then Google Chrome. If you have none, run `npx playwright install chromium`.
104
+ `lupa setup` does the rest and says what it did. You can run it again at any time.
105
+
106
+ 1. **The skill:** it links Lupa's skill into `~/.claude/skills` (or `$CLAUDE_CONFIG_DIR/skills`). The skill teaches Claude the commands and the output format. It loads only for Figma work, so Lupa costs no context in other sessions.
107
+ 2. **The plugin:** it prints the path of the plugin's manifest. Import it once: in any Figma file, *Plugins → Development → Import plugin from manifest…*.
108
+ 3. **Browser for `compare --url`:** it checks for one. Lupa looks for `LUPA_BROWSER`, then Playwright's browsers, then Google Chrome. If you have none, run `npx playwright install chromium`.
109
109
 
110
110
  **Optional MCP server**, for clients without a shell: `claude mcp add --scope user lupa -- lupa mcp`.
111
111
 
112
+ ## Updating
113
+
114
+ ```bash
115
+ lupa update
116
+ ```
117
+
118
+ Then close the Lupa plugin in Figma and run it again. The skill and the plugin's manifest stay at the same paths, so there is nothing to copy or re-import. The next `lupa` command replaces the background hub with the new version.
119
+
120
+ Lupa asks npm for a newer version once a day, and a command mentions it when there is one. Set `LUPA_NO_UPDATE_CHECK=1` to turn this off.
121
+
112
122
  ## Daily use
113
123
 
114
124
  1. Open the design in Figma, run *Plugins → Development → Lupa*, and keep its small window open.
@@ -137,6 +147,7 @@ A target is a Figma URL (in quotes), node ids like `12:34`, or nothing for the c
137
147
  ## Troubleshooting
138
148
 
139
149
  - **"No Figma file is connected":** run the plugin in the file and keep its window open. After updating Lupa, run the plugin again.
150
+ - **"the Lupa plugin … is version X":** Figma runs the old plugin code until you close the plugin and run it again. If it keeps the old version, Figma loads it from an old folder: run `lupa setup` and import the manifest it shows.
140
151
  - **"used Figma's SVG export":** Figma stops rendering PNGs while its window is hidden or covered, so Lupa rendered the SVG export in Chromium instead. Layout and text match; blur, some newer effects and occasionally a stroke can be missing. For an exact render, bring Figma to the front and run the command again.
141
152
  - **Port in use:** set `LUPA_PORT`, change the port in `plugin/src/ui.html` and `plugin/manifest.json`, and rebuild.
142
153
  - **Logs:** the hub logs every request to `$TMPDIR/lupa/hub.log`. Set `LUPA_DEBUG=1` for bridge events.