CosmicAC Logo

Install the CLI

Install the CosmicAC CLI and point it at your deployment.

Install the CosmicAC CLI and point it at your deployment so you can work with CosmicAC from the terminal.

Prerequisites

You need the following before you start.

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

Confirm that the CLI installed.

cosmicac --help

If the CLI lists the available commands, the installation succeeded. See CLI commands for the full reference.

Point the CLI at your deployment

Set the URLs for your deployment. Replace https://cosmicac.example.com with your Base URL, keeping the /api and /inference paths.

The Base URL is the address where your CosmicAC UI is reachable. It can be localhost, a server IP, or a domain name.

Authenticate as an admin. Enter your deployment's ORK RPC key when prompted.

cosmicac admin init

Set the URLs.

cosmicac admin config set \
  --app-url https://cosmicac.example.com/api \
  --inference-url https://cosmicac.example.com/inference \
  --web-url https://cosmicac.example.com

Confirm that the CLI points at your deployment.

cosmicac config show

The active URLs should match your deployment.

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, for example "CosmicAC CLI".
  4. Select the read:packages scope.
  5. Click Generate token and copy it immediately, because 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