Best practices

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

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 the flag -p.

specify pull -p $SPECIFY_TOKEN

You can use this method to sync Specify with git repositories in GitLab, GitHub, Azure DevOps or Bitbucket.

Last updated