# Computer and runner commands

Your cloud computer and paired machines, and pairing this machine as a runner.

Web version: https://www.svanja.com/docs/cli/computers/

When a task runs scripts or opens websites, it uses either Svanja's cloud computer or your own machine paired as a runner. Run `svanja computer` to list these computers and start or stop them. Run `svanja runner` to pair the machine you're currently on so tasks can run commands in the folders you choose. An owner or admin needs to approve the pairing in the browser, and your plan sets how many machines you can pair. You can see your paired machines in [Connections](https://app.svanja.com/connections), or read more in [The computer and its browser](https://www.svanja.com/docs/computer-and-browser/).

To run task commands on your own machine, you need Linux, since Svanja runs them inside the bubblewrap sandbox. You can check that your setup is ready with `svanja doctor`. Once paired, `svanja runner start` stays in the foreground and takes jobs. If you only want to pair the machine and exit, add `--pair-only`:

```bash
svanja runner start --folder ~/Work --pair-only
```

Use `svanja runner status` to check the pairing, or `svanja runner unpair` to remove it.

## Commands

### svanja computer list

List computers.

This command calls GET /computers on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

```text
svanja computer list [flags]
```

Needs a stored key (svanja login) or SVANJA_API_KEY.

| Flag | What it does |
| --- | --- |
| `--query` | query parameter as key=value (repeatable) |

```bash
svanja computer list --json
svanja computer list --plain
svanja computer list --jq .
svanja computer list --template '{{.}}'
svanja computer list --json --include-meta
```

### svanja computer pair-runner

Create a local runner pairing handoff.

This command calls POST /computers on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

```text
svanja computer pair-runner [flags]
```

Needs a stored key (svanja login) or SVANJA_API_KEY.

| Flag | What it does |
| --- | --- |
| `--body` | JSON request body (mutually exclusive with --field and --body-file) |
| `--body-file` | read the JSON request body from a file, or - for stdin |
| `--dry-run` | preview the request without resolving credentials or contacting the API |
| `--field` | body field as key=value (repeatable; mutually exclusive with --body and --body-file) |
| `--idempotency-key` | explicit idempotency key (1-255 visible ASCII bytes); generated when omitted |
| `--query` | query parameter as key=value (repeatable) |

### svanja computer refresh

Refresh computer status.

This command calls POST /computers/{computer}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

```text
svanja computer refresh <computer-id> [flags]
```

Needs a stored key (svanja login) or SVANJA_API_KEY.

| Flag | What it does |
| --- | --- |
| `--body` | JSON request body (mutually exclusive with --field and --body-file) |
| `--body-file` | read the JSON request body from a file, or - for stdin |
| `--dry-run` | preview the request without resolving credentials or contacting the API |
| `--field` | body field as key=value (repeatable; mutually exclusive with --body and --body-file) |
| `--idempotency-key` | explicit idempotency key (1-255 visible ASCII bytes); generated when omitted |
| `--query` | query parameter as key=value (repeatable) |

```bash
svanja computer refresh <computer-id>
```

### svanja computer reset

Reset a computer.

This command calls POST /computers/{computer}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

```text
svanja computer reset <computer-id> [flags]
```

Needs a stored key (svanja login) or SVANJA_API_KEY.

| Flag | What it does |
| --- | --- |
| `--body` | JSON request body (mutually exclusive with --field and --body-file) |
| `--body-file` | read the JSON request body from a file, or - for stdin |
| `--dry-run` | preview the request without resolving credentials or contacting the API |
| `--field` | body field as key=value (repeatable; mutually exclusive with --body and --body-file) |
| `--idempotency-key` | explicit idempotency key (1-255 visible ASCII bytes); generated when omitted |
| `--query` | query parameter as key=value (repeatable) |

```bash
svanja computer reset <computer-id>
```

### svanja computer show

Show a computer.

This command calls GET /computers/{computer} on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

```text
svanja computer show <computer-id> [flags]
```

Needs a stored key (svanja login) or SVANJA_API_KEY.

| Flag | What it does |
| --- | --- |
| `--query` | query parameter as key=value (repeatable) |

```bash
svanja computer show <computer-id> --json
svanja computer show <computer-id> --plain
svanja computer show <computer-id> --jq .
svanja computer show <computer-id> --template '{{.}}'
svanja computer show <computer-id> --json --include-meta
```

### svanja computer sleep

Sleep a computer.

This command calls POST /computers/{computer}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

```text
svanja computer sleep <computer-id> [flags]
```

Needs a stored key (svanja login) or SVANJA_API_KEY.

| Flag | What it does |
| --- | --- |
| `--body` | JSON request body (mutually exclusive with --field and --body-file) |
| `--body-file` | read the JSON request body from a file, or - for stdin |
| `--dry-run` | preview the request without resolving credentials or contacting the API |
| `--field` | body field as key=value (repeatable; mutually exclusive with --body and --body-file) |
| `--idempotency-key` | explicit idempotency key (1-255 visible ASCII bytes); generated when omitted |
| `--query` | query parameter as key=value (repeatable) |

```bash
svanja computer sleep <computer-id>
```

### svanja computer start

Start or wake a computer.

This command calls POST /computers/{computer}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

```text
svanja computer start <computer-id> [flags]
```

Needs a stored key (svanja login) or SVANJA_API_KEY.

| Flag | What it does |
| --- | --- |
| `--body` | JSON request body (mutually exclusive with --field and --body-file) |
| `--body-file` | read the JSON request body from a file, or - for stdin |
| `--dry-run` | preview the request without resolving credentials or contacting the API |
| `--field` | body field as key=value (repeatable; mutually exclusive with --body and --body-file) |
| `--idempotency-key` | explicit idempotency key (1-255 visible ASCII bytes); generated when omitted |
| `--query` | query parameter as key=value (repeatable) |

```bash
svanja computer start <computer-id>
```

### svanja computer stop

Stop a computer.

This command calls POST /computers/{computer}/actions on the public Svanja API. The API remains authoritative for validation, access, capabilities, receipts, conflicts and domain-specific failure reasons. Use --query key=value for filters, cursors, pages or operation-specific query fields.

Build the request body with --field key=value, --body '<json>' or --body-file <path>; field flags cannot be combined with body input. Every real mutation sends an idempotency key so a retried request is not applied twice. Pass --idempotency-key <key> to supply your own. Use --dry-run to preview the method, path, query, body fields and idempotency behavior without resolving credentials or contacting the API.

Output modes: default human detail, --plain copy-safe output, --json stable JSON, and --jq/--template transforms over the documented JSON value.

--include-meta adds safe transport context under meta when --json, --jq or --template is selected. The ordinary value moves under data; output without --include-meta remains unchanged. It cannot be combined with --dry-run.

```text
svanja computer stop <computer-id> [flags]
```

Needs a stored key (svanja login) or SVANJA_API_KEY.

| Flag | What it does |
| --- | --- |
| `--body` | JSON request body (mutually exclusive with --field and --body-file) |
| `--body-file` | read the JSON request body from a file, or - for stdin |
| `--dry-run` | preview the request without resolving credentials or contacting the API |
| `--field` | body field as key=value (repeatable; mutually exclusive with --body and --body-file) |
| `--idempotency-key` | explicit idempotency key (1-255 visible ASCII bytes); generated when omitted |
| `--query` | query parameter as key=value (repeatable) |

```bash
svanja computer stop <computer-id>
```

### svanja computer

Manage computers and runner handoffs.

Use this family to call native Svanja public API operations with the active team API key. The server owns validation, access checks, authorization, receipts and domain-specific behavior; the CLI supplies product identity, explicit arguments, stable output modes and safe local request handling.

```text
svanja computer [flags]
```

Works without a key.

```bash
svanja computer --help
```

### svanja runner start

Pair this machine as a local runner.

The command starts a browser/device authorization request, records selected folders and local capabilities in Svanja, and stores the returned runner credential in the Svanja runner auth file. After pairing it stays in the foreground, sends heartbeats, runs assigned local jobs inside selected working folders, and stops only attempt-owned process groups when Svanja cancels a job. Use --pair-only to store the credential and exit without starting the worker loop.

Browser work: --shared-browser lets tasks use your running Chrome. Turn on remote debugging in Chrome (chrome://inspect/#remote-debugging) or start it with --remote-debugging-port and pass --browser-url. Task pages open in their own background windows; the runner never adds tabs to your windows, never closes pages it did not open and never deletes your profile. --automation-profile NAME instead starts a separate browser profile for Svanja (add --browser-headless to run it without windows).

On Linux, task commands run inside bubblewrap. Start warns when bubblewrap is missing or cannot start its sandbox (Ubuntu 24.04 and later need an AppArmor profile for it), and when slirp4netns is missing on a machine paired for browser work (task commands there would have no internet), and says how to fix it. svanja doctor shows the same checks; the Svanja installer offers to set both up.

```text
svanja runner start [flags]
```

Works without a key.

| Flag | What it does |
| --- | --- |
| `--automation-profile` | dedicated local automation profile label |
| `--browser-headless` | run the automation profile without windows |
| `--browser-path` | Chrome or Chromium executable for the automation profile |
| `--browser-url` | DevTools address of the shared Chrome (the local port it opened with --remote-debugging-port) |
| `--capability` | reported local capability; repeatable |
| `--folder` | local folder this runner may access; repeatable |
| `--heartbeat-interval` | status polling and heartbeat interval while the runner is active |
| `--name` | machine name to show in Svanja |
| `--pair-only` | pair and store the runner credential without starting the foreground worker loop |
| `--poll-timeout` | maximum time to wait for browser approval |
| `--runner-auth-file` | Svanja runner auth file |
| `--shared-browser` | let tasks use your running Chrome in task-owned windows |

```bash
svanja runner start --folder ~/Work --pair-only
```

### svanja runner status

Show the saved local runner pairing and refresh the remote status when the runner credential can reach Svanja. Use --json for machine-readable output.

```text
svanja runner status [flags]
```

Works without a key.

| Flag | What it does |
| --- | --- |
| `--runner-auth-file` | Svanja runner auth file |

```bash
svanja runner status --json
```

### svanja runner unpair

Revoke this local runner pairing.

This removes the local runner credential file and asks Svanja to revoke the runner connection. It requires confirmation before changing anything unless --force is supplied. In --no-prompt or non-interactive mode without --force, the command stops locally before calling Svanja or deleting the auth file.

```text
svanja runner unpair [flags]
```

Works without a key.

| Flag | What it does |
| --- | --- |
| `--runner-auth-file` | Svanja runner auth file |

```bash
svanja runner unpair --force
```

### svanja runner

Pair and manage a local runner for Svanja tasks.

The runner uses Svanja-specific local state and environment variables: SVANJA_BASE_URL, SVANJA_API_BASE_URL, and SVANJA_RUNNER_AUTH_FILE. It does not read or overwrite the normal team API key stored by svanja login.

```text
svanja runner [flags]
```

Works without a key.
