Specify Docs
Specify ↗︎Changelog ↗︎Guide ↗︎
V2
V2
  • Getting started
    • Introduction
    • What is Specify?
    • Pulling your first tokens with the CLI
    • Glossary
  • Collect
    • What is a Source?
    • Available sources
      • Figma Variables & Styles
      • Tokens Studio
  • Distribute
    • What is a Destination?
    • Available destinations
      • GitHub
      • Specify CLI
      • Specify SDK
      • HTTP API
  • Concepts
    • Overview
    • Parsers Engine
    • SDTF Client
      • SDTF Engine
    • Specify Design Token Format
  • Guides
    • Configuration file 101
    • Specify CLI usage 101
      • Getting started
      • Authentication
      • Generate Files
    • Specify SDK usage 101
      • Getting started
      • Retrieving and working with the tokens
      • Updating tokens
      • Converting a token to XXX
      • Executing generation parsers
    • Specify SDK Cheatsheet
    • Manage font files
    • Querying a SDTF graph
  • Reference
    • Parsers Engine
    • Parsers
      • change-case
      • convert-color
      • convert-dimension
      • make-line-height-relative
      • filter
      • register-view
      • select-modes
      • prefix-by
      • suffix-by
      • replace-string
      • to-css-custom-properties
      • to-css-text-style
      • to-css-font-import
      • to-flutter
      • to-javascript
      • to-json
      • to-json-list
      • to-kotlin
      • to-react-native
      • to-scss-mixin-text-style
      • to-scss-map
      • to-sdtf
      • to-style-dictionary
      • to-swift
      • to-tailwind
      • to-typescript
      • svgo
      • svg-to-jsx
      • svg-to-tsx
      • to-svg-file
      • to-bitmap-file
      • to-file
    • Specify SDK
      • SpecifyClient
      • SDTFClient
      • Converters
        • CSS
      • ParsersEngineResults
    • SDTF Engine
      • Query API
      • Mutation API
      • SDTF Query Language
      • SDTF QueryResult
      • TokenState
        • Stateful Value
    • HTTP API
      • POST /parsers-engine-rpc
    • Specify CLI
  • Resources
    • Parser Rules templates
      • CSS Custom Properties
      • Tailwind
      • React Native
      • Flutter
      • SDTF
      • JSON
    • Specify CLI VS Specify SDK
    • Playground
    • Best practices
  • Useful links
    • Discord
    • YouTube
    • Twitter
    • Help Center
    • Canny
Powered by GitBook
On this page
  • Environment variable (recommended)
  • Flag
  • Configuration file (not recommended)

Was this helpful?

Export as PDF
  1. Guides
  2. Specify CLI usage 101

Authentication

PreviousGetting startedNextGenerate Files

Last updated 1 year ago

Was this helpful?

Specify use a Personal Access Token for the authentication. You can create it from the . Once you have a personal access token, you can use it in two ways:

Environment variable (recommended)

You can use the environment variable named SPECIFY_PAT

SPECIFY_PAT=xxxxxxxxxxxxxxxxxx specify pull

Flag

If you prefer a flag, you can use --personal-access-token or -p

specify --personal-access-token xxxxxxxxxxxxxxxxxx pull

Configuration file (not recommended)

You can also write the personal access token directly in the config file.

The personal access token in a config file is useful if you need to execute some custom business logic. To stay safe, you should use a library like to store credentials outside of the code.

{
    "repository": "<@your-organization/your-repository-name>"
    "version": "2",
    "personalAccessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    "rules": []
}
module.export = {
  repository: '<@your-organization/your-repository-name>'
  version: '2',
  personalAccessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  rules: []
}
export default {
  repository: '<@your-organization/your-repository-name>'
  version: '2',
  personalAccessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  rules: []
}
import type { SpecifyCLIConfigurationV2File } from '@specifyapp/sdk/bulk"'

const config: SpecifyCLIConfigurationV2File = {
  repository: '<@your-organization/your-repository-name>',
  version: '2',
  personalAccessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  rules: []
}

export default config;

If multiple credentials are used together, Specify will choose following this order:

  1. the flag

  2. the configuration file

  3. the environment variable

dedicated page on the web app
dotenv