The Terrantula CLI is distributed as an npm package and requires Bun (>= 1.0) or Node.js (>= 18) to run.
Or with npm:
Verify the installation:
The CLI operates in two modes:
Local mode — no API server required. Data is stored in a local SQLite database. Ideal for the first-five-minutes onboarding flow.
Remote mode — connects to a self-hosted Terrantula API server. Required for multi-user, multi-org, and production use.
Obtain an API token from your Terrantula server (Settings > API Tokens), then:
The credentials are saved to ~/.config/terrantula/config.json with permissions 600. Subsequent commands use them automatically.
For CI, Makefiles, and scripted use:
Resolution order (highest priority first):
--base-url / --token flagsTERRANTULA_BASE_URL / TERRANTULA_TOKEN environment variables~/.config/terrantula/config.json)After login, set a default project so you don't need --project on every command:
This writes currentProject to your config file. Override per-invocation with --project <id> or TERRANTULA_PROJECT_ID.