Befehlsübersicht
| Command | Description | Auth |
|---|---|---|
chat [MESSAGE] | Eine Nachricht senden oder interaktives REPL starten | API-Schlüssel |
models | Verfügbare Modelle auflisten und durchsuchen | API-Schlüssel |
balance | Kontostand anzeigen | API-Schlüssel (oder access token) |
account | Kontoprofil anzeigen | Access token |
stats | Nutzungsstatistiken anzeigen | Access token |
tokens | Ihre API-Schlüssel auflisten und durchsuchen | Access token |
logs | Nutzungsprotokolle mit Filtern durchsuchen | Access token |
tasks | Async-Task-Protokolle anzeigen | Access token |
init | Interaktiver Einrichtungsassistent | — |
doctor | Diagnose- und Zustandsprüfungen ausführen | API-Schlüssel |
config | CLI-Konfiguration verwalten | — |
repl | Interaktive Befehls-Shell starten | API-Schlüssel |
COMETAPI_ACCESS_TOKEN oder den Konfigurationsschlüssel access_token. Details finden Sie im Konfigurationsleitfaden.
Chat
Eine einzelne Nachricht senden oder das interaktive REPL für mehrere Dialogrunden starten.| Option | Short | Description |
|---|---|---|
--model | -m | Zu verwendendes Modell (Standard: aus der Konfiguration) |
--system | -s | System-Prompt |
--temperature | -t | Sampling-Temperatur (0.0–2.0) |
--max-tokens | Maximale Anzahl Tokens in der Antwort | |
--stream/--no-stream | Streaming aktivieren oder deaktivieren (Standard: stream) | |
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Models
Verfügbare Modelle mit optionaler Suche und Begrenzung auflisten.| Option | Short | Description |
|---|---|---|
--search | -s | Modelle nach Schlüsselwort filtern |
--limit | -l | Maximale Anzahl Ergebnisse |
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Balance
Ihren CometAPI-Kontostand anzeigen.| Option | Short | Description |
|---|---|---|
--source | -s | Datenquelle: account (gesamtes Konto) oder key (aktueller API-Schlüssel). |
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Account
Ihr Kontoprofil anzeigen. Erfordert einen access token.| Option | Short | Description |
|---|---|---|
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Stats
Nutzungsstatistiken für den aktuellen Monat anzeigen. Erfordert einen access token.| Option | Short | Description |
|---|---|---|
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Tokens
Ihre API-Schlüssel auflisten und durchsuchen. Erfordert einen access token.| Option | Short | Description |
|---|---|---|
--search | -s | Suchbegriff |
--page | -p | Seitennummer |
--page-size | Ergebnisse pro Seite | |
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Logs
Nutzungsprotokolle mit Filtern durchsuchen. Erfordert einen access token.| Option | Short | Description |
|---|---|---|
--model | -m | Nach model ID filtern |
--token-name | Nach API-Schlüsselnamen filtern | |
--type | -t | Protokolltyp: consume, topup, error, refund, system, manage |
--start | Startdatum (YYYY-MM-DD) | |
--end | Enddatum (YYYY-MM-DD) | |
--group | -g | Nach Gruppe filtern |
--limit | -l | Maximale Anzahl Einträge |
--page | -p | Seitennummer |
--page-size | Ergebnisse pro Seite | |
--export | Als CSV nach stdout ausgeben | |
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Tasks
Async-Task-Protokolle für Plattformen wie Suno, Midjourney, Luma und Kling anzeigen. Erfordert einen access token.| Option | Short | Description |
|---|---|---|
--platform | Nach Plattformnamen filtern | |
--status | Nach Status filtern | |
--limit | -l | Maximale Anzahl Einträge |
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Doctor
Diagnosen ausführen, um die CLI-Konfiguration und die API-Konnektivität zu überprüfen.- Vorhandensein und Lesbarkeit der Konfigurationsdatei
- Verfügbarkeit und Quelle des API-Schlüssels (config, env oder fehlend)
- Verfügbarkeit des access token
- Netzwerkkonnektivität zum CometAPI-Endpunkt
- Gültigkeit der API-Authentifizierung
| Option | Short | Description |
|---|---|---|
--format | -f | Ausgabeformat |
--json | Als JSON ausgeben |
Config
Die CLI-Konfiguration verwalten, die in~/.config/cometapi/config.toml gespeichert ist.
Init
Den interaktiven Einrichtungsassistenten ausführen, um Ihren API-Schlüssel und access token zu konfigurieren.~/.config/cometapi/config.toml.
Repl
Eine vollständige interaktive Befehls-Shell starten, in der Sie jeden CLI-Befehl ohne das Präfixcometapi ausführen können.
Ausgabeformate
Alle Datenbefehle unterstützen--json oder --format:
| Format | Description |
|---|---|
table | Erweiterte Tabelle im Terminal (Standard) |
json | JSON-Ausgabe |
yaml | YAML-Ausgabe |
csv | Kommagetrennte Werte |
markdown | Markdown-Tabelle |
Shell completion
Shell completion für Unterstützung bei der Tab-Vervollständigung installieren:Exit codes
| Code | Meaning |
|---|---|
0 | Erfolg |
1 | Allgemeiner Fehler |
2 | Ungültige Argumente |
64 | Konfiguration fehlt |
69 | Dienst nicht verfügbar |
77 | Authentifizierungsfehler |