Skip to main content
The CometAPI CLI is an official command-line tool for interacting with the CometAPI platform. It supports multi-model chat (streaming and REPL), model search, balance and usage queries, log browsing, and account management — all from the terminal. Start from the PyPI package page if you want the latest install command, package metadata, and release version in one place.
The CometAPI CLI is in beta. Expect small command and UX changes while the CLI interface stabilizes.

Features

  • Multi-model chat with streaming and interactive REPL
  • Model search and listing
  • Account balance and usage statistics
  • Usage log browsing with filters and CSV export
  • Async task logs (Suno, Midjourney, Kling, and others)
  • Multi-format output: table, JSON, YAML, CSV, Markdown
  • TOML-based configuration with setup wizard
  • Shell completion for Bash, Zsh, and Fish
  • Agent-friendly design with structured JSON output and deterministic exit codes

Prerequisites

Installation

Use the PyPI package page as the primary install reference, then choose one of the following methods to install the CLI:
pip install cometapi-cli
Verify the installation:
cometapi --version

Quick start

1

Run the setup wizard

The interactive wizard stores your API key and optional access token in a local config file:
cometapi init
The wizard prompts for:
2

Chat with a model

Send a single message with streaming output:
cometapi chat "Explain quantum computing in one sentence"
Override the default model:
cometapi chat "Hello!" --model claude-sonnet-4-6
3

Search available models

List models matching a keyword:
cometapi models --search gemini --limit 10
4

Check your balance

View your account balance:
cometapi balance
Show the current API key billing view:
cometapi balance --source key
5

Run diagnostics

Verify that the CLI can connect to CometAPI:
cometapi doctor

Interactive chat session

Run cometapi chat without arguments to enter the multi-turn chat REPL:
cometapi chat
REPL commands:
CommandDescription
/modelSwitch the active model
/systemSet or change the system prompt
/clearClear conversation history
/historyShow conversation history
/saveSave conversation to a file
/tokensShow token usage for the session
/helpList all REPL commands
/exitExit the REPL

Agent integration

The CLI is designed for use by AI coding agents and automation scripts:
  • All data commands support --json for structured, machine-readable output
  • Deterministic exit codes: 0 (success), 64 (config missing), 77 (auth error), 69 (service unavailable)
  • Errors go to stderr, data goes to stdout
  • See the full command reference for per-command options