figura-cli 0.10.2 → 0.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "figura-cli",
3
- "version": "0.10.2",
3
+ "version": "0.12.0",
4
4
  "description": "Command-line client for the Figura visualization SaaS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -48,11 +48,20 @@ greenfield.
48
48
 
49
49
  ## How to fig
50
50
 
51
- 1. **Check auth** — call **`figura_whoami`** to confirm you're connected to a
52
- team. Not connected? Tell the user to run `figura login`, or add the MCP:
53
- `claude mcp add figura -- figura mcp`. (Creating / publishing figs needs the
54
- `figs:write` scope on the team a read-only token passes whoami but fails the
55
- land step.)
51
+ 1. **Verify the destination team** — call **`figura_whoami`** (or
52
+ `figura whoami --json`) and check BOTH halves before generating anything:
53
+ - **Connected?** Not connected tell the user to run `figura link` (or
54
+ `figura login`), or add the MCP: `claude mcp add figura -- figura mcp`.
55
+ (Creating / publishing figs needs the `figs:write` scope on the team — a
56
+ read-only token passes whoami but fails the land step.)
57
+ - **Bound to THIS project?** Read `binding.source` in the response. `project`
58
+ (or an explicit `env` token) → proceed, and say where the fig will land
59
+ ("figging to team *slug*"). **`global` → STOP before generating**: nothing
60
+ pins this repo to that team — the fig would land on whatever team this
61
+ machine last logged into (this is exactly how mocks have ended up on the
62
+ wrong tenant). Tell the user to run `figura link` in this repo, then
63
+ re-verify. If the response has no `binding` field (older CLI/MCP), confirm
64
+ the team slug matches this project with the user before proceeding.
56
65
 
57
66
  2. **Default — build it yourself, with YOUR Claude.** Fetch the team's design
58
67
  system — `bunx figura-cli brand --json` — and hand-build the fig's HTML against
@@ -17,15 +17,21 @@ directory). Default to the current repo.
17
17
 
18
18
  ## Prerequisites
19
19
 
20
- The user needs the `figura` CLI authenticated once (`figura login`) the brand is
20
+ The user needs this repo linked to its Figura team (`figura link`; a global
21
+ `figura login` also works but is only a machine-wide fallback) — the brand is
21
22
  written to the team that token belongs to. If a `figura` **MCP server** is
22
23
  connected, prefer its `figura_set_brand` tool over the CLI. If neither the CLI nor
23
24
  `bunx figura-cli` is available, tell the user to install it
24
25
  (`curl -fsSL https://figura.so/install.sh | bash`) and stop.
25
26
 
26
- Confirm the target team first: `figura whoami` (or the `figura_whoami` tool). The
27
- brand is **team-wide and overwrites** the current one never push without showing
28
- the user what you're about to set and getting an explicit OK.
27
+ Verify the destination team first: `figura whoami --json` (or the `figura_whoami`
28
+ tool) and check `binding.source`. `project` (or an explicit `env` token) name
29
+ the team out loud and continue. **`global` STOP**: nothing pins this repo to
30
+ that team — you could read *another product's* brand as the baseline and
31
+ overwrite *their* profile with this repo's. Tell the user to run `figura link`
32
+ here first. The brand is **team-wide and overwrites** the current one — never
33
+ push without showing the user what you're about to set and getting an explicit
34
+ OK.
29
35
 
30
36
  ## Workflow
31
37