figura-cli 0.3.1 → 0.5.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
@@ -41,8 +41,51 @@ Resolution precedence:
41
41
 
42
42
  | Value | Order |
43
43
  | ------ | ------------------------------------------------------ |
44
- | token | `FIGURA_TOKEN` env → `--token` flag → config file |
45
- | apiUrl | `FIGURA_API_URL` env → `--api-url` flag → config → default `https://figura.so` |
44
+ | token | `FIGURA_TOKEN` env → `--token` flag → project `.figura/config.json` → global `~/.figura/config.json` |
45
+ | apiUrl | `FIGURA_API_URL` env → `--api-url` flag → project config → global config → default `https://figura.so` |
46
+
47
+ ### Multiple teams — one per project
48
+
49
+ A **project** config (`.figura/config.json`, found by walking up from the current
50
+ directory) overrides the global one, so each repo can use its own team — with its
51
+ own brand and company brain:
52
+
53
+ ```bash
54
+ cd ~/workspace/pano-fm && figura login --project # pin this repo to Pano's team
55
+ cd ~/workspace/sha7n && figura login --project # pin this repo to sha7n's team
56
+ ```
57
+
58
+ Now every `figura`/`fig`/`brand` command (and `figura mcp` — so Claude Code too)
59
+ resolves the team from the nearest `.figura/config.json`. The file holds a live
60
+ token, so add `.figura/` to the repo's `.gitignore`.
61
+
62
+ ## Claude Code skill
63
+
64
+ Install the bundled **`/fig`** skill so Claude Code can generate on-brand figs in
65
+ your team from any project:
66
+
67
+ ```bash
68
+ figura skill install # → ~/.claude/skills/figura-fig (global)
69
+ figura skill install --project # → ./.claude/skills (this repo only)
70
+ ```
71
+
72
+ Re-run it after upgrading `figura-cli` to update the skill — the skill version is
73
+ bundled with the CLI, so they stay in lockstep. Then, in Claude Code, just ask it
74
+ to mock up a screen or build a fig.
75
+
76
+ ## MCP server
77
+
78
+ The Figura MCP server ships inside the CLI — no separate install. Add it to
79
+ Claude Code with:
80
+
81
+ ```bash
82
+ claude mcp add figura -- figura mcp
83
+ ```
84
+
85
+ `figura mcp` serves the same tools as the standalone `figura-mcp` package, but
86
+ resolves your token from the nearest `.figura/config.json` (see _Multiple teams_
87
+ above), so the MCP uses the right team per project automatically. (The
88
+ `bunx -y figura-mcp` form still works if you'd rather not install the CLI.)
46
89
 
47
90
  ## Usage
48
91