> For the complete documentation index, see [llms.txt](https://docs.pipekit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pipekit.io/reference/cli/commands.md).

# Commands

The Pipekit CLI's core commands: login, submit, get run, get workflow-node, list, stop/terminate/restart/retry, logs, update cluster, import workflows.

Every command listed here is also doable via the [REST API](https://docs.pipekit.io/reference/rest-api.md), the [Python SDK](https://docs.pipekit.io/reference/python-sdk.md), and the UI. In the UI, you retry from the node panel of the workflow graph with `RETRY NODE`. For the MCP Server (LLM client integration), including the `retry_run` tool, see [AI > Setup](https://docs.pipekit.io/ai/setup.md).

## Log in

```bash
pipekit login
```

You'll be prompted to pick either username/password or SSO, depending on how your account was created. After login, the CLI stores your access token at `~/.pipekit/token` (override via `PIPEKIT_CONFIG_DIR`).

For non-interactive login (CI, containers), see [Advanced > Non-interactive login](https://docs.pipekit.io/reference/cli/advanced.md#non-interactive-login).

## Submit a workflow

```bash
pipekit submit --cluster-name=<cluster> --namespace=<ns> path/to/workflow.yaml
```

If no Pipe with the workflow's `generateName` exists on the cluster, Pipekit creates one. Subsequent submissions of the same workflow add new Runs to the existing Pipe. For the Pipe / Run model, see [Concepts > Workflow vs Pipe vs Run](https://docs.pipekit.io/concepts/workflow-vs-pipe-vs-run.md).

Under basic permissions, `submit` needs the create permission. Under multi-tenant RBAC, `submit` needs the Editor or Workspace Admin role. Pipekit refuses a Runner with a `role_insufficient` error. A submission to a workspace where you have no role fails with a not-found error. If you cannot see the cluster, the CLI prints `cluster <name> not found or you don't have access to it`. Otherwise Pipekit answers `not found or no access`. A submission to a workspace where your role is too low, such as Viewer, fails with `role_insufficient`.

| Flag             | Shorthand | Type                    | Description                                                  |
| ---------------- | --------- | ----------------------- | ------------------------------------------------------------ |
| `--namespace`    | `-n`      | string                  | Name of the namespace to submit the workflow to.             |
| `--cluster-name` | `-c`      | string                  | Name of the cluster to submit the workflow to. **Required.** |
| `--open-ui`      |           | bool                    | Open the UI for the submitted workflow.                      |
| `--parameter`    | `-p`      | stringArray (key=value) | Pass input parameter(s).                                     |
| `--wait`         | `-w`      | bool                    | Wait for the submitted workflow to complete.                 |
| `--pipe-name`    | `-d`      | string                  | Name of the Pipe to submit the workflow to.                  |
| `--json`         |           | bool                    | Output the run details in JSON format.                       |

## Get information about a Run

```bash
pipekit get run --run-uuid=<uuid>
```

You can also look up a Run by `(cluster, namespace, workflow-name)`:

```bash
pipekit get run --cluster-name=clusterA --namespace=default --workflow-name=workflowA
```

If multiple Runs match, the latest one is returned.

| Flag              | Shorthand | Type   | Description                                             |
| ----------------- | --------- | ------ | ------------------------------------------------------- |
| `--run-uuid`      | `-r`      | string | Run UUID of the workflow you want to get.               |
| `--cluster-name`  | `-c`      | string | Name of the cluster where the workflow is located.      |
| `--namespace`     | `-n`      | string | Kubernetes namespace where the workflow is/was running. |
| `--workflow-name` | `-w`      | string | Name of the workflow.                                   |

## Get information about one workflow node

A workflow node is one entry in a Run's graph. This command reports the node's status and the Kubernetes node it ran on, including that machine's instance type.

```bash
pipekit get workflow-node --run-uuid=<uuid> --node-id=<id>
```

`--node-id` accepts the node ID, its name, or its display name. A name can match more than one node, which happens when a step is retried or runs inside a loop. The command then lists the matching node IDs and asks you to pick one.

`Kubernetes Node` and `Instance Type` read `-` for a node that does not run a pod, such as a DAG, Steps, or StepGroup node. `Instance Type` also reads `-` in these cases:

* The cluster runs a Pipekit Agent that does not report the instance type.
* The Kubernetes node has no `node.kubernetes.io/instance-type` label.
* Cluster scraping is turned off with `features.metrics.scrapeCluster`.
* Pipekit holds no metrics for that node, or the metrics query failed.
* Two machines used the same Kubernetes node name around the same time, so Pipekit cannot tell which one ran the step.

| Flag         | Shorthand | Type   | Description                                                  |
| ------------ | --------- | ------ | ------------------------------------------------------------ |
| `--run-uuid` | `-r`      | string | **Required.** Run UUID of the Run the node belongs to.       |
| `--node-id`  |           | string | **Required.** ID, name or display name of the workflow node. |

## List clusters, Pipes, and Runs

Under multi-tenant RBAC, `list pipes` and `list runs` return results from every workspace you can view. The CLI has no workspace flag. For what each role can see, refer to [Workspaces](https://docs.pipekit.io/using-pipekit/workspaces.md#lists-outside-a-workspace).

### List clusters

```bash
pipekit list clusters
```

### List Pipes

```bash
pipekit list pipes --cluster-name=<cluster>
```

| Flag             | Shorthand | Type   | Description                                     |
| ---------------- | --------- | ------ | ----------------------------------------------- |
| `--all`          | `-A`      | bool   | Get all Pipes, both enabled and disabled.       |
| `--cluster-name` | `-c`      | string | Name of the cluster to list from. **Required.** |
| `--enabled`      |           | bool   | Enabled/disabled switch (default true).         |

### List Runs

```bash
pipekit list runs --cluster-name=<cluster>
```

| Flag             | Shorthand | Type        | Description                                         |
| ---------------- | --------- | ----------- | --------------------------------------------------- |
| `--cluster-name` | `-c`      | string      | Name of the cluster to list from.                   |
| `--all`          | `-A`      | bool        | Get all Runs, regardless of status.                 |
| `--statuses`     | `-s`      | stringArray | Get Runs with a given status (defaults to running). |

## Run actions: stop, terminate, restart, retry

```bash
# Stop a running workflow (exit handlers complete)
pipekit stop --run-uuid=<uuid>

# Terminate a running workflow immediately (no exit handlers)
pipekit terminate --run-uuid=<uuid>

# Resubmit a workflow with the same parameters
pipekit restart --run-uuid=<uuid>

# Rerun only the failed steps of a finished workflow
pipekit retry --run-uuid=<uuid>
```

Under basic permissions, these actions need the update permission. To restart a run that a git branch, tag, or pull request started, you also need the create permission. Under multi-tenant RBAC, these actions need the Runner, Editor, or Workspace Admin role. A Viewer gets a `role_insufficient` error. If you have no role in the run's workspace, the CLI prints a not-found error, such as `apply stop: not found or no access`.

`stop` and `terminate` take the same flag:

| Flag         | Shorthand | Type   | Description                                                                |
| ------------ | --------- | ------ | -------------------------------------------------------------------------- |
| `--run-uuid` | `-r`      | string | Run UUID of the running workflow you want to stop/terminate. **Required.** |

`restart` takes:

| Flag         | Shorthand | Type   | Description                                            |
| ------------ | --------- | ------ | ------------------------------------------------------ |
| `--run-uuid` | `-r`      | string | Run UUID of the run you want to restart. **Required.** |
| `--open-ui`  |           | bool   | Open the UI of the resubmitted workflow.               |
| `--wait`     | `-w`      | bool   | Wait for the workflow to complete.                     |

### Choose between restart and retry

`restart` runs the whole workflow again from the beginning. `retry` keeps the steps that already succeeded and reruns only the failed ones, which is faster on large workflows where a few steps failed. `restart` creates a new Run with a new run UUID; `retry` reuses the existing Run and puts it back into a running state.

If you come from the Argo CLI, `pipekit restart` matches `argo resubmit` and `pipekit retry` matches `argo retry`.

### Retry a workflow

Retry only applies to a Run whose workflow has finished. Argo accepts the retry when the workflow ended in failure or error. A Run that is still queued or running is rejected, so stop or terminate it first, then retry. To retry a workflow that finished successfully, pass both `--node-field-selector` and `--restart-successful`; without both flags Argo rejects the request.

Name the run either by its run UUID, or by workflow name together with the cluster and namespace:

```bash
# Retry every failed step, by workflow name
pipekit retry my-wf --cluster-name=production --namespace=argo

# Retry every failed step, by run UUID
pipekit retry --run-uuid=<uuid>

# Reset one node and every node below it
pipekit retry --run-uuid=<uuid> --node-field-selector=id=5

# Rerun a node that already succeeded
pipekit retry --run-uuid=<uuid> --node-field-selector=id=5 --restart-successful

# Override parameters and wait for the result
pipekit retry my-wf -c production -n argo -p message=modified --wait
```

Under multi-tenant RBAC, `--parameter` needs the Editor or Workspace Admin role. A Runner who passes `--parameter` gets a `role_insufficient` error. A Runner can retry without it, and the retry uses the run's own parameters.

`retry` takes:

| Flag                    | Shorthand | Type        | Description                                                                                  |
| ----------------------- | --------- | ----------- | -------------------------------------------------------------------------------------------- |
| `--run-uuid`            | `-r`      | string      | Run UUID of the run you want to retry. Use this instead of a workflow name.                  |
| `--cluster-name`        | `-c`      | string      | Cluster the workflow ran on. Required with a workflow name.                                  |
| `--namespace`           | `-n`      | string      | Kubernetes namespace. Required with a workflow name.                                         |
| `--node-field-selector` |           | string      | Nodes to reset, for example `id=5`. Leave it out to retry every failed node.                 |
| `--restart-successful`  |           | bool        | Also rerun nodes that already succeeded and match `--node-field-selector`.                   |
| `--parameter`           | `-p`      | stringArray | Parameter to override on the retried workflow, as `KEY=VALUE`. Repeat the flag for each one. |
| `--wait`                | `-w`      | bool        | Wait for the workflow to complete.                                                           |

Argo reads `--node-field-selector` only when `--restart-successful` is set as well. Without `--restart-successful`, retry reruns the steps that failed and the selector has no effect.

`--parameter` replaces the workflow's top-level arguments, so only the steps that are reset and rerun read the new value. Steps kept from the previous attempt keep the outputs they already produced.

Retry reuses the Run you named rather than creating a new one, so check the same run UUID to confirm the steps reset:

```bash
pipekit get run --run-uuid=<uuid>
```

The Run returns to a running status and the reset steps start again.

{% hint style="info" %}
Retry reads the step status from the workflow. If your Argo Workflows controller offloads that status to a database, give Pipekit Agent access to the same database through [Node Status Offloading](https://docs.pipekit.io/using-pipekit/operating-at-scale/node-status-offloading.md). Without that access, Pipekit Agent rejects the retry and the workflow does not rerun. The CLI still prints `Workflow retry requested`, because it returns before the agent evaluates the request.
{% endhint %}

When the status does not change, open the Run in the Pipekit UI. An `Action not applied` banner at the top of the Run gives the reason the agent rejected the retry. If the banner says Pipekit could not read the workflow's step status, set up Node Status Offloading on the agent, or use `pipekit restart` to rerun the whole workflow.

## View pod logs

```bash
pipekit logs --run-uuid=<uuid> --follow
```

Filter by pod and container name; follow the stream to tail logs as they're produced.

| Flag          | Shorthand | Type   | Description                                |
| ------------- | --------- | ------ | ------------------------------------------ |
| `--run-uuid`  | `-r`      | string | UUID of the Run. **Required.**             |
| `--container` | `-c`      | string | Name of the container to filter logs by.   |
| `--pod`       | `-p`      | string | Name of the pod to filter logs by.         |
| `--node-id`   | `-n`      | string | ID of the workflow node to filter logs by. |
| `--follow`    | `-f`      | bool   | Follow log stream until the Run finishes.  |

## Update a cluster

```bash
pipekit update cluster <cluster-name> --status=active
pipekit update cluster <cluster-name> --name=production --description="Production cluster"
```

Requires admin permissions.

| Argument/Flag   | Type   | Description                                               |
| --------------- | ------ | --------------------------------------------------------- |
| `cluster-name`  | string | Name of the cluster to update. **Required (positional).** |
| `--name`        | string | New name for the cluster.                                 |
| `--description` | string | New description for the cluster.                          |
| `--status`      | string | New status for the cluster (`active` or `inactive`).      |

## Import from Workflow Archive

Import archived workflows from an [Argo Workflow Archive](https://argo-workflows.readthedocs.io/en/stable/workflow-archive/) into Pipekit:

```bash
pipekit import workflows --cluster-name=<cluster>
```

Under basic permissions, you need the create permission. Under multi-tenant RBAC, you need the Editor or Workspace Admin role.

{% hint style="warning" %}
The import of [Workflow Archive Logs](https://argo-workflows.readthedocs.io/en/stable/configure-archive-logs/) is not supported.
{% endhint %}

| Flag                  | Shorthand | Type    | Description                                                                           |
| --------------------- | --------- | ------- | ------------------------------------------------------------------------------------- |
| `--cluster-name`      | `-c`      | string  | Name of the cluster to assign workflows to. **Required.**                             |
| `--argoServerURI`     |           | string  | Argo Server URI (defaults to `localhost:2746`).                                       |
| `--argoAuthToken`     |           | string  | Argo Server authentication token.                                                     |
| `--batchSize`         |           | integer | Number of workflows to fetch from the Workflow Archive per API call (defaults to 10). |
| `--argoServerSubPath` |           | string  | Sub-path used when connecting to Argo Server.                                         |
| `--insecure`          | `-k`      | bool    | Skip TLS verification (defaults to false).                                            |
| `--useSSL`            |           | bool    | Use SSL when connecting to Argo Server (defaults to true).                            |

## Manage the RBAC policy

Org Admins publish, read, and list versions of the organization's RBAC policy:

```bash
pipekit rbac publish -f policy.yaml
pipekit rbac get
pipekit rbac list
```

For every flag and the policy format, refer to [RBAC Policies](https://docs.pipekit.io/reference/cli/rbac.md).

## What's next

* [Cron Workflows](https://docs.pipekit.io/reference/cli/cron-workflows.md): CronWorkflow lifecycle commands.
* [RBAC Policies](https://docs.pipekit.io/reference/cli/rbac.md): publish, read, and roll back the RBAC policy.
* [Using with Hera](https://docs.pipekit.io/reference/cli/using-with-hera.md): token generation for Hera-authored workflows.
* [Advanced](https://docs.pipekit.io/reference/cli/advanced.md): Docker container usage, non-interactive login, token storage, log-level flags.
