# CLI: Pods & Lifecycle

> List, filter, and inspect Pods, check live metrics and transactions, and stop, start, restart, or delete Pods via the meshive CLI.

Source: https://docs.meshive.ai/sdk-cli/cli/pods/

Inspecting Pods, live metrics, pod transactions, and stop/start/restart/delete lifecycle commands in the `meshive` CLI. See [CLI Overview & Options](/sdk-cli/cli/) for global flags, [Pod Create & Update](/sdk-cli/cli/pod-create-update/) for creating and editing Pods, and [Ports, SSH & Exec](/sdk-cli/cli/pod-access/) for locked ports, port forwarding, SSH, watched folders, command execution, and logs.

## `meshive pods`

Lists pods in a workspace, or across all workspaces with `--all`.

```bash
meshive pods <workspace>       # one workspace (by ID)
meshive pods --all             # every workspace (adds a WORKSPACE column)
```

> **Note:**
> Pass **either** a workspace ID **or** `--all`, not both and not neither. With `--all`, a workspace that fails to list is skipped with a warning rather than aborting the whole command.

Columns: **NAME**, **ID**, (**WORKSPACE** with `--all`), **STATUS**, **RENTAL**, **PRICE/HR**, **CREATED**. Price is shown only for **running** pods (stopped/waiting pods aren't billed).

### Filters

Filtering is **client-side** — the API returns the full list and the CLI narrows it.

| Flag | Description |
| --- | --- |
| `--status` | Filter by status. Repeatable or comma-separated, e.g. `--status running,error`. |
| `--rental` | `spot` or `demand`. |
| `--name` | Substring match on the display name (alias). |

```bash
meshive pods <workspace> --status running
meshive pods <workspace> --status running,error    # comma-separated…
meshive pods <workspace> --status running --status error   # …or repeated
meshive pods <workspace> --rental spot
meshive pods <workspace> --name llama
```

Valid pod statuses (an unknown value is rejected with the list, rather than silently returning nothing):

```text
pending  creating  running  waiting  stopping
stopped  error  unreachable  terminating  terminated
```

## `meshive pod`

Shows a single pod in detail.

```bash
meshive pod <workspace> <pod>
```

Both arguments are **IDs** — the workspace's namespace name and the pod's name (the **ID** column from `meshive pods`), not the display aliases. Output includes name, id, workspace, status, rental, price/hr, created time, and a maintenance notice when the pod is under maintenance. Resources on a machine with an open maintenance window aren't billed.

It also lists the pod's URLs (**ENDPOINT**, **PORT**, **ACCESS**, **URL**, **STATE**) and the logins the console shows on Connect (**CREDENTIAL**, **VALUE**), such as the `ACCESS_PASSWORD` a ComfyUI pod generates. Secret values are hidden unless you add `--show-secrets`:

```bash
meshive pod <workspace> <pod> --show-secrets
```

Secret values come back only to an API key with write scope; a read-only key gets `***`, and the CLI says so.

**ACCESS** (1.10 or later) is `Internal` (reachable only from the workspace), `Locked` (workspace members in the browser and programs with an [access key](/documentation/endpoint-access-keys/)) or `Unlocked` (anyone with the URL). See [Locked ports](/documentation/endpoint-access/).

When they apply, it also says that the system stopped the pod and why, why the pod can't start on its original machine now, and what a waiting pod is waiting for. `-o json` prints the API payload as your key receives it: secret variables are `***`, except the Connect logins a key with write scope gets.

## `meshive pod-metrics`

Shows a pod's live resource usage: CPU cores and usage, RAM size and usage, each GPU's core and VRAM usage and temperature, and ephemeral disk usage.

```bash
meshive pod-metrics <workspace> <pod>
```

A usage shows as `n/a` when the measurement is not available (for example right after start). A pod that has not been placed on a machine yet has no metrics and the command fails with an explanation.

## `meshive transactions`

Shows the pod operations still in flight in a workspace — the way to see why a pod is still `creating`. Alias `txn`.

```bash
meshive transactions <workspace>
```

Columns: **POD**, **TXN** (the transaction ID a write command printed), **ACTION** (`create`, `start`, `stop`, `restart`, …), **STATUS**, **STEP** (the current stage), **PROGRESS**, **DETAIL** (the failure reason when one is known) and **UPDATED**. A pod that stays `creating` is usually pulling its image, not stuck. **PROGRESS** is shown for stages that report it — image pull, asset fetch and storage preparation — and is `-` when the stage reports none, which does not mean 0%. Finished operations drop off the list, and a failed one stays for only a few minutes, so an empty result means nothing is in flight, not that nothing failed; check the pod's own status, or look the operation up with [`meshive transaction`](#meshive-transaction). `-o json` returns every step with its diagnostics.

**PROGRESS** names the pause when downloaded bytes stop moving (`verifying`, `waiting for storage`), and when an input asset download fails the command prints the last 10 lines of that download container's log under the table.

## `meshive transaction`

Shows one pod operation by its transaction ID — the one `pod-create` or another pod write command printed, or the **TXN** column of `meshive transactions`. There is no time limit, so it also shows operations that finished or failed long ago.

```bash
meshive transaction <workspace> <id>
```

The output gives the pod, the action, the status, the current step with its progress and, for a failed operation, the **reason** — the step it failed at and why, such as an image that can't be pulled. A table of every step (**STEP**, **STATUS**, **DETAIL**, **UPDATED**) follows, and when an input asset download failed, the end of that download container's log. `-o json` returns the full operation.

## `meshive pod-stop`, `pod-start`, `pod-restart`, `pod-delete`

```bash
meshive pod-stop <workspace> <pod>
meshive pod-start <workspace> <pod> [--placement <placement>] [--any-node] [--allow-data-loss] [-y]
meshive pod-restart <workspace> <pod>
meshive pod-delete <workspace> <pod> [--delete-local-storage <storage> ...] [-y]
```

- **stop** scales the pod to zero. Pod billing stops; attached storage keeps being billed (except on a machine with an open maintenance window).
- **start** resumes a stopped pod. `--placement` chooses where:

  | Placement | Starts the pod |
  | --- | --- |
  | `same_node` | On its original machine. |
  | `any_node` | On any machine with room. `--any-node` is short for this. |
  | `wait_same_node` | On its original machine; if it has no room yet, the pod stays `waiting` and starts by itself once it does. |
  | `wait_any_node` | On any machine; if none has room yet, the pod stays `waiting` and starts by itself once one does. |

  Without `--placement` or `--any-node`, the server picks what the console's Start button would: `wait_any_node` for a pod already waiting for any machine; `any_node` — or `wait_any_node` if no machine has room right now — when the pod can no longer run on its original machine; otherwise `same_node`, or `wait_same_node` if its original machine has no room right now. The output's `placement:` row shows which one was used, and a waiting placement adds a note that the pod starts once a machine has room. Before 1.1 the default was always `same_node`; pass `--placement same_node` to keep that.

  Use `--any-node` or `--placement`, not both with different values. `any_node` and `wait_any_node` can move the pod to another machine, which can permanently delete unpreserved workspace files; local volumes stay behind on the old machine. Billing confirmation is separate from data loss consent. When loss is possible or unknown, interactive use asks a second question; unattended use requires **both `--yes` and `--allow-data-loss`**, otherwise it exits `2` without starting the pod. If the server's own pick would move a pod with unpreserved workspace files, nothing starts either: the command prints the loss warning, names the placement and exits `2`. To consent, run it again with `--placement <that placement> --allow-data-loss` (plus `--yes` when unattended).
- **delete** removes the pod. Network storage survives; local (`hostPath`) volumes are deleted only when named with `--delete-local-storage`.
