{"id":50648887,"url":"https://github.com/ladbaby/tresor","last_synced_at":"2026-06-10T06:00:31.657Z","repository":{"id":363123455,"uuid":"1261134010","full_name":"Ladbaby/Tresor","owner":"Ladbaby","description":"⚡A single-binary LLM gateway for switching providers with one click. One gateway, One config, One click.","archived":false,"fork":false,"pushed_at":"2026-06-07T15:03:38.000Z","size":2820,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T16:03:03.093Z","etag":null,"topics":["agent","ai-gateway","cc-switch","claude-code","codex","deepseek","gemini-cli","litellm","llm","opencode"],"latest_commit_sha":null,"homepage":"https://ladbaby.github.io/Tresor-docs/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ladbaby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T09:27:22.000Z","updated_at":"2026-06-07T15:08:25.000Z","dependencies_parsed_at":"2026-06-07T16:03:09.528Z","dependency_job_id":null,"html_url":"https://github.com/Ladbaby/Tresor","commit_stats":null,"previous_names":["ladbaby/tresor"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/Ladbaby/Tresor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ladbaby%2FTresor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ladbaby%2FTresor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ladbaby%2FTresor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ladbaby%2FTresor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ladbaby","download_url":"https://codeload.github.com/Ladbaby/Tresor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ladbaby%2FTresor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34139178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai-gateway","cc-switch","claude-code","codex","deepseek","gemini-cli","litellm","llm","opencode"],"created_at":"2026-06-07T16:00:22.865Z","updated_at":"2026-06-10T06:00:31.644Z","avatar_url":"https://github.com/Ladbaby.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Tresor\n\n\u003e **Switch LLM Providers for Any Apps with One Click**\n\n**One binary, One click, Any App**\n\n\u003cimg src=\"internal/api/web/logo.png\" height=200\u003e\n\n[![Go Version](https://img.shields.io/badge/Go-1.26-violet)](https://go.dev/)\n[![License](https://img.shields.io/badge/License-MIT-blue)](LICENSE)\n\n![](images/screenshot.png)\n\n\u003c/div\u003e\n\n\n\n\n## 🤔 Why Tresor?\n\n- **One binary**: No need to install on every PC/server where LLM apps live in.\n- **One click**: LLM provider switch via alias buttons in web UI.\n- **Any Apps**: All LLM apps using OpenAI/Anthropic API do not need to reconfigure their LLM providers.\n    \u003e For apps that do not support customizable endpoint, a possible workaround is to modify DNS records and point the IP address to Tresor.\n\n||Tresor (Ours)|[cc-switch](https://github.com/farion1231/cc-switch)|[LiteLLM](https://github.com/BerriAI/litellm)\n|---|---|---|---|\n|One binary|✅|❌(install on every PC)|❌(tons of dependencies)|\n|One click|✅|✅|❌(retype model name)|\n|Any App|✅|❌(limited apps)|✅|\n\n\n### 🔄 The Problem: Switching Providers at Scale\n\nImagine you have agents on three machines, all calling OpenAI. You want to switch them to Anthropic.\n\n![](images/comparison.png)\n\n⚠ 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.\n\n## ⚡ What Tresor Does\n\nTresor is a single binary with two modes:\n\n| Mode | What It Does |\n|------|-------------|\n| **Daemon** | 🖥️ Long-running HTTP gateway + admin REST API + embedded web UI |\n| **CLI** | 💻 Command-line client for managing the daemon |\n\n```\n┌──────────────┐     ┌──────────────┐     ┌──────────────┐\n│   Your App   │────\u003e│    Tresor    │────\u003e│  LLM Provider│\n│              │     │    (gateway) │     │  (OpenAI,    │\n│              │\u003c────│              │\u003c────│  Anthropic..) │\n└──────────────┘     └──────────────┘     └──────────────┘\n                         │\n                         ├── Admin REST API\n                         ├── Embedded Web UI\n                         └── CLI Commands\n```\n\n### Key Capabilities\n\n- ⚡ **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.\n- 🔄 **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.\n- 🔌 **Plugin Pipeline** — Chain transformation plugins per rule (header injection, compatibility fix, format conversion, and more).\n- 🛤️ **Per-Path Routing** — Route different API paths (and models) to different providers based on configurable rules.\n- 🌐 **Embedded Web UI** — Manage everything from a browser dashboard. No separate frontend deployment.\n- 📝 **Single Config File** — All settings in one portable YAML file. Changes via the web UI write back automatically.\n\n\n## 🚀 Getting Started\n\n\u003e 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.\n\n### Install\n\n**Linux / macOS** — download the latest release with one command:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Ladbaby/Tresor/main/setup.sh | bash\n```\n\nThis installs the binary to `~/.local/bin/tresor` and creates a config skeleton at `~/.config/tresor/config.yaml`.\n\n**Windows** — download a release binary manually from [GitHub Releases](https://github.com/Ladbaby/Tresor/releases).\n\n### Configure\n\n- Option 1: Configure later via web UI.\n- Option 2: Edit `~/.config/tresor/config.yaml`.\n\n\u003e Change bind_addr to 0.0.0.0:11510 if you want the server to be publicly available.\n\n### Start\n\n```bash\n# Start the daemon\ntresor run --config ~/.config/tresor/config.yaml\n\n# Point your LLM apps to: http://127.0.0.1:11510\n# Open the web UI: http://127.0.0.1:11510 in your browser\n```\n\n### Run as Systemd Service (Linux)\n\nRun Tresor as a user-level systemd service — no `sudo` needed, auto-starts on login:\n\n```bash\n# 1. Create the user service unit\nmkdir -p ~/.config/systemd/user\ncat \u003e ~/.config/systemd/user/tresor.service \u003c\u003c EOF\n[Unit]\nDescription=Tresor LLM Gateway\n\n[Service]\nType=simple\nExecStart=$HOME/.local/bin/tresor run --config $HOME/.config/tresor/config.yaml\nWorkingDirectory=$HOME/.config/tresor\nRestart=on-failure\nRestartSec=5\n\n# Environment (uncomment as needed)\n# Environment=HTTP_PROXY=http://proxy.example.com:8080\n# Environment=HTTPS_PROXY=http://proxy.example.com:8080\n\n[Install]\nWantedBy=default.target\nEOF\n\n# 2. Enable and start the service\n#    (--user creates a service under your user session)\nsystemctl --user daemon-reload\nsystemctl --user enable --now tresor.service\n\n# 3. Check status\nsystemctl --user status tresor\n\n# View logs\njournalctl --user -u tresor -f\n```\n\n\u003e **Note:** If you installed Tresor to a different path, update `ExecStart` and `WorkingDirectory` accordingly.\n\n### Build from Source\n\nFor developers or unsupported platforms (requires Go 1.26+):\n\n```bash\ngo build -o tresor .\n```\n\nSee the [Installation](https://ladbaby.github.io/Tresor-docs/docs/user/getting-started/installation) docs for full instructions.\n\n## 📚 Documentation\n\nFull documentation is available at **[ladbaby.github.io/Tresor-docs/](https://ladbaby.github.io/Tresor-docs/)**:\n\n### 👤 For Users\n- [🏠 Introduction](https://ladbaby.github.io/Tresor-docs/docs/user/intro) — overview and architecture\n- [📦 Installation \u0026 Quick Start](https://ladbaby.github.io/Tresor-docs/docs/user/getting-started/installation) — install from release or source, configure, run\n- [⚙️ Configuration Basics](https://ladbaby.github.io/Tresor-docs/docs/user/configuration/basics) — YAML config file reference\n- [🔗 Downstreams](https://ladbaby.github.io/Tresor-docs/docs/user/configuration/downstreams) — configure LLM provider endpoints\n- [📏 Rules](https://ladbaby.github.io/Tresor-docs/docs/user/configuration/rules) — define routing rules with transform pipelines\n- [🏷️ Model Aliases](https://ladbaby.github.io/Tresor-docs/docs/user/configuration/aliases) — map model names and hot-switch backends\n- [🌐 Proxy Modes](https://ladbaby.github.io/Tresor-docs/docs/user/configuration/proxy-modes) — outbound proxy configuration\n- [🖥️ Web UI Guide](https://ladbaby.github.io/Tresor-docs/docs/user/web-ui) — manage everything from the browser\n- [💻 CLI Reference](https://ladbaby.github.io/Tresor-docs/docs/user/cli-reference) — all command-line commands\n\n### 💡 Use Cases\n- [🔄 Transparent Provider Switching](https://ladbaby.github.io/Tresor-docs/docs/user/use-cases/provider-switching) — route OpenAI-format traffic to Anthropic\n- [🎛️ Model Aliasing](https://ladbaby.github.io/Tresor-docs/docs/user/use-cases/model-aliasing) — hot-switch between backends\n- [⚖️ A/B Testing Backends](https://ladbaby.github.io/Tresor-docs/docs/user/use-cases/ab-testing) — compare providers side by side\n\n### 🛠️ For Developers\n- [🏗️ Architecture](https://ladbaby.github.io/Tresor-docs/docs/dev/architecture) — codebase structure, request flow, data layer\n- [🔌 Plugin System](https://ladbaby.github.io/Tresor-docs/docs/dev/plugin-system) — building custom transformers\n- [🧪 Testing](https://ladbaby.github.io/Tresor-docs/docs/dev/testing) — test strategy and coverage\n- [🤝 Contributing](https://ladbaby.github.io/Tresor-docs/docs/dev/contributing) — how to contribute to Tresor\n\n\n## 📜 Acknowledgement\n\n- [llama.cpp](https://github.com/ggml-org/llama.cpp): Memory saving LLM inference.\n- [Qwen \u0026 Unsloth](https://huggingface.co/unsloth/Qwen3.6-27B-MTP-GGUF): High quality local LLM.\n- [Google Gemini](https://gemini.google.com/): Icon creation.\n- [OpenAI ChatGPT](https://chatgpt.com/): Comparison figures.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladbaby%2Ftresor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fladbaby%2Ftresor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladbaby%2Ftresor/lists"}