@runkids/figlens 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 +36 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/runkids/figlens/main/assets/logo.png" alt="figlens" width="320">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# @runkids/figlens
|
|
6
|
+
|
|
7
|
+
Build UI anywhere. Just bring a `.fig`.
|
|
8
|
+
|
|
9
|
+
Give your AI coding agent a saved Figma file (**File > Save local copy**). figlens reads the design offline, on your laptop, a CI runner or a cloud AI server. No Figma installation, login or API key needed.
|
|
10
|
+
|
|
11
|
+
This package runs the native `figlens` binary: the first run downloads the release build for your platform, checks it against the release's `SHA256SUMS` and caches it. Node.js 18 or later; macOS, Linux and Windows.
|
|
12
|
+
|
|
13
|
+
## Use it
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx @runkids/figlens tree design.fig --depth 2 # pages and frames, with their ids
|
|
17
|
+
npx @runkids/figlens nodes design.fig 12:345 > frame.json # a frame as Figma REST JSON
|
|
18
|
+
npx @runkids/figlens bundle design.fig 12:345 frame.zip # nodes, variables, assets and a reference render
|
|
19
|
+
npx @runkids/figlens export design.fig 12:345 frame.png --scale 2
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or install it once: `npm i -g @runkids/figlens`, then run `figlens`.
|
|
23
|
+
|
|
24
|
+
## MCP server
|
|
25
|
+
|
|
26
|
+
Let your agent call `tree`, `nodes`, `variables`, `bundle` and `export` as tools:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{ "mcpServers": { "figlens": { "command": "npx", "args": ["-y", "@runkids/figlens", "mcp"] } } }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## More
|
|
33
|
+
|
|
34
|
+
Documentation, the design bundle layout, accuracy measurements and other install methods (Homebrew, install scripts): [github.com/runkids/figlens](https://github.com/runkids/figlens).
|
|
35
|
+
|
|
36
|
+
MIT license.
|