@ttsalpha/mirra 1.0.0 → 1.2.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/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # Mirra
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/ttsalpha/mirra/refs/heads/main/assets/icon.png" width="96" height="96" alt="" />
3
+ </p>
4
+
5
+ <h1 align="center">Mirra</h1>
2
6
 
3
7
  Two-way MCP server for Figma: an agent reads a design and renders one back through the
4
8
  Figma Plugin API, so it needs no REST token and has no per-month call limit.
@@ -20,19 +24,19 @@ second shape.
20
24
 
21
25
  ## Tools
22
26
 
23
- | Tool | What it does |
24
- | --------------------- | -------------------------------------------------------------------------------- |
25
- | `mirra_render` | Build a whole screen from one declarative tree |
26
- | `mirra_read` | Read the selection, or a node, back as that same tree |
27
- | `mirra_patch` | `set` / `append` / `replace` / `remove` / `move` by stable key, as one undo step |
28
- | `mirra_find` | Locate layers by name, kind or key, and select them |
29
- | `mirra_pages` | List the pages, or switch to one |
30
- | `mirra_screenshot` | Export a layer as PNG and hand the image back |
31
- | `mirra_tokens` | List variables and styles, with the `$name` a tree refers to |
32
- | `mirra_define_tokens` | Create or update variables, modes, aliases and paint/text/effect styles |
33
- | `mirra_export_assets` | Write layers to disk as PNG or SVG |
34
- | `mirra_ping` | Check the connection and report the open file |
35
- | `mirra_exec` | Run Plugin API code; see **Running arbitrary code** below |
27
+ | Tool | What it does |
28
+ | --------------------- | --------------------------------------------------------------------------------------- |
29
+ | `mirra_render` | Build a whole screen from one declarative tree |
30
+ | `mirra_read` | Read the selection, or a node, back as that same tree |
31
+ | `mirra_patch` | `set` / `append` / `replace` / `move` / `component` / `remove` by key, as one undo step |
32
+ | `mirra_find` | Locate layers by name, kind or key, and select them |
33
+ | `mirra_pages` | List the pages, add one, or switch to one |
34
+ | `mirra_screenshot` | Export a layer as PNG and hand the image back |
35
+ | `mirra_tokens` | List variables and styles, with the `$name` a tree refers to |
36
+ | `mirra_define_tokens` | Create or update variables, modes, aliases and paint/text/effect styles |
37
+ | `mirra_export_assets` | Write layers to disk as PNG or SVG |
38
+ | `mirra_ping` | Check the connection and report the open file |
39
+ | `mirra_exec` | Run Plugin API code; see **Running arbitrary code** below |
36
40
 
37
41
  The tree mirrors flexbox: `layout: {dir, gap, pad, justify, align}`, and `w`/`h` take a
38
42
  number, `"fill"` or `"hug"`; a frame with a layout hugs its content by default. Node types
@@ -53,8 +57,9 @@ handing back a data URI.
53
57
  npx @ttsalpha/mirra init
54
58
  ```
55
59
 
56
- That copies the plugin to `~/.mirra/plugin` and registers the server with every client it
57
- finds: Claude Desktop, Cursor and VS Code by merging one entry into their config, Claude
60
+ That copies the plugin to `~/.mirra/plugin`, the server to `~/.mirra/server` when it is
61
+ running from an npx cache that npm may clear later, and registers the server with every
62
+ client it finds: Claude Desktop, Cursor and VS Code by merging one entry into their config, Claude
58
63
  Code through its own CLI. Each file is backed up beside itself first, and `--no-config`
59
64
  skips all of it. The command is written with the real path of the Node binary that ran it,
60
65
  because a version manager puts `node` behind a path that changes with every shell and a
@@ -103,7 +108,7 @@ the tool when `MIRRA_ALLOW_EXEC` is set, and the plugin only runs it while **All
103
108
  execution** is ticked in its panel. The tick resets every time the plugin runs.
104
109
 
105
110
  ```sh
106
- claude mcp add -s user mirra-exec -e MIRRA_ALLOW_EXEC=1 -- npx -y @ttsalpha/mirra serve
111
+ claude mcp add -s user Mirra-exec -e MIRRA_ALLOW_EXEC=1 -- npx -y @ttsalpha/mirra serve
107
112
  ```
108
113
 
109
114
  The socket listens on loopback and refuses any browser origin other than Figma's, so a page