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.
- Node.js 20 or later
- npm
- GitHub personal access token (PAT) with
read:packagesscope - A running CosmicAC deployment. See Installation to deploy CosmicAC.
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-cliConfirm that the CLI installed.
cosmicac --helpIf 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 initSet 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.comConfirm that the CLI points at your deployment.
cosmicac config showThe active URLs should match your deployment.
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, for example "CosmicAC CLI".
- Select the
read:packagesscope. - Click Generate token and copy it immediately, because 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.