# CLI (/docs/run/cli)



Three tools. `nylorun` runs local Tenants. `nylo` talks to a Runtime.
`npm create @nylorun/agent` writes a project.

## `npx nylorun` [#npx-nylorun]

```text
npx nylorun <start|stop|status|logs|studio|ls|reset|delete|sandbox|doctor|telemetry>
```

`up` and `down` are aliases of `start` and `stop`.

| Command           | Flags                                                                                                                                                            | Exit notes                                                                                                    |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `start` / `up`    | `--tenant <name>`, `--no-link`, `--no-studio`, `--no-open`, `--allow-downgrade`, `--restate-ui`, `--studio-embed-origin <origin>`, `--studio-embed-origin-reset` | Creates the Tenant on first run. Exit 5 if this `nylorun` pins an older Runtime than the Tenant last ran.     |
| `stop` / `down`   | `--tenant <name>` or `--all`                                                                                                                                     | Keeps volumes. `--all` cannot combine with `--tenant` (exit 2).                                               |
| `status`          | `--tenant <name>`, `--json`                                                                                                                                      |                                                                                                               |
| `logs [service]`  | `--tenant <name>`, `-f`, `--tail <n>`                                                                                                                            | Services: `postgres`, `restate`, `s2-lite`, `rustfs`, `gateway`, `runtime`, `harness`, `studio`, `sandboxes`. |
| `studio`          | `--tenant <name>`, `--no-open`                                                                                                                                   | Single-use login, two minutes.                                                                                |
| `ls`              | `--json`                                                                                                                                                         |                                                                                                               |
| `reset`           | `--tenant <name>`, `--yes`                                                                                                                                       | Deletes this Tenant's data.                                                                                   |
| `delete <tenant>` | `--yes`                                                                                                                                                          | Required. Removes files and the vault key.                                                                    |
| `doctor`          | `--json`                                                                                                                                                         | Node, Docker, Compose v2, Tenant health.                                                                      |
| `telemetry`       | `status`, `enable`, `disable`                                                                                                                                    | Studio page views.                                                                                            |
| `sandbox ls`      | `--tenant <name>`, `--label <k=v>`, `--json`                                                                                                                     |                                                                                                               |
| `sandbox rm <id>` | `--tenant <name>`                                                                                                                                                | Refused while a turn runs.                                                                                    |
| `sandbox enable`  | `--context <name>`, `--tenant <name>`, `--host-address`, `--bind-address`, `--no-pull`                                                                           | Pod sandboxes (preview).                                                                                      |
| `sandbox disable` | `--tenant <name>`, `--delete-namespace`                                                                                                                          |                                                                                                               |
| `sandbox status`  | `--tenant <name>`, `--json`                                                                                                                                      |                                                                                                               |

Removed commands exit 2 naming the replacement: `nylorun dev`,
`nylorun configure`, `nylorun status --env`, `nylorun doctor sandbox`.

## `npx @nylorun/cli` (`nylo`) [#npx-nyloruncli-nylo]

```text
npx @nylorun/cli <status|reset|endpoints|configure|env|doctor>
```

Talks to the linked Tenant, or to `NYLORUN_RUNTIME_URL` and
`NYLORUN_SERVER_KEY`.

| Command                  | Flags                                         | Role                                                   |
| ------------------------ | --------------------------------------------- | ------------------------------------------------------ |
| `status`                 | `--json`                                      | Tenant checks and counts.                              |
| `reset`                  | `--sessions`, `--sandboxes`, `--all`, `--yes` | Clear Tenant data.                                     |
| `endpoints`              | `--json`                                      | Registered Action endpoints.                           |
| `endpoints ping <agent>` |                                               | Signed ping through the Runtime.                       |
| `configure`              |                                               | Model wizard.                                          |
| `env`                    |                                               | Prints `NYLORUN_RUNTIME_URL` and `NYLORUN_SERVER_KEY`. |
| `doctor sandbox`         | `--json`                                      | Which sandbox backend this Tenant uses.                |

## `npm create @nylorun/agent` [#npm-create-nylorunagent]

```text
npm create @nylorun/agent@beta <dir> [--yes]
```

Writes the starter project and installs dependencies. It starts nothing.

## Next step [#next-step]

<Cards>
  <Card title="Local Tenants" description="How start, reset, and delete differ." href="/docs/run/tenants" />

  <Card title="Quickstart" description="Start the Runtime, then connect with a client." href="/docs" />
</Cards>
