# @cloudbeat/cli

> CLI for CloudBeat API

Latest version **4.0.0** (published 2025-06-24) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @cloudbeat/cli
pnpm add @cloudbeat/cli
yarn add @cloudbeat/cli
bun add @cloudbeat/cli
```

## Health

**Score 35/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2025-06-24 |
| First published | 2022-08-13 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | CBNR Cloud Solutions LTD |
| Maintainers | ndimer, romovs |

## Links

- npm: https://www.npmjs.com/package/@cloudbeat/cli
- Repository: https://github.com/oxygenhq/cloudbeat-cli
- Homepage: https://github.com/oxygenhq/cloudbeat-cli#readme
- Issues: https://github.com/oxygenhq/cloudbeat-cli/issues
- npm.io page: https://npm.io/package/@cloudbeat/cli

## Recent versions

- 4.0.0 (latest) — 2025-06-24
- 3.2.2 — 2024-03-21
- 3.2.1 — 2024-03-06
- 3.2.0 — 2024-02-27
- 3.1.1 — 2023-10-13
- 3.1.0 — 2023-10-05
- 3.0.0 — 2023-09-12
- 2.0.0 — 2023-08-16
- 1.2.0 — 2023-07-12
- 1.1.0 — 2023-06-26
- 1.0.1-beta.8 — 2023-06-25
- 1.0.1-beta.7 — 2022-12-16
- 1.0.1-beta.6 — 2022-12-14
- 1.0.1-beta.5 — 2022-09-06
- 1.0.1-beta.4 — 2022-09-06
- … 2 more at https://npm.io/package/@cloudbeat/cli/versions

## README

# CloudBeat API CLI

## Installation:
```npm install -g @cloudbeat/cli```

## Usage

### Execute a test case or suite:
Following command will execute the specified Case or Suite, wait for the tests to finish, and will produce XML report in JUnit format: 
```console
cloudbeat-cli start <testType> <testId> --apiKey <apiKey> --apiBaseUrl <apiUrl> [options]
```  
If test execution succeeds exit code will be 0. Otherwise exit code will be 1.

**Arguments**:

* `testId` - Test id.
* `testType` - Either `case` or `suite`.
* `apiKey` - API key. Can be retrieved from the user profile in CloudBeat.
* `apiBaseUrl` - CloudBeat API address. For SaaS it should be https://api.cloudbeat.io. For on-premises installations consult your system administrator.

**Options**:

* `--project <projectName>` - Project name. If specified, then `<testId>` should specify case/suite name instead of an id.
* `--tags <tags>` - Specifies tags by which the tests will be executed. Will work only with Suite.
* `-e, --env <name>` - Specifies environment to use for test execution. Environment should be already defined in CloudBeat for the project whose test is being executed. 
* `-a, --attr <attributes>` - Allows passing name-value pairs to test execution scripts. The passed data can be accessed via `attributes` property. E.g. `log.info(attributes)`.
* `--release <releaseName>` - Name of the release or version to be associated with the test result.
* `--build <buildName>` - Name of the build to be associated with the test result. Requires specifying `--release` as well.
* `--suffix <time|id>` - Report filename suffix to use. Must be either "time" or "id".
* `--folder <folder>` - Path to a directory where test results will be saved. If not specified, results will be saved in the current working directory.
* `--silent` - Do not print test progress details.  

**Usage examples**:

Execute Case by its id and pass environment id and test attributes:

```console
cloudbeat-cli start case 70224 --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE --apiBaseUrl https://api.cloudbeat.io --env MyEnviroment --attr foo=bar,baz=qux
```

Execute Case by its name. Note that when executing tests by name, project name should be specified as well:

```console
cloudbeat-cli start case "My Case" --project "My Project" --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE --apiBaseUrl https://api.cloudbeat.io
```

Execute tests marked with the specified tags in the specified suite. This will override any tags selected via CloudBeat UI:

```console
cloudbeat-cli start suite 34984 --tags foo,bar,qaz --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE --apiBaseUrl https://api.cloudbeat.io
```

### Get current test run status:
`run-status` can be used for retrieving the status of a currently executing test:  
```console
cloudbeat-cli run-status <runId> --apiKey <apiKey> --apiBaseUrl <apiUrl>
```

### Get test result for specified test run:
`run-result` can be used for retrieving the result data for a finished test:  
```console
cloudbeat-cli run-result <runId> --apiKey <apiKey> --apiBaseUrl <apiUrl>
```

### Update project artifacts:
`sync` can be used for updating artifacts for the specified project using a zip archive.
```console
cloudbeat-cli sync <projectId> <artifactArchive> --apiKey <apiKey> --apiBaseUrl <apiUrl>
```  

**Arguments**:

* `projectId` - Project id. Project type must support uploading artifacts as zip archives.
* `artifactArchive` - Path to a zip archive containing the artifacts.
* `apiKey` - API key. Can be retrieved from the user profile in CloudBeat.
* `apiBaseUrl` - CloudBeat API address. For SaaS it should be https://api.cloudbeat.io. For on-premises installations consult your system administrator.

**Usage examples**:

```console
cloudbeat-cli sync 53574 "C:\foo\bar.zip" --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE --apiBaseUrl https://api.cloudbeat.io
```

### Additional general options (work with all commands):

* `-f, --failOnErrors <true|false>` - Controls whether to return non-successful exit code on errors or not.

---
_Source: https://npm.io/package/@cloudbeat/cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
