Implementation:Togethercomputer Together python CLI Main Entry
| Knowledge Sources | |
|---|---|
| Domains | CLI, API |
| Last Updated | 2026-02-15 16:00 GMT |
Overview
Concrete CLI entry point that bootstraps the Together command-line interface and registers all subcommands provided by the Together Python SDK.
Description
The main Click group serves as the root entry point for the together CLI tool. It handles global options (--api-key, --base-url, --timeout, --max-retries, --version, --debug), initializes the Together client, and registers subcommand groups: chat, interactive, completions, images, files, fine-tuning, models, endpoints, and evaluation.
Usage
This is the top-level CLI entry. Use together --help to see all available subcommands and global options.
Code Reference
Source Location
- Repository: Together Python
- File: src/together/cli/cli.py
- Lines: 1-81
Signature
together [--api-key KEY] [--base-url URL] [--timeout SECS] [--max-retries N] [--version] [--debug] COMMAND
Import
# Installed as CLI entry point
together --help
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| --api-key | str | No | API key (defaults to TOGETHER_API_KEY env var) |
| --base-url | str | No | Override API base URL |
| --timeout | int | No | Request timeout in seconds |
| --max-retries | int | No | Maximum HTTP retry count |
| --debug | flag | No | Enable debug logging |
Outputs
| Name | Type | Description |
|---|---|---|
| Subcommand output | varies | Output from the invoked subcommand |
Usage Examples
# Show version
together --version
# Use custom API key
together --api-key "your-key" chat completions create --model meta-llama/Llama-4-Scout-17B-16E-Instruct --message "Hello"
# Debug mode
together --debug models list
# Available subcommands
together chat # Chat completions
together completions # Text completions
together images # Image generation
together files # File management
together fine-tuning # Fine-tuning jobs
together models # Model listing/upload
together endpoints # Endpoint management
together evaluation # LLM evaluation