Skip to content

Suryanandx/switchboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Switchboard

Terminal UI for querying any OpenRouter model.

Query GPT-4o, Claude 3.5, Mistral, Llama, Gemini, and 200+ more — all from your terminal. Switch models mid-conversation, track costs per message, and get streaming markdown responses.

pip install switchboard-tui
switchboard

Features

  • 200+ models — every OpenRouter model in a searchable browser
  • Streaming markdown — responses render as they arrive
  • Switch models liveCtrl+K to search and swap mid-conversation
  • Cost tracking — tokens used and estimated USD per message
  • System prompt editorCtrl+S to set or change the system prompt
  • Free model highlights — free-tier models are clearly marked

Install

pip install switchboard-tui

Requires Python 3.11+ and an OpenRouter API key.

Quick start

export OPENROUTER_API_KEY=sk-or-...
switchboard

Or pass a model directly:

switchboard --model openai/gpt-4o
switchboard --model anthropic/claude-3-5-sonnet --system "You are a senior Go engineer."

Keyboard shortcuts

Shortcut Action
Ctrl+K Search and switch model
Ctrl+N New conversation
Ctrl+C Copy last response
Ctrl+S Edit system prompt
Ctrl+Q Quit

Config

Create ~/.config/switchboard/config.toml:

api_key = "sk-or-..."

[chat]
default_model = "anthropic/claude-3-5-haiku"
default_system_prompt = "You are a helpful assistant."
temperature = 0.7
max_tokens = 4096

[appearance]
theme = "dark"
show_cost = true

Docker

docker run -it --rm -e OPENROUTER_API_KEY=sk-or-... ghcr.io/suryanandx/switchboard

License

Apache 2.0 — see LICENSE.


Built by Suryanand Sunil · @Suryanandx · work@suryanand.com

About

Terminal UI for querying any OpenRouter model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors