← Back to Leaderboard
Cdaodao97

daodao97/code-switch

A local desktop proxy for switching Claude Code and Codex providers

View on GitHub ↗
Engineering Health (Methodology)
B · 55/100
Maintenance Activity
● Updated 6mo ago
Latest Release
v0.1.8
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance6/35
Fork Adoption18/25
Release Cadence11/20
License Clarity20/20
Self-HostedLocal AI
Total Stars
★ 822
24h Growth
+0
7d Growth
+0
Forks
118

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

daodao97/code-switch Star History (2025-11-07 - 2026-12-04) ALL-TIME STAR HISTORY (2025-11 – 2026-12) +821 in 392d · avg +2/day 868 434 0 2025-11-07: ★ 12025-12-06: ★ 5862026-01-03: ★ 6982026-01-31: ★ 7312026-02-28: ★ 7452026-03-28: ★ 7722026-04-25: ★ 7832026-05-23: ★ 7982026-06-20: ★ 8092026-07-18: ★ 8122026-08-15: ★ 8162026-09-12: ★ 8172026-10-10: ★ 8202026-11-04: ★ 8222026-12-04: ★ 822 ★ 822 2025-11 2026-05 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Code Switch is a Wails 3 desktop app with a local HTTP proxy. At startup it listens on port 18100 and updates both CLI configurations to use http://127.0.0.1:18100. The proxy sends /v1/messages to configured Claude providers and /responses to configured Codex providers. Its proxyHandler selects an enabled provider by priority and tries another on failure, so the CLI endpoint stays fixed while upstream routing changes.

The Go repository has a root main.go, a services/ directory, and a separate frontend/ tree. The module targets Go 1.24 and pins Wails v3.0.0-alpha.38. Dependencies include Gin, go-toml/v2, GJSON, SJSON, yaml.v3, and modernc.org/sqlite; the dependency list does not establish what is persisted in SQLite. MCP server configuration and Claude Code Skills management are separate from the two inference request routes.

Key Capabilities & Differentiators

The primary capability is live provider switching with automatic fallback for Claude Code and Codex. v0.1.8 adds Levels 1–10 and a two-level scheduling loop that tries higher-priority groups first. Existing providers without a Level default to Level 1. Teams can use the groups to prefer lower-cost providers or reserve a preferred backup tier. Request-level usage tracking supports cost review, but provider-specific billing reconciliation is not established.

The desktop UI also manages MCP server configuration for both clients. Claude Code Skills can be browsed, downloaded, installed, and removed through two built-in repositories or custom sources. Provider compatibility is expressed through the two supported request paths, not a model-by-model matrix: a provider’s presence in the list is not proof that every CLI feature will work through it.

Trade-offs & Limitations

Direct Claude Code or Codex configuration is simpler if one upstream is enough: there is no extra local process in the request path and no intermediary rewriting client settings. Code Switch earns that extra dependency when operators need failover or deliberate provider ordering. The trade-off is that a fallback can change response behavior, cost, or who handles request data; failed upstream attempts can also lengthen a request. Timeout behavior and streaming recovery are not established, so test failover with the providers you intend to use.

The proxy defaults to binding :18100, which can expose the listener beyond loopback even though both clients point to 127.0.0.1. Verify reachability and restrict access before using it on a shared or untrusted network; do not assume proxy authentication. The app is Apache-2.0 licensed, but upstream API terms still apply, and a local listener does not mean request data stays on the machine.

Hardware & Deployment Guide

For a source build, use Go 1.24+, Node.js 18+, a package manager such as npm, pnpm, or yarn, and the Wails 3 CLI. Run wails3 task dev for development. The macOS flow refreshes build assets with wails3 task common:update:build-assets before wails3 task package. Windows amd64 cross-building from macOS uses mingw-w64 and env ARCH=amd64 wails3 task windows:build. Downloads are listed for macOS, Windows, and Linux amd64.

This is a self-hosted desktop gateway, not an offline inference engine: the proxy runs locally, but API calls still need access to the selected upstream. No container or headless deployment path is established. Test automatic configuration changes with copies of existing CLI settings before rollout. The release sequence adds Skills management in v0.1.6, improves Codex provider import from cc-switch in v0.1.7, and introduces grouped fallback in v0.1.8.

Stable CLI endpoint: both clients are redirected to http://127.0.0.1:18100, so switching upstreams does not require restarting them.
Separate protocol routes: /v1/messages goes to configured Claude providers, while /responses goes to configured Codex providers.
Priority groups: v0.1.8 adds provider Levels 1–10 and tries higher-priority groups first; an unset Level defaults to 1.
Usage visibility: request-level usage tracking makes individual calls available for cost review.
Management scope: MCP server configuration for both clients, plus Claude Code Skills installation and removal with two built-in repositories and support for custom sources.
Codex migration: v0.1.7 improves cc-switch import to recognize aliased providers in TOML.
Best For

Developers running Claude Code or Codex on a workstation who already have multiple compatible providers and want a stable CLI endpoint, ordered fallback, and per-request usage visibility.

Skip If

One upstream serves your needs, client settings must remain untouched, or you need offline inference or a documented headless gateway for shared infrastructure.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Self-HostedLocal AI
brew install mingw-w64

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
code-switch ★822—GoApache-2.0A local desktop proxy for switching Claude Code and Codex providers
codex137.3k+623RustApache-2.0Rust coding agent that brings AI-assisted repository work to the terminal
pi125.5k+1.1kTypeScriptMITAn extensible TypeScript coding CLI and agent runtime with a unified model API
gemini-cli109.6k+376TypeScriptApache-2.0A Node.js terminal agent for enterprise Gemini coding workflows and MCP tools

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/daodao97/code-switch.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

daodao97/code-switch Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about code-switch

How does Code Switch integrate with Claude Code and Codex?

On startup, Code Switch rewrites Claude Code and Codex settings to point to http://127.0.0.1:18100. The proxy forwards /v1/messages to a configured Claude provider and /responses to a configured Codex provider. The CLI keeps the same local endpoint when the upstream changes, so switching does not require a CLI restart.

Do I need a GPU, and how should I size the host?

No GPU or VRAM requirement is indicated for the Go/Wails desktop app and HTTP proxy, which forward requests rather than run model inference. Size the local machine for the desktop runtime and expected request concurrency. No measured RAM or CPU figures are available; inference hardware belongs to the upstream deployment.

Can a company use or redistribute Code Switch?

Yes. Apache-2.0 permits commercial use and self-hosting, with license and applicable notice obligations on redistribution. That license does not cover upstream API terms or third-party Skills. If model requests contain proprietary code, review each enabled provider’s data-handling terms before putting it in the fallback chain.

When is Code Switch preferable to direct CLI configuration?

Use Claude Code or Codex directly if one provider is enough and you prefer to avoid a local forwarding process or automatic configuration changes. Add Code Switch when you need live provider switching, priority-based fallback, or request-level usage visibility. It manages the clients’ connections; it does not replace their coding-agent functionality.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining daodao97/code-switch? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature daodao97/code-switch on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare