Get design tokens from Figma with the command line

An introduction to the Specify CLI

flo merian
Specify
Published in
4 min readOct 10, 2022

--

At Specify, we’re on a mission to help you build delightful products faster.

The Specify CLI is your companion to get design tokens and assets from Figma to your local env with your keyboard. It helps you define, execute and iterate on your design CI/CD workflow setup.

Below is an overview of why we built a Command-Line Interface (CLI), what you can do with it, and how to use it to sync and pull design data from your terminal.

Developer-first since Day 1

Since the early days of Specify, we’ve wanted to build a CLI.

We needed a simple way to extract our design tokens from Figma to build our product. When we onboarded our first users, we realized how much the CLI would be a key component for teams to adopt Specify in the long run.

We dog-fed the earliest versions, and to release it, from an internal dev tool to a product feature, we rethought the experience from the ground up.

Sync and pull design tokens and assets from Figma

We help your team automatically collect, store, and distribute your design tokens and assets.

The Specify CLI is your companion to set up, test, and help you fix errors in your configuration.

We built it from the ground up, introducing a fresh design that makes it easy — and delightful — for you to use. We also released 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:

Initiate. Sync. Pull.

Sync design tokens and assets

$ specify sync

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

Pull design data 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 --dry-run

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

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.

--personal-access-token or -p

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

--help

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

Start from your terminal

The Specify CLI is available right now.

You can install it via NPM or Yarn:

npm install @specifyapp/cli

yarn add @specifyapp/cli

Follow the installation guide to get started.

We hope you’ll enjoy using the new Specify CLI, as much as we enjoyed designing and building it. Feel free to share your feedback, or drop us a Tweet. We’re eager to read about your experience.

We’d be happy to help you get the most out of your design tokens and build delightful products faster ⚡️

--

--

flo merian
Specify

product marketer at mintlify.com; ex-founder; previously worked at: (clerk.dev, specifyapp.com); co-runs marketingto.dev; INFJ 👋