> ## Documentation Index
> Fetch the complete documentation index at: https://novita.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Befehlsreferenz

Vollständige Referenz für alle NovitaClaw CLI-Befehle.

## `launch`

Erstellen Sie eine neue Sandbox-Instanz.

```bash Bash icon="terminal" theme={"system"}
novitaclaw launch [OPTIONS]
```

| Option            | Beschreibung                                                                                |
| ----------------- | ------------------------------------------------------------------------------------------- |
| `--api-key`       | Novita API-Schlüssel                                                                        |
| `--gateway-token` | Benutzerdefiniertes Gateway-Token (optional, standardmäßig automatisch generiert)           |
| `--timeout`       | Zeitlimit für die Erstellung in Sekunden (Standard: `60`)                                   |
| `--type`          | Sandbox-Typ: `persistent` (Standard) oder `on-demand`                                       |
| `--idle-timeout`  | Leerlauf-Zeitlimit in Sekunden für den On-Demand-Modus (Standard: `300`, Bereich: 60–86400) |

## `list`

Aktive Sandbox-Instanzen auflisten.

```bash Bash icon="terminal" theme={"system"}
novitaclaw list --api-key YOUR_API_KEY
```

| Option          | Beschreibung                                                      |
| --------------- | ----------------------------------------------------------------- |
| `--api-key`     | Novita API-Schlüssel                                              |
| `--quiet`, `-q` | Nur Sandbox-IDs ausgeben, eine pro Zeile (nützlich für Skripting) |

## `status`

Status einer Sandbox-Instanz prüfen. Zeigt Webhook-URLs für alle konfigurierten Kanäle an.

```bash Bash icon="terminal" theme={"system"}
novitaclaw status <SANDBOX_ID> --api-key YOUR_API_KEY
```

| Option      | Beschreibung                                                       |
| ----------- | ------------------------------------------------------------------ |
| `--api-key` | Novita API-Schlüssel                                               |
| `--json`    | Ausgabe im JSON-Format (nützlich zum Extrahieren von Webhook-URLs) |

## `stop`

Eine Sandbox-Instanz beenden.

```bash Bash icon="terminal" theme={"system"}
novitaclaw stop <SANDBOX_ID> --api-key YOUR_API_KEY
```

| Option        | Beschreibung                          |
| ------------- | ------------------------------------- |
| `--api-key`   | Novita API-Schlüssel                  |
| `--yes`, `-y` | Bestätigungsaufforderung überspringen |

## `pause`

Eine Sandbox-Instanz pausieren. Während der Pause fallen keine Kosten an.

```bash Bash icon="terminal" theme={"system"}
novitaclaw pause <SANDBOX_ID> --api-key YOUR_API_KEY
```

## `resume`

Eine pausierte Sandbox-Instanz fortsetzen (\~1 s zum Wiederherstellen).

```bash Bash icon="terminal" theme={"system"}
novitaclaw resume <SANDBOX_ID> --api-key YOUR_API_KEY
```

## `config set`

Laufzeitkonfiguration der Sandbox aktualisieren.

```bash Bash icon="terminal" theme={"system"}
# Update idle timeout (60–86400 seconds)
novitaclaw config set <SANDBOX_ID> idle-timeout 600

# Update sandbox lifetime timeout (300–2592000 seconds)
novitaclaw config set <SANDBOX_ID> timeout 3600
```

## `tui`

Über die Terminal-UI mit einer Sandbox verbinden.

```bash Bash icon="terminal" theme={"system"}
novitaclaw tui <SANDBOX_ID> --token <GATEWAY_TOKEN>
```

## `doctor`

Diagnosen und Reparaturprüfungen für eine Sandbox-Instanz ausführen.

```bash Bash icon="terminal" theme={"system"}
novitaclaw doctor <SANDBOX_ID> --api-key YOUR_API_KEY
```

| Option                       | Beschreibung                                                                          |
| ---------------------------- | ------------------------------------------------------------------------------------- |
| `--api-key`                  | Novita API-Schlüssel                                                                  |
| `--deep`                     | Systemdienste auf zusätzliche Gateway-Installationen prüfen                           |
| `--fix`                      | Empfohlene Reparaturen anwenden (Alias für `--repair`)                                |
| `--force`                    | Aggressive Reparaturen anwenden (überschreibt benutzerdefinierte Dienstkonfiguration) |
| `--generate-gateway-token`   | Ein Gateway-Token generieren und konfigurieren                                        |
| `--no-workspace-suggestions` | Vorschläge des Workspace-Speichersystems deaktivieren                                 |
| `--repair`                   | Empfohlene Reparaturen ohne Rückfrage anwenden                                        |
| `--yes`                      | Standardwerte ohne Rückfrage akzeptieren                                              |

## `gateway update`

OpenClaw innerhalb einer Sandbox auf die neueste Version aktualisieren.

```bash Bash icon="terminal" theme={"system"}
novitaclaw gateway update <SANDBOX_ID> --api-key YOUR_API_KEY
```

| Option      | Beschreibung                        |
| ----------- | ----------------------------------- |
| `--api-key` | Novita API-Schlüssel                |
| `--restart` | Gateway nach dem Update neu starten |

## `gateway restart`

OpenClaw Gateway in einer Sandbox neu starten.

```bash Bash icon="terminal" theme={"system"}
novitaclaw gateway restart <SANDBOX_ID> --api-key YOUR_API_KEY
```

## `services setup`

Web Terminal und File Manager auf einer bestehenden Sandbox installieren und starten. Verwenden Sie dies, um älteren Sandboxes Dienste hinzuzufügen, die gestartet wurden, bevor diese Dienste enthalten waren.

```bash Bash icon="terminal" theme={"system"}
novitaclaw services setup <SANDBOX_ID> --api-key YOUR_API_KEY
```

## `pair list`

Ausstehende Pairing-Anfragen für einen Kanal auflisten.

```bash Bash icon="terminal" theme={"system"}
novitaclaw pair list <SANDBOX_ID> --channel <CHANNEL_NAME> --api-key YOUR_API_KEY
```

## `pair approve`

Eine Pairing-Anfrage für einen Kanal genehmigen.

```bash Bash icon="terminal" theme={"system"}
novitaclaw pair approve <SANDBOX_ID> --channel <CHANNEL_NAME> --code <PAIRING_CODE> --api-key YOUR_API_KEY
```

## `pair feishu`

Feishu (Lark) als Messaging-Kanal konfigurieren.

```bash Bash icon="terminal" theme={"system"}
novitaclaw pair feishu <SANDBOX_ID> \
  --app-id cli_xxx \
  --app-secret secret_xxx \
  --mode webhook \
  --verification-token tok_xxx \
  --encrypt-key key_xxx
```

| Option                 | Beschreibung                                          |
| ---------------------- | ----------------------------------------------------- |
| `--app-id`             | Feishu-App-ID                                         |
| `--app-secret`         | Feishu-App-Secret                                     |
| `--mode`               | `event` (Standard) oder `webhook`                     |
| `--verification-token` | Webhook-Verifizierungstoken (nur Webhook-Modus)       |
| `--encrypt-key`        | Webhook-Verschlüsselungsschlüssel (nur Webhook-Modus) |
| `--webhook-host`       | Webhook-Bind-Adresse (Standard: `0.0.0.0`)            |
| `--webhook-port`       | Webhook-Listen-Port (Standard: `3000`)                |
| `--webhook-path`       | Webhook-URL-Pfad (Standard: `/feishu/events`)         |

## `pair telegram`

Telegram als Messaging-Kanal konfigurieren.

```bash Bash icon="terminal" theme={"system"}
# Polling mode (default)
novitaclaw pair telegram <SANDBOX_ID> \
  --bot-token <BOT_TOKEN>

# Webhook mode
novitaclaw pair telegram <SANDBOX_ID> \
  --bot-token <BOT_TOKEN> \
  --mode webhook \
  --webhook-url https://example.com/webhook/telegram \
  --webhook-secret <SECRET>
```

| Option             | Beschreibung                                     |
| ------------------ | ------------------------------------------------ |
| `--bot-token`      | Telegram-Bot-Token von BotFather                 |
| `--mode`           | `polling` (Standard) oder `webhook`              |
| `--webhook-url`    | Öffentliche Webhook-URL (nur Webhook-Modus)      |
| `--webhook-secret` | Webhook-Secret (nur Webhook-Modus)               |
| `--webhook-host`   | Webhook-Bind-Adresse (Standard: `0.0.0.0`)       |
| `--webhook-port`   | Webhook-Listen-Port (Standard: `8787`)           |
| `--webhook-path`   | Webhook-URL-Pfad (Standard: `/webhook/telegram`) |
| `--dm-policy`      | DM-Richtlinie (Standard: `pairing`)              |

## `pair slack`

Slack als Messaging-Kanal konfigurieren.

```bash Bash icon="terminal" theme={"system"}
# Socket mode (default)
novitaclaw pair slack <SANDBOX_ID> \
  --bot-token xoxb-... \
  --app-token xapp-...

# HTTP mode
novitaclaw pair slack <SANDBOX_ID> \
  --bot-token xoxb-... \
  --mode http \
  --signing-secret <SECRET>
```

| Option             | Beschreibung                                   |
| ------------------ | ---------------------------------------------- |
| `--bot-token`      | Slack-Bot-Token (`xoxb-...`)                   |
| `--app-token`      | Slack-App-Token (`xapp-...`, nur Socket-Modus) |
| `--mode`           | `socket` (Standard) oder `http`                |
| `--signing-secret` | Slack-Signing-Secret (nur HTTP-Modus)          |
| `--webhook-host`   | Webhook-Bind-Adresse (Standard: `0.0.0.0`)     |
| `--webhook-port`   | Webhook-Listen-Port (Standard: `8788`)         |
| `--webhook-path`   | Webhook-URL-Pfad (Standard: `/webhook/slack`)  |

## `update`

Nach CLI-Updates suchen und auf die neueste Version aktualisieren.

```bash Bash icon="terminal" theme={"system"}
novitaclaw update
```

## Programmatische Verwendung

Verwenden Sie JSON-Ausgabe für Automatisierung:

```bash Bash icon="terminal" theme={"system"}
novitaclaw -j launch --api-key YOUR_API_KEY
```

Beispielantwort:

```json theme={"system"}
{
  "success": true,
  "data": {
    "sandbox_id": "xxx",
    "webui": "https://xxx.sandbox.novita.ai?token=xxx",
    "gateway_ws": "wss://xxx.sandbox.novita.ai",
    "gateway_token": "xxx",
    "terminal_url": "https://7681-xxx.sandbox.novita.ai",
    "filemanager_url": "https://7682-xxx.sandbox.novita.ai",
    "services_username": "admin",
    "services_password": "xxx"
  }
}
```

## Umgebungsvariablen

| Variable                 | Beschreibung                                          |
| ------------------------ | ----------------------------------------------------- |
| `NOVITA_API_KEY`         | API-Schlüssel, macht das Flag `--api-key` überflüssig |
| `OPENCLAW_GATEWAY_TOKEN` | Voreingestelltes Gateway-Token                        |

## Fehlerbehebung

### Befehl nicht gefunden

Versuchen Sie eine der folgenden Optionen:

```bash Bash icon="terminal" theme={"system"}
# Use full path (Linux)
~/.local/bin/novitaclaw launch

# Typical macOS user path
~/Library/Python/3.x/bin/novitaclaw launch
```

### Verbindungs-Zeitüberschreitung

Start-Zeitlimit erhöhen:

```bash Bash icon="terminal" theme={"system"}
novitaclaw launch --timeout 180 --api-key YOUR_API_KEY
```

## Häufig gestellte Fragen

| Problem                                | Warum es passiert                                                    | Was zu tun ist                                                                                        |
| -------------------------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| "Command not found" / "Not recognized" | Python PATH wurde während der Installation nicht konfiguriert        | Python neu installieren und "Add to PATH" aktivieren oder das bin-Verzeichnis manuell hinzufügen      |
| "Permission Denied"                    | Unzureichende Berechtigungen                                         | Windows: Terminal als Administrator ausführen. Mac/Linux: mit `sudo` voranstellen                     |
| "Invalid API Key"                      | Schlüssel wurde falsch kopiert                                       | Auf zusätzliche Leerzeichen um die Zeichenfolge `sk_` prüfen oder einen neuen Schlüssel generieren    |
| Sandbox lässt sich nicht stoppen       | Erfordert eine Bestätigung, um versehentliches Löschen zu verhindern | Geben Sie bei der Aufforderung `y` ein oder verwenden Sie `--yes`, um die Bestätigung zu überspringen |
| Mac: Befehl `pip` nicht gefunden       | macOS verwendet standardmäßig `pip3`                                 | Verwenden Sie `pip3 install novitaclaw` anstelle von `pip`                                            |
