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
- Open the Start menu and search for "Environment Variables".
- Click on "Edit the system environment variables".
- In the System Properties window, click on the "Environment Variables" button.
- Under "User variables" or "System variables", click "New".
- Enter "SPIROKIT_AUTH_TOKEN" as the variable name, and the generated auth token as the variable value.
- Click "OK" to save the new environment variable.
Linux / macOS
- Open a terminal window.
- Navigate to your home directory by entering
cd ~. - 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.
- Add the following line to the end of the file:
export SPIROKIT_AUTH_TOKEN=<auth-token> - Save the file and exit the text editor.
- Reload the file by entering
source ~/.bashrcorsource ~/.bash_profile(for Bash) orsource ~/.zshrcorsource ~/.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.