The CometAPI CLI is in beta. Command names and options may change while the interface stabilizes.
Features
- Chat with models using streaming output or an interactive REPL
- Browse model catalog metadata, including provider, modality, endpoint, capability, context, and pricing fields
- Inspect one model with
cometapi model info <id> - Send one request through Chat Completions, Responses, Anthropic Messages, or Gemini Generate Content formats with
cometapi run - Check balance, account profile, usage statistics, API keys, logs, and async task history
- Output table, JSON, YAML, CSV, or Markdown data
- Store local configuration in
~/.config/cometapi/config.toml
Prerequisites
- Python 3.10 or later
- A CometAPI API key
Install the CLI
Install the package from PyPI:Start using the CLI
Configure credentials
Run the setup wizard:You can also configure the API key with an environment variable:The optional
COMETAPI_ACCESS_TOKEN value is only needed for account, stats, tokens, logs, and tasks commands.Get command help
Use-h on the root command or any subcommand to inspect the options for the installed version:
Commandes principales
| Commande | Description |
|---|---|
chat [MESSAGE] | Envoyer un message de chat ou démarrer le REPL de chat |
models | Lister et filtrer les métadonnées du catalogue de modèles |
model info <id> | Inspecter les métadonnées publiques d’un modèle |
run [MODEL] | Envoyer une requête via les formats chat, responses, anthropic ou gemini |
balance | Afficher le solde du compte ou de la clé API |
account | Afficher le profil du compte |
stats | Afficher les statistiques d’utilisation |
tokens | Lister et rechercher des clés API |
logs | Parcourir les journaux d’utilisation et exporter un CSV |
tasks | Parcourir les journaux des tâches asynchrones |
init | Exécuter l’assistant de configuration |
doctor | Exécuter les diagnostics de configuration |
config | Gérer la configuration locale |
repl | Démarrer un shell de commande interactif |