Reference
CLI flags
Entry: bun run calque <command>. Product CLI talks to the cloud convert API by default.
Commands
| Command | Purpose |
convert | Figma JSON / URL → files |
check | Double convert, assert byte identity |
scan-index | Walk repo → calque.index.json |
mcp | stdio MCP server |
convert / check flags
| Flag | Default | Meaning |
<input> | stdin / URL | Node JSON path, dump, or Figma URL |
--figma-url | — | Design URL mode |
--repo <dir> | — | Live component scan for L2/L3 |
--index <file> | — | Pre-scanned index (overrides live scan) |
--map <file> | — | L4 aliases JSON |
--context <file> | — | Combined components + aliases |
--markup | react | Framework target |
--style | tailwind | Style system |
--out <dir> | generated | Output directory |
--alias <a> | @ | Import path prefix |
--json | off | Machine-readable result on stdout |
--check | off | On convert: determinism self-check, no write |
scan-index flags
| Flag | Meaning |
--repo <dir> | Library root to walk |
--out <file> | Write index JSON |
--alias | Import prefix in generated paths |
--json | Emit JSON to stdout |
Environment
| Var | Meaning |
FIGMA_TOKEN | Figma PAT for URL fetch |
CALQUE_LOCAL=1 | In-process engine (dev / dogfood) |
Legacy f2c
bun run convert → scripts/f2c.ts adds dogfood flags such as
--dump-index, --incremental, stdin pipes.
Use for engine development; product docs assume bun run calque.