> For the complete documentation index, see [llms.txt](https://docs.cloudbeat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudbeat.io/references/cloudbeat-cli/projects-and-code-delivery.md).

# Projects and Code Delivery

Create CloudBeat projects, synchronize them with Git or upload code, and install the AI-assisted setup wizard from the command line

The commands on this page manage CloudBeat projects and deliver test code to them. They are the building blocks of the [AI-assisted project setup](/get-started/ai-assisted-project-setup.md), and can be used on their own, for example to upload a fresh build of a .NET test project from a pipeline.

All commands support the global `--json` option (see [General options](/references/cloudbeat-cli.md#general-options)); a project can be referred to by its name or its id.

## `project list`

Lists the projects you have access to, with their id and type:

```bash
cloudbeat-cli project list
```

## `project create`

Creates a project and, depending on the delivery method, starts its first synchronization:

```bash
cloudbeat-cli project create --name <name> --type <type> --sync <git|manual|none> [options]
```

**Required options**:

* `--name <name>` - the project name.
* `--type <type>` - the project type: `Oxygen`, `CucumberOxygen`, `CucumberJava`, `TestNG`, `JUnit`, `KotlinTestNG`, `KotlinJUnit5`, `MSTestBinary`, `NUnit3Binary`, `Playwright`, `CucumberJs`, `BellatrixJs`, `Cypress`, `Postman` or `Pytest`.
* `--sync <git|manual|none>` - how the code reaches CloudBeat: pulled from a Git repository, uploaded as an archive, or not at all for now.

**Git integration** (`--sync git`):

* `--git-url <url>` - the repository HTTPS URL. If omitted, it is detected from the Git repository of the current directory (an SSH remote is converted to its HTTPS form).
* `--git-branch <branch>` - the branch to synchronize. If omitted, the current branch is used.
* `--git-auth` - provide the repository credentials now. The CLI asks for the user name (leave it empty when using an access token) and the token or password with hidden input. In a pipeline, set the `CB_GIT_TOKEN` and, optionally, `CB_GIT_USERNAME` environment variables instead. Without `--git-auth`, the project is created with the URL and branch only - fine for public repositories; for private ones, add the credentials in the project settings in CloudBeat afterwards.

**File upload** (`--sync manual`):

* `--dir <dir>` - the directory to pack and upload. `.gitignore` is honored (see [`pack`](#pack)).
* `--file <zipPath>` - an existing zip archive to upload instead.
* `--all` - include git-ignored files as well, for example when uploading build output.

**Other options**:

* `--exec-command <command>` - the command CloudBeat runs to execute the tests. The default of the project type is used if omitted.
* `--exec-options <options>` - additional execution options (TestNG, JUnit, Cucumber).
* `--assembly-names <names>` - the test assembly file names, required for `MSTestBinary` and `NUnit3Binary`.
* `--notes <notes>` - project notes.
* `--wait` - wait for the first synchronization to finish and report its result.

**Examples**:

Create a Playwright project from the Git repository of the current directory, providing an access token interactively:

```bash
cloudbeat-cli project create --name "Shop E2E" --type Playwright --sync git --git-auth --wait
```

Create a pytest project by uploading the current directory:

```bash
cloudbeat-cli project create --name "API Tests" --type Pytest --sync manual --dir . --wait
```

Create an NUnit project from a build output folder (git-ignored, hence `--all`):

```bash
dotnet build -c Release
cloudbeat-cli project create --name "Bank UI" --type NUnit3Binary --assembly-names Bank.Tests.dll --sync manual --dir bin/Release/net8.0 --all --wait
```

{% hint style="info" %}
With `--json`, a synchronization which failed still returns `"ok": true` (the project was created); the outcome is in `sync.syncStatus` (`success`, `failure` or `in progress`), with the reason in `sync.message` and `sync.details`.
{% endhint %}

## `project sync`

Synchronizes an existing project. Without `--dir` or `--file` it triggers a Git synchronization; with one of them it packs and uploads the code:

```bash
cloudbeat-cli project sync <project> [--dir <dir> | --file <zipPath>] [--all] [--wait]
```

Examples:

```bash
cloudbeat-cli project sync "Shop E2E" --wait
cloudbeat-cli project sync 1602 --dir . --wait
```

## `project status`

Shows the result of the last synchronization of a project:

```bash
cloudbeat-cli project status <project>
```

## `pack`

Packs a project directory into a zip archive, the same way `project create --dir` and `project sync --dir` do:

```bash
cloudbeat-cli pack [dir] [-o <zipPath>] [--list] [--all]
```

* Inside a Git repository, `.gitignore` is honored. Additional exclusions can be listed in a `.cbignore` file in the project root, using the same simple syntax (`dir/`, `*.ext`, `path/to/file`).
* `.git`, `node_modules`, `.env` files, `*.pem` and `*.key` files, and IDE folders are never included.
* `--list` only prints the files which would be packed.
* `--all` includes git-ignored files as well; `.cbignore` and the built-in exclusions still apply.

## `git-info`

Detects the Git repository URL and branch of a directory, as `project create --sync git` does, and reports conditions which would keep CloudBeat from seeing your latest code: commits that are not pushed, a branch without an upstream, or uncommitted changes.

```bash
cloudbeat-cli git-info [dir]
```

## `init`

Installs the [AI-assisted setup wizard](/get-started/ai-assisted-project-setup.md) into a test project:

```bash
cloudbeat-cli init [dir] --agent claude [--force]
```

The wizard's commands and skill are copied into the `.claude` folder of the project. Files which were modified locally are left untouched unless `--force` is given. Currently supported agent: `claude` (Claude Code).

## `sync` (legacy)

The older form of an artifact upload, kept for existing pipelines. It uploads a zip archive to a project by id and waits for the synchronization to finish:

```bash
cloudbeat-cli sync <projectId> <artifactArchive>
```

New scripts should use [`project sync`](#project-sync), which also accepts a project name and a directory.
