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 to create and manage jobs from your terminal.

Prerequisites

You need the following before you start:

Steps

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 the CLI is installed:

cosmicac --help

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

Authenticate as an admin

Run cosmicac admin init and enter your deployment's ORK RPC key when prompted:

cosmicac admin init

Run task ork-key on the host machine where CosmicAC is deployed to print the ORK RPC key. If you cannot access it, ask the admin who deployed CosmicAC for the key.

Point the CLI at your deployment

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

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

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

Confirm the configuration

Check that the CLI points at your deployment:

cosmicac config show

The active URLs should match your deployment.

Help and troubleshooting

Create a GitHub PAT with the read:packages scope
  1. Go to GitHub SettingsDeveloper settingsPersonal access tokensTokens (classic).
  2. Click Generate new token (classic).
  3. Give it a descriptive name ("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