- One binary: No need to install on every PC/server where LLM apps live in.
- One click: LLM provider switch via alias buttons in web UI.
- Any Apps: All LLM apps using OpenAI/Anthropic API do not need to reconfigure their LLM providers.
For apps that do not support customizable endpoint, a possible workaround is to modify DNS records and point the IP address to Tresor.
| Tresor (Ours) | cc-switch | LiteLLM | |
|---|---|---|---|
| One binary | ✅ | ❌(install on every PC) | ❌(tons of dependencies) |
| One click | ✅ | ✅ | ❌(retype model name) |
| Any App | ✅ | ❌(limited apps) | ✅ |
Imagine you have agents on three machines, all calling OpenAI. You want to switch them to Anthropic.
⚠ DISCLAIMER: Tresor is intended for personal use rather than LLM transfer stations, so it only have one administrative account. We are not planning to support commercial-purpose multi-user login.
Tresor is a single binary with two modes:
| Mode | What It Does |
|---|---|
| Daemon | 🖥️ Long-running HTTP gateway + admin REST API + embedded web UI |
| CLI | 💻 Command-line client for managing the daemon |
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Your App │────>│ Tresor │────>│ LLM Provider│
│ │ │ (gateway) │ │ (OpenAI, │
│ │<────│ │<────│ Anthropic..) │
└──────────────┘ └──────────────┘ └──────────────┘
│
├── Admin REST API
├── Embedded Web UI
└── CLI Commands
- ⚡ Hot-Switch Models — Map one model name to any backend model and switch on the fly. Your app requests
gpt-4o; Tresor can route it to Claude Sonnet, Opus, or keep it on GPT-4o — all without restarting. - 🔄 Protocol Translation — Convert between OpenAI and Anthropic API formats transparently. Your app sends an OpenAI request; Tresor forwards it to Anthropic and converts the response back. No code changes needed.
- 🔌 Plugin Pipeline — Chain transformation plugins per rule (header injection, compatibility fix, format conversion, and more).
- 🛤️ Per-Path Routing — Route different API paths (and models) to different providers based on configurable rules.
- 🌐 Embedded Web UI — Manage everything from a browser dashboard. No separate frontend deployment.
- 📝 Single Config File — All settings in one portable YAML file. Changes via the web UI write back automatically.
Warning: the program is heavily vibe-coded, but the author has tried the best to follow software engineering practices to ensure its quality. Use with caution.
Linux / macOS — download the latest release with one command:
curl -fsSL https://raw.githubusercontent.com/Ladbaby/Tresor/main/setup.sh | bashThis installs the binary to ~/.local/bin/tresor and creates a config skeleton at ~/.config/tresor/config.yaml.
Windows — download a release binary manually from GitHub Releases.
- Option 1: Configure later via web UI.
- Option 2: Edit
~/.config/tresor/config.yaml.
Change bind_addr to 0.0.0.0:11510 if you want the server to be publicly available.
# Start the daemon
tresor run --config ~/.config/tresor/config.yaml
# Point your LLM apps to: http://127.0.0.1:11510
# Open the web UI: http://127.0.0.1:11510 in your browserRun Tresor as a user-level systemd service — no sudo needed, auto-starts on login:
# 1. Create the user service unit
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/tresor.service << EOF
[Unit]
Description=Tresor LLM Gateway
[Service]
Type=simple
ExecStart=$HOME/.local/bin/tresor run --config $HOME/.config/tresor/config.yaml
WorkingDirectory=$HOME/.config/tresor
Restart=on-failure
RestartSec=5
# Environment (uncomment as needed)
# Environment=HTTP_PROXY=http://proxy.example.com:8080
# Environment=HTTPS_PROXY=http://proxy.example.com:8080
[Install]
WantedBy=default.target
EOF
# 2. Enable and start the service
# (--user creates a service under your user session)
systemctl --user daemon-reload
systemctl --user enable --now tresor.service
# 3. Check status
systemctl --user status tresor
# View logs
journalctl --user -u tresor -fNote: If you installed Tresor to a different path, update
ExecStartandWorkingDirectoryaccordingly.
For developers or unsupported platforms (requires Go 1.26+):
go build -o tresor .See the Installation docs for full instructions.
Full documentation is available at ladbaby.github.io/Tresor-docs/:
- 🏠 Introduction — overview and architecture
- 📦 Installation & Quick Start — install from release or source, configure, run
- ⚙️ Configuration Basics — YAML config file reference
- 🔗 Downstreams — configure LLM provider endpoints
- 📏 Rules — define routing rules with transform pipelines
- 🏷️ Model Aliases — map model names and hot-switch backends
- 🌐 Proxy Modes — outbound proxy configuration
- 🖥️ Web UI Guide — manage everything from the browser
- 💻 CLI Reference — all command-line commands
- 🔄 Transparent Provider Switching — route OpenAI-format traffic to Anthropic
- 🎛️ Model Aliasing — hot-switch between backends
- ⚖️ A/B Testing Backends — compare providers side by side
- 🏗️ Architecture — codebase structure, request flow, data layer
- 🔌 Plugin System — building custom transformers
- 🧪 Testing — test strategy and coverage
- 🤝 Contributing — how to contribute to Tresor
- llama.cpp: Memory saving LLM inference.
- Qwen & Unsloth: High quality local LLM.
- Google Gemini: Icon creation.
- OpenAI ChatGPT: Comparison figures.


