NewsThe Basemode plugin is now on Figma Community
Docs

CLI

The engine on your laptop or in CI, with no account.

The basemode command is the same engine the hosted product runs, published on PyPI as basemode-tokens. It needs no account.

uvx --from basemode-tokens basemode --help
# or: pip install basemode-tokens

Generate from Figma

FIGMA_TOKEN=… basemode generate --file KEY --format css --format swift --out src/tokens

--file takes a Figma file key and can be repeated. Reading variables through Figma's API needs Figma Enterprise; on other plans, export from the plugin and use --input.

Generate from a file

basemode generate --input tokens.json --format tailwind4 --out src/tokens

--input reads a Basemode plugin export, a W3C DTCG file or a Tokens Studio export.

Pull from Basemode

BASEMODE_KEY=… basemode pull --format typescript --out src/tokens

The latest tokens published to your design system. This is how a team without Figma Enterprise gets variables into CI: the plugin publishes, pull collects.

Options for generate and pull

FlagDefaultWhat it does
--formatcssRepeat for several. See formats.
--outtokensFolder to write to
--colorhexhex, rgb, hsl or oklch
--unitpxpx, rem or em
--prefixnonePut in front of every token's name
--checkoffChange nothing; exit 1 if the files are out of date. For CI.
--rename-referencesoffUpdate code under the current folder that uses renamed tokens
--summary FILEnoneWrite a pull request title and body to FILE

Lint

basemode lint src --tokens src/tokens/basemode.lock.json

Finds hard-coded colors, spacing, radii and font sizes that should be tokens, and exits 1 if there are any. See lint and adoption.

MCP

basemode mcp --tokens src/tokens/basemode.lock.json

Serves the design system to a coding assistant. See MCP.