How to sync Design tokens
Uploading a JSON file
(coming soon)
Importing from Figma Styles
(coming soon)
Using the Anima CLI
If you are using a CI/CD environment, you can use the Anima CLI to sync your design tokens to Anima, making them syncable with Figma.
Get your Anima team token from the Plugin
- Open the Anima plugin in Figma -> Go to
...
button on the top left corner- Copy the Anima team token
Quick start
Run the following command in your terminal:
npx @animaapp/anima-cli sync -t <anima-team-token> --design-tokens ./design-tokens.json
Where
<anima-team-token>
is your Anima team token and./design-tokens.json
is the path to your design tokens JSON file.
Installing the package in the project
Install the Anima CLI
Follow the detailed instructions in the Anima CLI guide to install the Anima CLI.
Run the CLI
Run the following command in your terminal:
anima sync --design-tokens ./design-tokens.json
Where ./design-tokens.json
is the path to your design tokens JSON file.
Go to Anima plugin in Figma
- Open the Anima plugin in Figma
- Go to
Design Tokens
section- You'll see your tokens there
Connect with GitHub
Heads up!
You'll need a GitHub account. If you dont have one, you can create one for free ↗️.
1. Generate your Personal Access Token
Go to the Personal Access Tokens section, by clicking on your Avatar in the top right, then Settings
-> scroll down to Developer Settings
-> Personal Access Tokens
. You can either create a personal access token with the older Classic
scopes, or with Fine-grained tokens
scope:
Classic
: Generate a new token and select scope repo, decide expiration date for that token. Scroll down and click Generate token.Fine-grained tokens
: Generate a new token, decide expiration date for that token. Select the repos you want to allow access for, and underRepository permissions
make sure the option Contents hasRead and write
selected. Scroll down and click Generate token.
Once you've created your token, copy so you can use it in the plugin.
Treat the Personal Access Token like a password
Never share this token with anyone who shouldn't have access to your repository. Treat it like your personal password.
2. Connect your GitHub account to Anima
- Open the Anima plugin in Figma
- Go to
Design Tokens
section- Click on ⚙️ button on the top-right corner
- Click on
Edit GitHub credentials
button- Paste your Personal Access Token
- Provide your Repository URL
- Provide your design tokens file path