DEV Community

Cover image for Get design tokens from Figma with the command line
flo merian for Specify

Posted on • Edited on • Originally published at specifyapp.com

Get design tokens from Figma with the command line

At Specify, We help design and engineering teams build better products faster. Basically, we help you build CI/CD for your design workflows.

The Specify CLI is here to help you define, execute and iterate on your setup. We built it from scratch, introducing a fresh design and an error management system to help you test and set up your Specify configuration files.

Here’s what you can do with the Specify CLI:

Sync design tokens and assets

$ specify sync

Sync a Specify repository to update the elements it contains. Today, it collects design tokens and assets from Figma.

Specify Sync Command

Pull your design tokens to a local directory

$ specify pull

Pull your design tokens and assets from your Specify repository into a local directory. Just like you would do with the REST API.

Specify Pull Command

$ specify pull --dry-run

Launch the CLI and display the result without creating the files. It’s useful to test your configuration safely.

Specify Pull Dry Run Command

Use flags for more options

Flags are parameters you can pass while launching the command. All of these parameters are optional if you use a config file.

—config-path or -C

It’s the path to your JSON or JavaScript config file. If you want to rename it or configure multiple ones in your design CI/CD workflow, you can always use the -config-path flag to call the right one.

Specify Config File Flag

--personal-access-token or -p

Your personal access can be defined in a flag if you don’t want it in your config file.

Specify Access Token Flag

--help

Need help with your config file setup? Type --help to learn more.

Specify Help command

If you want to go further, you can look up all the other flags in our API documentation.

Start from your terminal

The Specify CLI is available right now. You can install it via NPM or Yarn:

npm install @specifyapp/cli
Enter fullscreen mode Exit fullscreen mode
yarn add @specifyapp/cli
Enter fullscreen mode Exit fullscreen mode

Need help? Follow the installation guide to get started or drop us a Tweet.

Enjoy!

Top comments (0)