@asteroidai/cli
The asteroid command-line interface for the Asteroid platform.
npx @asteroidai/cli login
npx @asteroidai/cli workflow list
Sign in with asteroid login. It opens your browser and stores a refresh token in the OS
keychain. Without a keychain it uses a private file in the config directory
(~/.config/asteroid, or ASTEROID_CONFIG_DIR). CI and agents without a browser set
ASTEROID_API_KEY instead. --org and ASTEROID_ORG do not apply to an API key.
| Variable | Use |
|---|---|
ASTEROID_API_KEY | Organization API key, sent as X-Api-Key |
ASTEROID_ORG | Organization for one command, like --org |
ASTEROID_API_URL | API host. Defaults to https://odyssey.asteroid.ai |
Pick the organization with asteroid use <org>. --org, ASTEROID_ORG and a repo's
.asteroid/org file override it, in that order.
Commands that return data print compact text. Add --json to get the response as JSON.
The text output may change between releases, so scripts should read --json. Downloads
write raw bytes, and login, logout and use only report status on stderr. Exit codes: 0 ok,
1 API error, 2 usage error.
Commands are generated from the cli surface of the External API spec. After a TypeSpec
change, run pnpm exec nx run @asteroidai/cli:generate from the repo root: it compiles
the spec first. The full reference is
docs/cli/reference.mdx, published in the docs.