Specify Docs
Specify ↗︎Changelog ↗︎Guide ↗︎
V1
V1
  • Getting started
    • Introduction
    • What is Specify?
    • Getting started
    • Glossary
  • Advanced Repository
    • Getting started
    • Figma Variables & Styles
    • Tokens Studio
    • CLI & Config
    • Querying a SDTF graph
    • GitHub
    • Parsers
      • to-css-custom-properties
      • to-style-dictionary
      • to-tailwind
      • to-sdtf
      • to-javascript
      • to-react-native
      • to-json
      • to-typescript
      • filter
      • select-modes
      • change-case
      • convert-color
      • convert-dimension
    • Templates
      • CSS Custom Properties
      • SDTF
      • Tailwind
    • REST API
    • Playground
  • Concepts
    • Token types
    • Configuration
    • Parsers
    • Templates
    • Best practices
  • Apps & Tools
    • Overview
    • GitHub
    • npm
    • GitLab
    • Bitbucket
    • Azure DevOps
    • REST API
    • CLI
    • Notion
    • Raycast
  • Useful links
    • Discord
    • YouTube
    • Twitter
    • Help Center
Powered by GitBook
On this page
  • Set your personal access token as a variable
  • Using an .env variable in a config file in JavaScript
  • Using a variable in a flag with the CLI

Was this helpful?

Edit on GitHub
Export as PDF
  1. Concepts

Best practices

PreviousParsersNextOverview

Last updated 1 year ago

Was this helpful?

Set your personal access token as a variable

Your Specify personal access token should always be private. We highly recommend you to set it in a private variable or in a .env variable.

Using an .env variable in a config file in JavaScript

.env
SPECIFY_TOKEN=ab83f8f49f5c65456c7b1fe70efbc804aa08f87150214aa984d4125945ed8283bash
const path = require('path');
const envFile = '.env';
require('dotenv').config({ path: path.resolve(process.cwd(), envFile) });

module.exports = {
  repository: '@workspace/repository',
  personalAccessToken: process.env.SPECIFY_TOKEN,
  rules: [],
};

Using a variable in a flag with the CLI

Set your personal access token as an environment variable and interpolate it in the CLI wit .

specify pull -p $SPECIFY_TOKEN

You can use this method to sync Specify with git repositories in , , or .

the flag -p
GitLab
GitHub
Azure DevOps
Bitbucket