---
title: Pipelines
description: Chain tools together into reusable multi-step workflows.
---

# Pipelines

Pipelines let you chain multiple tools together — the output of each step feeds into the next. Create them inline or save them for reuse.

## Inline execution

Run a pipeline without saving it:

```bash
devv pipe exec "json-formatter | base64-encode" '{"key":"value"}'
# eyJrZXkiOiAidmFsdWUifQ==

devv pipe exec "base64-decode | json-formatter" "eyJrZXkiOiJ2YWx1ZSJ9"
# {
#   "key": "value"
# }

# With stdin
cat data.json | devv pipe exec "json-formatter --sort-keys | base64-encode"
```

## Pipeline spec format

A pipeline spec is a string of tool IDs separated by `|`:

```
tool-id [options] | tool-id [options] | ...
```

### Examples

```
json-formatter | base64-encode
json-formatter indent=4 | hash-generator sha256
base64-decode | json-formatter --sort-keys
csv-json-converter | json-formatter
json-formatter | url-encode
```

### Available tool IDs

See the [Offline Tools Reference](/tools/offline) for all tool IDs you can use in pipelines.

## Saved pipelines

### Create a pipeline

```bash
devv pipe create <name> "<spec>" [-d "description"]
```

```bash
devv pipe create format-and-encode "json-formatter | base64-encode" -d "Format JSON then base64 encode"
# ✓ Created pipeline "format-and-encode" (2 steps)
#   json-formatter → base64-encode

devv pipe create audit "json-formatter | hash-generator sha256" -d "Format and hash for integrity check"
```

### Run a saved pipeline

```bash
devv pipe run <name> [input]
```

```bash
devv pipe run format-and-encode '{"hello":"world"}'
# ewogICJoZWxsbyI6ICJ3b3JsZCIKfQ==

# From stdin
cat payload.json | devv pipe run format-and-encode
```

### List saved pipelines

```bash
devv pipe list
```

```
  NAME               STEPS  DESCRIPTION
  format-and-encode  2      Format JSON then base64 encode
  audit              2      Format and hash for integrity check
```

### Show pipeline details

```bash
devv pipe show format-and-encode
```

```
  Pipeline: format-and-encode
  Steps:    json-formatter → base64-encode
  Desc:     Format JSON then base64 encode
```

### Delete a pipeline

```bash
devv pipe delete format-and-encode
```

## Verbose mode

Add `--verbose` to see each step's output:

```bash
devv pipe exec "json-formatter | base64-encode | hash-generator sha256" '{"k":"v"}' --verbose
```

```
  Step 1/3: json-formatter
  → {
      "k": "v"
    }

  Step 2/3: base64-encode
  → eyJrIjogInYifQ==

  Step 3/3: hash-generator
  → SHA256: 9f86d081884c...
```

## Passthrough tools

Some tools (like `hash-generator`, `json-validator`, `text-counter`) analyze input without transforming it. In a pipeline, these pass the **original input** forward to the next step while still showing their result.

```bash
devv pipe exec "json-validator | json-formatter" '{"valid":true}'
# Validates first, then formats — the formatted output is the final result
```

## Pipeline storage

Saved pipelines are stored in your config file at `~/.config/devv/config.json`. They're local to your machine.

## Compatibility

Pipeline specs are compatible with the [devv.tools](https://devv.tools) web app's pipeline system. A pipeline created on the web works identically in the CLI.
