---
title: Pipeline
description: Build and manage pipelines.
canonical: 'https://lightning.ai/docs/cli/stable/command-details/pipeline'
---
# Pipeline {#pipeline}

Build and manage pipelines.

**Usage:**

```console
lightning pipeline [OPTIONS] COMMAND [ARGS]...
```

## Commands {#pipeline-commands}

| Command | Description |
| --- | --- |
| [`logs`](#pipeline-logs) | View the logs for a pipeline step. |

## lightning pipeline logs {#pipeline-logs}

View the logs for a pipeline step.

**Usage:**

```console
lightning pipeline logs [OPTIONS] [COMMAND] [ARGS]...
```

### Commands {#pipeline-logs-commands}

| Command | Description |
| --- | --- |
| [`download`](#pipeline-logs-download) | Download the complete logs for a pipeline step. |

### Options {#pipeline-logs-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--teamspace` | `TEXT` | no | — | Teamspace owner/name. Uses the configured default teamspace when omitted. |
| `--follow`, `-f` | — | no | — | Stream new log lines as they are produced. |
| `--tail` | `INTEGER` | no | — | Only show the last N lines. |
| `--rank` | `INTEGER` | no | — | Machine rank to read from in a multi-machine job. |
| `--timestamps` | — | no | — | Prepend each line with its ISO-8601 timestamp. |
| `--since` | `TEXT` | no | — | Only include lines at or after this time (e.g. “2h”, RFC3339). |
| `--until` | `TEXT` | no | — | Only include lines at or before this time (e.g. “30m”, RFC3339). |
| `--query` | `TEXT` | no | — | Only include lines containing every whitespace-separated term. |
| `--severity` | `[error|warning|info|debug]` | no | — | Only include lines at or above this severity. |
| `--json` | — | no | — | Output entries as a JSON array. |
| `--interactive`, `-i` | — | no | — | Launch the interactive TUI log viewer. |

### lightning pipeline logs download {#pipeline-logs-download}

Download the complete logs for a pipeline step.

**Usage:**

```console
lightning pipeline logs download [OPTIONS] [PIPELINE] [STEP]
```

#### Arguments {#pipeline-logs-download-arguments}

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `PIPELINE` | `text` | no | The pipeline name. Required. |
| `STEP` | `text` | no | The step (job) name within the pipeline. Required. |

#### Options {#pipeline-logs-download-options}

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `--teamspace` | `TEXT` | no | — | Teamspace owner/name. Uses the configured default teamspace when omitted. |
| `--timestamps` | — | no | — | Prepend each line with its ISO-8601 timestamp. |

---

**Navigation**

- Parent: [Command details](/docs/cli/2026.11.20/command-details.md)
