---
title: "CLI reference"
description: "Every tatolab command, its options, and what it prints."
type: "docs-page"
url: "https://tatolab.com/docs/reference/cli"
site: "Tatolab"
section: "Reference"
---

# CLI reference

> Every tatolab command, its options, and what it prints.

`tatolab` asks the machine's runtime to create, open, play and manage projects, and reads what their streams do. Every command except `enable-virtual-camera` needs the runtime running; without it, they stop at once with:

```txt
error: no runtime is running on this machine: nothing answers at <socket>. Start one by opening Tato Studio, or by running `tatolabd` in a terminal.
```

If another user's runtime holds the machine, the message names it. Run `tatolab <command> --help` for the same details in your terminal, and `tatolab --version` (`-V`) for the CLI's version and the running runtime's.

The project commands act on the project in the current folder, or the one `--dir` names. Those that queue a **stream action** print its ID and how to follow it, and return at once:

```txt
Rk3x9q2m7v1c8b4n6p0w5z2ty-4 queued: open of /home/you/cameras
  follow it: tatolab logs -f --dir /home/you/cameras
```

They exit 0 once the action is queued, and 1 only when the request is refused or no runtime answers. A verb that doesn't fit the project's state is refused, naming the one that does.

## Projects

### `tatolab new`

```txt
tatolab new [DIRECTORY] [--sample NAME]
```

Creates a project in `DIRECTORY`, or with none in a new folder `<adjective>-<noun>` under `~/streams`, and queues its open. The runtime writes the starter (`tatolab-project.json`, `streams/main.graph.json` holding the test pattern, `pyproject.toml`, `.python-version` and `.gitignore`), or with `--sample` copies that sample project, commits it as the project's first revision, makes its `.venv`, and loads the stream, held stopped until `tatolab play`. A `DIRECTORY` already holding one of those files fails the action with nothing written; a sample the runtime doesn't carry is refused, naming the ones it does. The samples are the [examples](https://tatolab.com/docs/examples).

### `tatolab open`

```txt
tatolab open [--dir DIR] [--play]
```

Queues an open: the runtime makes the `.venv` if it doesn't run, reads every graph document in the project, and loads each as a stream, held stopped so its graph reads and edits. The project stays open across the runtime's restarts until `close` or `rm`. `--play` queues its playback behind the open. Refused for a project that's already open: `reload` re-reads it.

### `tatolab play`

```txt
tatolab play [--dir DIR]
```

Queues the playback of an open project: each stream starts fresh from the graph it holds. Refused for a paused project: `resume` it.

### `tatolab pause` and `tatolab resume`

```txt
tatolab pause [--dir DIR]
tatolab resume [--dir DIR]
```

`pause` pauses every stream of the project at once, without waiting behind its queue: its nodes hold their state, and a scaled or stepped clock stops where it stands. Graph edits made while it's paused are kept, and take effect at `resume`. A runtime that restarts opens the project paused.

### `tatolab stop`

```txt
tatolab stop [--dir DIR]
```

Queues the end of the project's playback: every node, device claim, function-node state and clock torn down. Each stream's graph stays loaded to read and edit, and the project stays stopped across restarts until `play`. A project plays and stops as a whole; no command stops one stream of it.

### `tatolab reload`

```txt
tatolab reload [--dir DIR]
```

Queues a soft re-read of an open project from disk, keeping its playback. Each stream keeps its ID; its graph is brought to its document in place while the node code is unchanged, and loaded again otherwise. A reload also tries again a stream held stopped after crashes.

### `tatolab dev`

```txt
tatolab dev [--dir DIR]
```

Opens the project, or reloads it if it's open, plays it unless it's playing or paused, follows its log, and watches its `.py` files, graph documents, `tatolab-project.json` and `pyproject.toml`. Each save queues a reload; a saved `.py` file first refreshes every fragment whose graph generator its module defines. When the runtime goes away, `dev` says so, waits for it, and follows the log again as the runtime re-opens the project. Ctrl-C ends `dev` and leaves the project as it is.

### `tatolab close`

```txt
tatolab close [--dir DIR]
```

Queues the end of the project's playback and the unload of its streams, recording each closed and deleting nothing. `open` brings it back.

### `tatolab rm`

```txt
tatolab rm [--dir DIR]
```

Queues the unload of every stream of the project, and forgets it, so it doesn't come back at the runtime's next start. It deletes no files.

### `tatolab cancel`

```txt
tatolab cancel ACTION
```

Takes a stream action back: a queued one is dropped, and an open or reload under way stops at its current step.

## Streams

### `tatolab streams`

```txt
tatolab streams
```

Lists every stream the runtime holds:

```txt title="Output"
ID                         NAME        STATE    NODES  PROJECT            ASSET
cameras-front-door-51c7a2  front-door  running  4      /home/you/cameras  2b7e0c1d-…
```

| Column | |
|---|---|
| `ID` | The stream's ID: the project's name, the graph document's name, and a hash of the project's and the stream's UUIDs |
| `NAME` | Its display name |
| `STATE` | `running`, `paused`, `stopped`, `closed`, `preparing`, `stopping` or `failed` |
| `NODES` | How many nodes it holds |
| `PROJECT` | The project's folder |
| `ASSET` | The stream's UUID, the `asset` its graph document holds |

Under the table, a line for each stream that's preparing names its step, and one for each failed stream says why. With no streams it prints `No streams in this runtime.`

### `tatolab clock`

```txt
tatolab clock [STREAM] --scale SCALE
```

Runs a stream's scaled clock at another scale, live: `0.5` is half speed, `1` real time. Stream time carries on from where it stands, and every node's time, stamps and pace follow it. Refused for a stream on the real or a stepped clock. Live only: the next play runs the clock its graph document names.

## Observing

### `tatolab graph`

```txt
tatolab graph [--stream STREAM]
```

Prints the live graph as JSON: nodes, ports, links, states and metrics, as the runtime reports them now. Without `--stream`, every loaded stream under the machine's name. See [Inspect a running stream](https://tatolab.com/docs/run/inspect#tatolab-graph).

### `tatolab logs`

```txt
tatolab logs [--dir DIR] [--stream STREAM] [--action ID] [-f]
             [--level LEVEL] [--source SOURCE] [--node-run-id ID]
             [--pipeline ID] [--rhi] [--intercepted-only]
```

Reads a project's log, oldest record first; `-f` keeps following.

| Option | Shows |
|---|---|
| `--dir DIR` | That project's log instead of the current folder's |
| `--stream STREAM` | One stream's records, by its ID or a display name only it has |
| `--action ID` | One stream action's records |
| `--level LEVEL` | Records at this level and above: `trace`, `debug`, `info`, `warn`, `error` |
| `--source SOURCE` | `python` or `rust` |
| `--node-run-id ID` | One run of one node |
| `--pipeline ID`, `--rhi` | One GPU pipeline's records, or GPU operations only |
| `--intercepted-only` | Only captured `print()`, stdout and stderr |

See [Logs](https://tatolab.com/docs/run/logs).

## Operations

### `tatolab call`

```txt
tatolab call OPERATION [--params JSON]
```

Runs any operation the runtime serves to agents, by name, and prints its answer as JSON; a refusal prints as JSON too, with its `refusal_code` and a `suggested_call` when there is one, and exits 1. `tatolab call list_operation_groups` lists every operation, and `tatolab call describe_operations` states what each takes. For example, to set an input's value, naming the stream by its `asset` (the `ASSET` column) and the node by its `id`:

```sh
tatolab call set_node_input_value --params '{
  "stream": "2b7e0c1d-…",
  "node": "9e8d7c6b-…",
  "input": "cells_across",
  "value": 16
}'
```

## Agents

### `tatolab mcp`

```txt
tatolab mcp
```

Connects an MCP client to the runtime over standard input and output. You don't run it yourself; your client does:

```sh
claude mcp add tatolab -- tatolab mcp
claude mcp add lab -- ssh lab-machine .local/bin/tatolab mcp
```

A project the client opens is recorded by the runtime like any other, and stays open after the connection closes. See [Agents and MCP](https://tatolab.com/docs/share/agents).

## Setup

### `tatolab enable-virtual-camera`

```txt
tatolab enable-virtual-camera [--print]
```

Linux only. Grants this machine's users the permission `VirtualCameraSink` needs to create v4l2loopback cameras: it loads the module with no devices at boot, and lets the logged-in user create cameras. It's one privileged step, behind your desktop's password prompt (`sudo` in a terminal without a desktop). `--print` shows the files and commands without changing anything. See [Virtual camera](https://tatolab.com/docs/build/virtual-camera).

## The runtime: `tatolabd`

`tatolabd` is the runtime itself. Tato Studio runs it while it's open; elsewhere, run it in a terminal of its own, or as a service:

```sh
tatolabd
```

It runs in the foreground until Ctrl-C or a stop signal. A second `tatolabd` on the same machine is refused with a message naming the first one's user, process ID and executable.
