Generated by Code IQ · v1.0

cc-switch
Knowledge Tutorial

cc-switch acts as a smart Local Proxy Gateway that sits between your AI command-line tools (like Claude Code) and various AI providers. Instead of connecting directly to the internet, tools connect to this local server, which handles Intelligent Routing to automatically switch to backup providers if one fails. It uses a SQLite Database to store configurations and logs, allowing you to visualize costs and history via a Usage Dashboard, while standardizing different API formats through a flexible Adaptation Layer.

6
Chapters
-
Subsystems
Rabbit Holes
▶ Start Reading ⎇ View on GitHub
System Architecture

How the pieces fit

cc-switch is organized as connected concepts and components. Start broad, then drill down chapter by chapter.

⚙️
Local Proxy Gateway
Local Proxy Gateway
⚙️
Intelligent Routing & Failover
Intelligent Routing & Failover
⚙️
Provider Adaptation Layer
Provider Adaptation Layer
⚙️
SQLite Persistence & Schema
SQLite Persistence & Schema
🔌
Unified MCP Management
Unified MCP Management
⚙️
Usage Analytics Dashboard
Usage Analytics Dashboard
cc-switch — bash
open tutorial
◆ Scanning numbered chapters
◆ Building navigation and Mermaid diagrams
◆ Generating chapter and subsystem pages
✓ 6 chapter pages built
✓ Theme toggle enabled
Repository Overview

Intro and Architecture Diagram

cc-switch acts as a smart Local Proxy Gateway that sits between your AI command-line tools (like Claude Code) and various AI providers. Instead of connecting directly to the internet, tools connect to this local server, which handles Intelligent Routing to automatically switch to backup providers if one fails. It uses a SQLite Database to store configurations and logs, allowing you to visualize costs and history via a Usage Dashboard, while standardizing different API formats through a flexible Adaptation Layer.

Source Repository: https://github.com/farion1231/cc-switch

flowchart TD A0["Local Proxy Gateway"] A1["Intelligent Routing & Failover"] A2["Provider Adaptation Layer"] A3["SQLite Persistence & Schema"] A4["Unified MCP Management"] A5["Usage Analytics Dashboard"] A0 -->|"Delegates provider selection"| A1 A0 -->|"Uses for API normalization"| A2 A0 -->|"Logs requests and errors"| A3 A1 -->|"Reads queues and health"| A3 A4 -->|"Persists server configs"| A3 A5 -->|"Queries logs for visualization"| A3
Tutorial Chapters

All 6 chapters

Follow sequentially or jump to any topic. Start with Local Proxy Gateway.

About This Project

Generated by Code IQ

This tutorial was automatically generated by Code IQ and rendered with the shared tutorial site builder. It can be produced for any repository tutorial folder that follows the numbered markdown chapter layout.

View Code IQ ↗
python build_site.py '/home/runner/work/Code-IQ/Code-IQ/output/cc-switch'

// → 6 chapters
// → source: farion1231/cc-switch