CC-Switch CLI is a command-line tool that manages several coding agents, including Claude Code, Codex, Gemini CLI, OpenCode, Hermes, OpenClaw, and Pi, through an interactive terminal interface or scripts. It is for developers who use multiple agent tools and want to control them from one place. The catalogue instructions extend workflows for this tool.
Borrowing it
Nothing to install: this file belongs to SaladDay/cc-switch-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/SaladDay/cc-switch-cli/main/AGENTS.mdgit clone --depth 1 https://github.com/SaladDay/cc-switch-cliWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/saladday/cc-switch-cli/agents-md)<a href="https://agentmods.dev/instructions/saladday/cc-switch-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/saladday/cc-switch-cli/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/saladday/cc-switch-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/saladday/cc-switch-cli/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02507 | $0.02507 |
| Opus 5.5 | $0.01003 | $0.01003 |
| Sonnet 5.5 | $0.00501 | $0.00501 |
| Haiku 4.5 | $0.00251 | $0.00251 |
Grade B, and why
cc-switch-cli AGENTS.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- Claude: `~/.claude/settings.json`, `~/.claude.json`, `~/.claude/CLAUDE.md` Copies of this mod
1 near-identical copy found in the catalogue:
- cc-switch-cli CLAUDE.md — 98% identical, 4 lines differ
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
This file mirrors CLAUDE.md for Codex and other coding agents. Keep both files aligned when repository guidance changes.
Commands
The Rust crate lives in src-tauri/. Run Cargo commands from that directory unless a command explicitly targets repository-root assets or scripts.
cd src-tauri
cargo run # Run cc-switch in interactive mode
cargo run -- provider list # Run a specific CLI command
cargo run -- --app codex provider list # Run a command for a specific app
cargo run -- proxy show # Inspect proxy state
cargo run -- env tools # Check local CLI tools
cargo build --release # Build release binary at target/release/cc-switch
cargo fmt # Format Rust code
cargo fmt --check # Check formatting, matching CI
cargo clippy # Run lints
cargo test # Run all tests
cargo test provider_switch # Run tests whose names contain provider_switch
cargo test --test provider_commands # Run a single integration test target
cargo test --features test-hooks # Run tests with the test-hooks feature enabled
The repository pins Rust through src-tauri/rust-toolchain.toml to Rust 1.91.1 with rustfmt and clippy. CI currently runs cargo fmt --check for changes under src-tauri/**.
Project overview
CC-Switch CLI is a Rust command-line management tool for Claude Code, Codex, Gemini, OpenCode, Hermes, and OpenClaw. It manages provider configurations, MCP servers, prompts, skills, WebDAV sync, local proxy routes, failover, daemon/start flows, deep-link imports, workspace memory files, and environment checks.
The main crate is src-tauri/; the repository root contains docs, assets, install/update scripts, packaging metadata, and Nix files.
Key Rust entry points:
src/main.rsparses CLI arguments, initializes logging, creates startup state for most commands, and dispatches to command handlers.src/lib.rsdeclares crate modules and re-exports public types used by integration tests and command code.src/cli/mod.rsdefines the top-level Clap CLI, global--appflag, and command enum.src/cli/commands/contains direct command implementations for providers, MCP, prompts, skills, config/WebDAV, proxy, failover, Hermes, start, daemon, env, update, completions, and internal commands.src/commands/contains library command helpers that are not top-level Clap subcommands, including OpenClaw workspace file and daily memory operations.src/cli/interactive/andsrc/cli/tui/contain the interactive ratatui UI, runtime action handlers, forms, overlays, route state, and UI rendering.src/services/contains durable business logic used by commands and the TUI: providers, auth, MCP, prompts, skills, proxy, WebDAV sync, stream checks, speed tests, environment checks, visible apps, subscription/coding-plan quota checks, and state coordination.src/database/is the SQLite persistence layer.Databaseowns a mutex-wrapped rusqlite connection, schema creation/migration, backups, and DAO modules for providers, MCP, prompts, skills, settings, proxy state, stream checks, universal providers, and failover queues.src/app_config.rs,src/provider.rs, and app-specific config modules (claude_*,codex_config.rs,gemini_*,hermes_config.rs,opencode_config.rs,openclaw_config.rs) define the shared configuration model and live-file adapters for supported apps.src/deeplink/implements theccswitch://v1/import?...import protocol for provider resources and is exported throughlib.rsfor tests and callers.src/proxy/implements the local multi-app proxy with Axum handlers, request forwarding, provider routing/failover, provider-specific transformations, response/stream handling, usage logging, model mapping, cache/thinking rectifiers, circuit breaking, and metrics.src/daemon/implements the Unix supervisor daemon, IPC protocol, logging, pidfile, and restart support.src/store.rsdefinesAppState, which ties together the database, an in-memoryMultiAppConfigsnapshot, startup live-config imports/recovery, andProxyService.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · -2 lines · -66 tokens per session 0b0b88481872
- 1mo ago Changed · +1 lines · +36 tokens per session 66e4c2b78fd3
- 2mo ago First seen · 119 lines · 2,537 tokens per session scan B 821ef789e00f
cc-switch-cli AGENTS.md is an instructions file published in the GitHub repository SaladDay/cc-switch-cli (5,442 stars, last pushed yesterday), licensed MIT. It adds 2,507 tokens to every session, about $0.0100 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
cc-switch-cli AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cc-switch-cli AGENTS.mdSaladDay/cc-switch-cli | Instructions file | 5.4k | yesterday | MIT | B | 2,507 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |