Primitree

primitree init

Create a design tokens repository from sample data or an existing export.

primitree init [directory] [options]

Usage

primitree init my-design-tokens
primitree init my-design-tokens --from ./exports/variables.json

The command writes:

  • variables.json (sample or copied from --from)
  • generated token, CSS, Tailwind, and TypeScript files
  • a package.json with build, check, diff, and backup scripts
  • a GitHub Actions workflow in .github/workflows/

init builds the first set of token files during the command.

Options

OptionDescription
--from <file>Seed with your export instead of sample data
--name <name>Set the project name (defaults to the destination directory)
--forceReplace scaffold-owned paths and keep unrelated paths

Use a separate repository path or a workspace path such as packages/tokens.

On this page