CLI & Config

In this guide you’ll learn how to transform design data coming from Figma Variables, Figma Styles and/or Tokens Studio into CSS Custom Properties using the Specify CLI.

1. Install the CLI

Install the @specifyapp/cli via npm or Yarn.

2. Create your Specify configuration file

To create your Specify config file, you need to follow these steps:

  • Create an empty file named .specifyrc.json

  • Add the following content

403B
Open

3. Properties to update in the configuration file before using it:

  • A property version is shown which refers to the new Advanced Repository from which we are extracting tokens. Use the version: "2".

  • Add your organization and repository name under the repository property.

  • Get a personal access token here ↗︎.

  • Run the command specify pull to fetch your design tokens.

4. CSS output example

Specify exports your Figma Variables Modes as CSS data-attributes:

We would like to improve this output according to your needs as much as we can. Feel free to share your feedback with us via:

Things to take into account when using the CLI

  • The configuration file can handle MJS, CJS, and JSON.

  • There is no more path property in the parser settings, it is now replaced by an output key inside every parser.

Last updated

Was this helpful?