> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/warpdotdev/warp/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows: save and reuse commands in Warp

> Workflows are named, parameterized command snippets stored in Warp Drive. Create, share, and run workflows from the command palette or the workflow library.

A **workflow** is a named, reusable command snippet stored in Warp Drive. Workflows let you save commands you run repeatedly — with optional parameters, descriptions, and tags — and run them again from any Warp session without retyping. You can keep workflows private, share them with your team, or use AI-generated workflows suggested in response to natural-language queries.

## Workflow types

Warp supports two kinds of workflows:

<CardGroup cols={2}>
  <Card title="Command workflows" icon="terminal">
    A shell command with optional parameterized arguments. When you run a command workflow, Warp inserts the command text into the input area — with any arguments pre-filled or prompted.
  </Card>

  <Card title="Agent Mode workflows" icon="robot">
    A natural-language query that is sent to Warp's AI agent rather than run directly as a shell command. Useful for repeatable AI tasks like "summarize the git log since last release."
  </Card>
</CardGroup>

## Creating a workflow

<Steps>
  <Step title="Open the workflow creator">
    You can create a workflow in several ways:

    * Click **Save as Workflow** in any block's toolbar to pre-populate the creator with that block's command.
    * Open the command palette (`Cmd+P` / `Ctrl+P`) and search for **Create workflow**.
    * Open the workflow library (via the left sidebar or **Cmd+Shift+R**) and click **New workflow**.
  </Step>

  <Step title="Fill in the details">
    Give your workflow a **name** — this is how you'll find it later. Optionally add:

    * **Description** — a plain-English explanation of what the workflow does.
    * **Tags** — to organize workflows by category (e.g., `git`, `docker`, `deployment`).
    * **Shell restrictions** — limit the workflow to specific shells (bash, zsh, fish, PowerShell) if it uses shell-specific syntax.
  </Step>

  <Step title="Add arguments (optional)">
    Replace variable parts of the command with argument placeholders using the `{{argument_name}}` syntax. For each argument, you can set:

    * A **name** and **description** shown in the fill-in UI.
    * An **argument type**: free text, a file path, or an **enum** (a predefined list of values from Warp Drive).
    * A **default value** that is pre-filled when the workflow runs.
  </Step>

  <Step title="Save and sync">
    Click **Save**. Local workflows are saved immediately. Cloud workflows (personal or team) are synced to Warp Drive and available on all your devices.
  </Step>
</Steps>

## Parameterized workflows

Parameterized workflows let you define a command template where certain values are filled in at runtime. For example:

```bash theme={null}
git checkout -b {{branch_name}}
```

When you run this workflow, Warp prompts you to enter a value for `branch_name` before inserting the command. You can also define enum-type arguments to show a dropdown of allowed values instead of a free-text input.

```bash theme={null}
kubectl get pods -n {{namespace}} --context {{cluster}}
```

<Tip>
  Enum arguments pull their list of values from a Warp Drive **enum object**. This means all teammates using the same workflow see the same up-to-date list of allowed values — useful for namespaces, environments, or region codes that change over time.
</Tip>

## Running a workflow

You can run any saved workflow from several entry points:

* **Command palette** — open with `Cmd+P` / `Ctrl+P`, type the workflow name or a keyword, and press `Enter`.
* **Workflow library** — open with `Cmd+Shift+R` / `Ctrl+Shift+R`. Browse by category, search, or filter by source.
* **Slash menu** — type `/` in the input area to open a quick-access menu of recent workflows.
* **Up-arrow history** — if a workflow was previously run, it appears in up-arrow history alongside regular commands.
* **Agent Mode** — Warp AI can suggest and insert relevant workflows as part of an agent session.

## Workflow sources

Workflows can come from several sources:

| Source           | Description                                                                        |
| ---------------- | ---------------------------------------------------------------------------------- |
| `local`          | Stored in a local YAML file on your machine                                        |
| `project`        | Stored in a `.warp/workflows/` directory in a git repo, shared via version control |
| `personal_cloud` | Synced to your Warp account, available on all your devices                         |
| `team`           | Shared with a Warp team (requires a team plan)                                     |
| `global`         | Curated community workflows shipped with Warp                                      |
| `warp_ai`        | Ephemeral workflows generated by Warp AI — not persisted unless you save them      |
| `notebook`       | Workflows embedded inside a Warp notebook document                                 |

## Workflow file format

Local and project workflows are stored as YAML files. A command workflow looks like this:

```yaml theme={null}
name: "Deploy to staging"
command: "kubectl apply -f {{manifest_path}} --context staging"
description: "Apply a Kubernetes manifest to the staging cluster"
tags:
  - kubernetes
  - deployment
arguments:
  - name: manifest_path
    description: "Path to the YAML manifest file"
    default_value: "./k8s/deployment.yaml"
```

An Agent Mode workflow looks like this:

```yaml theme={null}
type: agent_mode
name: "Summarize recent git activity"
query: "Summarize the git commits from the last {{days}} days and list any breaking changes"
arguments:
  - name: days
    description: "Number of days to look back"
    default_value: "7"
```

## Sharing workflows

To share a workflow with your team:

1. Open the workflow in the workflow library.
2. Click **Share** and choose a team destination, or copy the workflow as YAML to paste into a pull request.
3. Team members with access to the same Warp team will see the shared workflow appear automatically in their workflow library.

<Note>
  Workflows shared at the `project` source level live alongside your code in version control. Add a `.warp/workflows/` directory to your repository and commit YAML workflow files there — any Warp user who opens that repository will automatically see those workflows.
</Note>

## Workflow aliases

Warp also supports **shell aliases** as a lightweight alternative to workflows. Aliases defined in your shell's rc file (`.bashrc`, `.zshrc`, etc.) are resolved by the completion engine and appear in history. However, aliases cannot be parameterized, shared via Warp Drive, or run from the command palette — for those use cases, use a proper workflow.

## The workflow library

The workflow library is the central browsing UI for all your workflows. It is organized into **categories** (from `categories.rs` in the workflows module) that group workflows by topic or source. Use the search box at the top to filter by name, description, or tag.

<Tip>
  You can export a workflow to YAML from the workflow library by clicking the **Export** button on any workflow that supports export. This is useful for migrating workflows into version control or sharing them outside of Warp.
</Tip>
