CloudBeat CLI
Command line interface for CloudBeat - run tests from CI/CD pipelines, manage projects and deliver code
The CloudBeat CLI (@cloudbeat/cli) lets you use CloudBeat from a terminal, a CI/CD pipeline or an AI coding agent:
Running tests - start a test case or suite, wait for it to finish, and get a JUnit XML report.
Projects and code delivery - create projects, synchronize them with Git, upload code, and install the AI-assisted setup wizard.
Installation
Node.js 18 or newer is required.
npm install -g @cloudbeat/cliWithout a global installation, every command can also be run with npx @cloudbeat/cli <command>.
Authentication
Every command needs your CloudBeat API key, which you can find in your user profile in CloudBeat. The CLI looks for it in this order:
The
--apiKeyand--apiBaseUrloptions.The
CB_API_KEYandCB_API_URLenvironment variables - the recommended way for CI/CD pipelines, where the key comes from the pipeline's secret store.The configuration saved by
login.
login
Stores the API key on your machine, so that it does not have to be passed to each command:
cloudbeat-cli login [--apiBaseUrl <apiUrl>]The key is asked with hidden input and saved to ~/.cloudbeat/config.json, readable by your user only. The CLI verifies the key against CloudBeat before saving it. In non-interactive environments the key can be piped in with login --stdin.
--apiBaseUrl is the CloudBeat API address. For SaaS it is https://api.cloudbeat.io (the default). For self-hosted installations consult your system administrator.
whoami
Shows which CloudBeat instance you are connected to and where the credentials come from, and verifies them:
logout
Removes the stored API key:
General options
These options apply to all commands and are given before the command name:
--apiKey <apiKey>- the API key, if not stored or set in the environment.--apiBaseUrl <apiUrl>- the CloudBeat API address, if not the default.--json- print the result as a single JSON document (supported bylogin,logout,whoami,init,git-info,packandproject). Made for scripts and AI agents: the document contains"ok": trueor"ok": falsewith anerrormessage and acode.-f, --failOnErrors <true|false>- whether to return a non-zero exit code on errors. Defaulttrue.-v, --version- print the CLI version.
Last updated
Was this helpful?