Skip to main content

Setup your local environment

You'll need to add the SPIROKIT_AUTH_TOKEN environment variable on your system, so you can automatically access our private registry from any SpiroKit project.

This is possible thanks to the .npmrc file included in the root of your SpiroKit project, which includes all the configuration to retrieve the packages from our registry.

1. Generate your auth token

Once you created your account in our private registry following the steps described in the Installation docs, you can use your username and password to generate a base64-encoded token that can be used as auth token.

Run the following command in your terminal:

echo -n 'username:password' | base64

Replace "username" and "password" with your credentials, and copy the resulting string.

2. Setup the environment variable on your system

Windows

  1. Open the Start menu and search for "Environment Variables".
  2. Click on "Edit the system environment variables".
  3. In the System Properties window, click on the "Environment Variables" button.
  4. Under "User variables" or "System variables", click "New".
  5. Enter "SPIROKIT_AUTH_TOKEN" as the variable name, and the generated auth token as the variable value.
  6. Click "OK" to save the new environment variable.

Linux / macOS

  1. Open a terminal window.
  2. Navigate to your home directory by entering cd ~.
  3. If you're using Bash, open the .bashrc or .bash_profile file in a text editor. If you're using Zsh, open the .zshrc or .zprofile file instead.
  4. Add the following line to the end of the file: export SPIROKIT_AUTH_TOKEN=<auth-token>
  5. Save the file and exit the text editor.
  6. Reload the file by entering source ~/.bashrc or source ~/.bash_profile (for Bash) or source ~/.zshrc or source ~/.zprofile (for Zsh).

Note that in all of these cases, <auth-token> should be replaced with the actual value of your SPIROKIT_AUTH_TOKEN environment variable.

That's it! Now you can start creating new projects using our CLI.