Get design tokens from Figma with the command line
Tags: showdev, design, cli, specify
Published: 2022-08-10 13:19:00

At [Specify](https://specifyapp.com), We help design and engineering teams build better products faster. Basically, we help you build CI/CD for your design workflows.

The [Specify CLI](https://specifyapp.com/developers/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](https://dev.to/specifyapp/introduction-to-design-tokens-580p) and assets from Figma.

![Specify Sync Command](https://raw.githubusercontent.com/Specifyapp/Specify/develop/front/landing/assets/img/blog/09-introducing-specify-cli/content/introducing-specify-cli-sync-dark.jpg?token=GHSAT0AAAAAABWRZKMQDLJES27NNVQWW264YXLZ5SA)

## 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](https://specifyapp.com/developers/api).

![Specify Pull Command](https://raw.githubusercontent.com/Specifyapp/Specify/develop/front/landing/assets/img/blog/09-introducing-specify-cli/content/introducing-specify-cli-pull-dark.jpg?token=GHSAT0AAAAAABWRZKMQY5OWSKZW2UY5HMO4YXLZ6FA)

### `$ 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](https://raw.githubusercontent.com/Specifyapp/Specify/develop/front/landing/assets/img/blog/09-introducing-specify-cli/content/introducing-specify-cli-dry-run-dark.jpg?token=GHSAT0AAAAAABWRZKMRN65HSWUQHYCVJHKEYXLZ6XQ)

## 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](https://raw.githubusercontent.com/Specifyapp/Specify/develop/front/landing/assets/img/blog/09-introducing-specify-cli/content/introducing-specify-cli-config-dark.jpg?token=GHSAT0AAAAAABWRZKMRL43HZ5GEIPTESGNYYXLZ7KA)

### `--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](https://raw.githubusercontent.com/Specifyapp/Specify/develop/front/landing/assets/img/blog/09-introducing-specify-cli/content/introducing-specify-cli-pat-dark.jpg?token=GHSAT0AAAAAABWRZKMQ5FTUDH3ZQEVZBYFMYXL2E5A)

### `--help`

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

![Specify Help command](https://raw.githubusercontent.com/Specifyapp/Specify/develop/front/landing/assets/img/blog/09-introducing-specify-cli/content/introducing-specify-cli-help-dark.jpg?token=GHSAT0AAAAAABWRZKMRAFRDFUUTWWBVUJ2MYXL2EHA)

If you want to go further, you can look up all the other flags in our [API documentation](https://specifyapp.com/developers/cli#heading-flags).

## 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
```

Need help? Follow the [installation guide](https://specifyapp.com/developers/cli) to get started or drop us a [Tweet](https://twitter.com/specifyapp).

Enjoy!

{% embed https://youtu.be/Ae3uHpWERtU %}