* feat: write variables as a CSS token stylesheet Copy a collection as CSS custom properties or a Tailwind v4 theme from the variables dialog, print it with openpencil tokens, and rebuild design_to_tokens on the same generator. Default modes go in :root or @theme, other modes override under their condition, and aliases are declared again in each mode scope so they follow it. * fix: give modes that slug alike their own selector and variant Two modes in one collection whose names reduce to the same slug, such as Dark and dark!, shared one default selector and Tailwind variant, so the later mode silently overrode the earlier one. Slugs are now numbered in mode order, as variable names already are. |
||
|---|---|---|
| .. | ||
| bin | ||
| src | ||
| tests | ||
| AGENTS.md | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
@open-pencil/cli
Headless command line for OpenPencil and .fig files: inspect documents and layers, query with XPath, export to PNG, JPG, WEBP, SVG, PDF, PPTX, JSX, HTML, or .fig, import HTML/CSS/Tailwind, lint design files, analyze and extract design tokens, and script documents with a Figma Plugin API-compatible figma global through eval.
npm install -g @open-pencil/cli # or: bun add -g @open-pencil/cli
openpencil --help
openpencil eval design.fig -c "return figma.currentPage.children.length"
Inspection commands support --json for automation. The MCP server ships separately as @open-pencil/mcp.
- CLI reference: https://openpencil.dev/programmable/cli/inspecting
- Scripting with the Plugin API: https://openpencil.dev/programmable/cli/scripting
- Source and issues: https://github.com/open-pencil/open-pencil
MIT License.