---
# Generated by kapten-docs from the CLI's command tree. DO NOT EDIT.
title: "kapten pipelines"
description: "Build and run deployment pipelines."
sidebar:
  label: "pipelines"
---

Every command takes the [global flags](/cli/reference#global-flags).

## kapten pipelines create

Creates a pipeline in an environment. Add its stages with the stage endpoints.

```bash
kapten pipelines create <project-id> <environment-id> <body...> [flags]
```

| Argument | Description |
| --- | --- |
| `project-id` | The unique identifier for the project |
| `environment-id` | The unique identifier of the environment |
| `body...` | The request body, as shorthand or JSON. See [Request bodies](/cli/request-bodies). |

| Flag | Description |
| --- | --- |
| `--rsh-generate-body` | Print an example request body and exit |
| `--rsh-validate` | Validate the JSON request body against the OpenAPI schema before sending |

Request body fields, `*` for required:

```text
{
  description: (string)
  is_active: (boolean)
  name*: (string pattern:\S minLen:1)
}
```

Example:

```bash
kapten pipelines create <project-id> <environment-id> 'description: string, is_active: true, name: string'
```

## kapten pipelines delete

Deletes a pipeline.

```bash
kapten pipelines delete <project-id> <environment-id> <pipeline-id> [flags]
```

| Argument | Description |
| --- | --- |
| `project-id` | The unique identifier for the project |
| `environment-id` | The unique identifier of the environment |
| `pipeline-id` | The unique identifier for the pipeline |

Example:

```bash
kapten pipelines delete <project-id> <environment-id> <pipeline-id>
```

## kapten pipelines deploy

Starts a run of the pipeline, which deploys its stages in order.

```bash
kapten pipelines deploy <project-id> <environment-id> <pipeline-id> [flags]
```

| Argument | Description |
| --- | --- |
| `project-id` | The unique identifier for the project |
| `environment-id` | The unique identifier of the environment |
| `pipeline-id` | The unique identifier for the pipeline |

Example:

```bash
kapten pipelines deploy <project-id> <environment-id> <pipeline-id>
```

## kapten pipelines get

Returns a pipeline.

```bash
kapten pipelines get <project-id> <environment-id> <pipeline-id> [flags]
```

| Argument | Description |
| --- | --- |
| `project-id` | The unique identifier for the project |
| `environment-id` | The unique identifier of the environment |
| `pipeline-id` | The unique identifier for the pipeline |

| Flag | Description |
| --- | --- |
| `--filter-with-deleted` | Include deleted instances (default: false) |

Example:

```bash
kapten pipelines get <project-id> <environment-id> <pipeline-id>
```

## kapten pipelines get-run

Returns a pipeline run, with the state of each of its stages.

```bash
kapten pipelines get-run <project-id> <environment-id> <pipeline-run-id> [flags]
```

| Argument | Description |
| --- | --- |
| `project-id` | The unique identifier for the project |
| `environment-id` | The unique identifier of the environment |
| `pipeline-run-id` | The unique identifier for the pipeline run |

Example:

```bash
kapten pipelines get-run <project-id> <environment-id> <pipeline-run-id>
```

## kapten pipelines list

Returns an environment's pipelines, a page at a time.

```bash
kapten pipelines list <project-id> <environment-id> [flags]
```

| Argument | Description |
| --- | --- |
| `project-id` | The unique identifier for the project |
| `environment-id` | The unique identifier of the environment |

| Flag | Description |
| --- | --- |
| `--filter-with-deleted` | Include deleted instances (default: false) |
| `--page-limit int` | Maximum number of records to return (default: 10) |
| `--page-number int` | Page number (default: 1) |

Example:

```bash
kapten pipelines list <project-id> <environment-id>
```

## kapten pipelines list-runs

Returns a pipeline's runs, a page at a time.

```bash
kapten pipelines list-runs <project-id> <environment-id> <pipeline-id> [flags]
```

| Argument | Description |
| --- | --- |
| `project-id` | The unique identifier for the project |
| `environment-id` | The unique identifier of the environment |
| `pipeline-id` | The unique identifier for the pipeline |

| Flag | Description |
| --- | --- |
| `--page-limit int` | Maximum number of records to return (default: 10) |
| `--page-number int` | Page number (default: 1) |

Example:

```bash
kapten pipelines list-runs <project-id> <environment-id> <pipeline-id>
```

## kapten pipelines update

Updates a pipeline's own fields. Change its stages with the stage endpoints.

```bash
kapten pipelines update <project-id> <environment-id> <pipeline-id> <body...> [flags]
```

| Argument | Description |
| --- | --- |
| `project-id` | The unique identifier for the project |
| `environment-id` | The unique identifier of the environment |
| `pipeline-id` | The unique identifier for the pipeline |
| `body...` | The request body, as shorthand or JSON. See [Request bodies](/cli/request-bodies). |

| Flag | Description |
| --- | --- |
| `--rsh-generate-body` | Print an example request body and exit |
| `--rsh-validate` | Validate the JSON request body against the OpenAPI schema before sending |

Request body fields, `*` for required:

```text
{
  description: (string)
  is_active: (boolean)
  name: (string pattern:\S minLen:1)
}
```

Example:

```bash
kapten pipelines update <project-id> <environment-id> <pipeline-id> 'description: string, is_active: true, name: string'
```
