CLI Reference¶
Usage¶
Options¶
| Flag | Description |
|---|---|
--config, -c PATH |
Config file path (auto-discovered if omitted) |
--version, -V |
Show version and exit |
--no-banner |
Suppress the startup banner |
--edit, -e |
Open config file in $EDITOR for editing |
--host HOST |
Override server host |
--port PORT |
Override server port |
--proxy URL |
HTTP/SOCKS proxy URL for all upstream requests |
--verbose, -v |
Enable verbose (DEBUG) logging; overrides config and --log-level |
--log-level LEVEL |
Log level: debug, info, warning, error (default: info) |
Commands¶
init¶
Create a template config.jsonc at ~/.config/llm-rosetta-gateway/:
add provider <name>¶
Add a provider entry to the config file:
llm-rosetta-gateway add provider openai_chat
llm-rosetta-gateway add provider anthropic --api-key "${ANTHROPIC_API_KEY}"
| Flag | Description |
|---|---|
--api-key KEY |
API key or ${ENV_VAR} placeholder |
--base-url URL |
Provider base URL (auto-filled for known providers) |
add model <name>¶
Add a model routing entry to the config file:
llm-rosetta-gateway add model gpt-4o --provider my-openai
llm-rosetta-gateway add model claude-sonnet-4-20250514 --provider my-anthropic
llm-rosetta-gateway add model gemini-2.0-flash --provider my-google
| Flag | Description |
|---|---|
--provider NAME |
Target provider name |
Config Auto-Discovery¶
When --config is not specified, the gateway searches these paths in order:
./config.jsonc— current working directory~/.config/llm-rosetta-gateway/config.jsonc— XDG standard location~/.llm-rosetta-gateway/config.jsonc— dotfile convention
Programmatic Usage¶
The gateway can also be used as a library:
from llm_rosetta.gateway import create_app, GatewayConfig, load_config
# Load config and create ASGI app
raw = load_config("config.jsonc")
config = GatewayConfig(raw)
app = create_app(config)
# Mount in your own ASGI application, or run with any ASGI server
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8765)