Setup
This guide takes you from nothing to a project wired for the aqua-cli Figma→code workflow. Follow the steps in order.
Prerequisites
| Requirement | Why | Check |
|---|---|---|
| Node.js ≥ 24 | aqua-cli and its tooling target Node 24 | node -v |
| npm | runs npx and reads your registry auth | npm -v |
| Claude Code | the workflow runs inside it | claude --version |
A GitHub account with access to the @aquaring packages | aqua-cli is published privately to GitHub Packages | — |
| The Figma desktop app | the workflow reads designs via the Figma desktop MCP server (no API key) | the app opens and you can log in |
Step 1 — Authenticate to GitHub Packages
aqua-cli is published to GitHub Packages (a private, scoped registry), not the
public npm registry. Installing it needs both a registry mapping and an auth
token — the registry line alone returns 401.
-
Create a GitHub Personal Access Token (classic) with the
read:packagesscope: GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic) → Generate new token. -
Add both lines to your user
~/.npmrc(keeps the token off the project):@aquaring:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT -
Verify auth works:
npm view @aquaring/aqua-cli versionA version number means you're authenticated. A
401/403means the token is missing, expired, or lacksread:packages.
Step 2 — Enable the Figma desktop MCP server
The workflow's fetch scripts read designs through the Figma desktop app's local MCP server — no API key or personal access token is needed.
- Install and open the Figma desktop app (not the browser) and log in.
- Enable Figma → Preferences → "Enable local MCP Server". The server
listens at
http://127.0.0.1:3845/mcp. - Open the design file you'll be building from. The MCP server only sees the currently open file — keep it open while working.
Step 3 — Install the kit into your project
Install the CLI globally, then run init from the root of the project you
want to set up:
npm install -g @aquaring/aqua-cli
aqua-cli init
init copies the workflow kit and merges into your shared files:
- Copies:
.claude/,scripts/,development-docs/,PROMPT.md, and theWORKFLOW-*.mdplaybooks. - Merges (idempotent, reversible): appends a marked block to
CLAUDE.md, adds the Playwright and Figma (desktop MCP) servers to.mcp.json, addsFIGMA_MCP_URLto.env.local, and ensures.env.localis listed in.gitignore(creating the file if needed). - Writes a
.aqua-cli.jsonmanifest recording exactly what it added.
Existing files are left untouched unless you pass --force. See
CLI Usage for --force, update, and uninstall.
Step 4 — Confirm the MCP endpoint (usually nothing to do)
init created (or appended to) .env.local with the standard desktop MCP
endpoint:
FIGMA_MCP_URL=http://127.0.0.1:3845/mcp
- The default is correct for a normal Figma desktop install — only change it if your desktop app serves MCP elsewhere.
- The Figma scripts read from
.env.localspecifically — not.env— and fall back to the default endpoint when the variable is absent. .env.localstays in.gitignore(added byinit). Confirm withgit check-ignore .env.local(it should echo the path).
Step 5 — Open in Claude Code and confirm the wiring
-
Open the project in Claude Code. It picks up the merged
.mcp.json, which registers the Playwright MCP server used for live measurement during verification (installed on demand vianpx— no separate install step) and the Figma MCP server (the desktop app's local endpoint). -
Sanity-check the install:
cat .aqua-cli.json # manifest of what aqua-cli added
ls .claude scripts development-docs -
Confirm the Figma desktop MCP server answers. A SessionStart hook probes it automatically; if a fetch reports
Cannot reach the Figma desktop MCP server, re-check Step 2 (desktop app running, local MCP server enabled, design file open).
You're ready — paste a component or page issue and Claude will route to the matching workflow. See Using the workflows.
Step 6 (optional) — Shell completion
Enable tab-completion for the aqua-cli command:
# zsh
echo 'eval "$(aqua-cli completion zsh)"' >> ~/.zshrc && source ~/.zshrc
# bash
echo 'eval "$(aqua-cli completion bash)"' >> ~/.bashrc && source ~/.bashrc
Troubleshooting
| Symptom | Cause / fix |
|---|---|
npm install -g @aquaring/aqua-cli → 401/403 | GitHub Packages auth — recheck Step 1 (read:packages token in ~/.npmrc). |
Cannot reach the Figma desktop MCP server during a fetch | The desktop app isn't running, or Enable local MCP Server is off (Step 2). |
Figma fetch says No node could be found | The design file containing that node isn't the one open in the desktop app — open the right file and retry. |
Re-running init warns about existing files | Expected — init won't overwrite without --force. Use update to refresh instead. |