CosmicAC Logo

Installation

Install and configure the CosmicAC CLI to interact with CosmicAC services from your terminal.

Prerequisites

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-cli

Verify installation

Verify the installation:

cosmicac --help

The 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 ~/.bashrc

Add 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_URL
export 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_URL

Staging requires access to the Tailscale tailnet tether.to.

Save the file and reload your shell profile:

# zsh
source ~/.zshrc

# bash
source ~/.bashrc
Set 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 login

This 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
  1. Go to GitHub SettingsDeveloper settingsPersonal access tokensTokens (classic).
  2. Click Generate new token (classic).
  3. Give it a descriptive name (e.g., "CosmicAC CLI").
  4. Select the read:packages scope.
  5. Click Generate token and copy it immediately (you won't see it again).
  6. 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.

Next steps

On this page