Installation
Install and configure the CosmicAC CLI to interact with CosmicAC services from your terminal.
Prerequisites
- Node.js v20+
- npm
- GitHub PAT with
read:packagesscope
Install the CLI
Configure npm to use the GitHub Packages registry for the @tetherto scope, then install the CLI globally:
npm config set @tetherto:registry https://npm.pkg.github.com
npm install -g @tetherto/cosmicac-cliVerify installation
Verify the installation:
cosmicac --helpThe CLI is installed correctly if the available commands are listed. See CLI Commands for the full reference.
Configure environment
Open your shell profile in a text editor:
# zsh
nano ~/.zshrc
# bash
nano ~/.bashrcAdd these environment variables to the file:
export BASE_URL={production-URL-tbd}
export APP_NODE_URL=https://$BASE_URL/api
export INFERENCE_APP_NODE_URL=https://$BASE_URL/inference
export WEB_UI_URL=https://$BASE_URLexport BASE_URL=stg-cosmicac.tail8a2a3f.ts.net
export APP_NODE_URL=https://$BASE_URL/api
export INFERENCE_APP_NODE_URL=https://$BASE_URL/inference
export WEB_UI_URL=https://$BASE_URLStaging requires access to the Tailscale tailnet tether.to.
Save the file and reload your shell profile:
# zsh
source ~/.zshrc
# bash
source ~/.bashrcSet for the current session only
To set the variables temporarily, run the export commands directly in your terminal without adding them to your shell profile. They will not persist after the session ends.
Authenticate
Sign up or log in to your CosmicAC account:
cosmicac loginThis opens your browser for authentication. If the browser does not open automatically, copy the URL from the terminal and paste the URL into your browser.
Help and troubleshooting
Create a PAT with read:packages scope
How to create a PAT
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic).
- Click Generate new token (classic).
- Give it a descriptive name (e.g., "CosmicAC CLI").
- Select the
read:packagesscope. - Click Generate token and copy it immediately (you won't see it again).
- Run this command, replacing
{YOUR_PAT_HERE}with your token:
npm config set //npm.pkg.github.com/:_authToken {YOUR_PAT_HERE}Learn more about creating a personal access token.