cli-anything-ccswitch

Manage AI coding tool configurations in CC Switch via a terminal CLI.

48.8k|4.5k|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/HKUDS/CLI-Anything --skill cli-anything-ccswitch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-anything-ccswitch
Source: https://github.com/HKUDS/CLI-Anything/tree/main/cc-switch/agent-harness/cli_anything/ccswitch/skills
Command: npx skills add https://github.com/HKUDS/CLI-Anything --skill cli-anything-ccswitch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires click.

What problem does it solve?

Switching and auditing AI coding tool configurations (Claude Code, Codex, Gemini CLI, OpenCode, OpenClaw, Hermes) normally requires opening the CC Switch desktop app; this Skill exposes the same database through a scriptable command-line interface that agents and developers can query and modify directly.

Core Features & Use Cases

  • Provider Management: List, inspect, and switch the active AI provider per app with masked display of API tokens and secrets.
  • Proxy, MCP, and Skills Control: Check local HTTP proxy status and ports, enable MCP servers, and list installed skills and repos.
  • Usage and Session Analytics: View API usage statistics, cost logs, and browse AI conversation sessions with JSON output for programmatic consumption.
  • Use Case: An agent runs cli-anything-ccswitch --json providers set-current <id> --app claude to switch Claude Code to a different provider, then verifies the change with usage stats --days 7.

Quick Start

Ask the agent to list all configured providers for Claude Code in JSON format using the cli-anything-ccswitch command.

Frequently Asked Questions about cli-anything-ccswitch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I switch the active AI provider from the command line?

Run cli-anything-ccswitch providers set-current <provider-id> --app claude to change the active provider. Add --json before the subcommand for machine-readable output, and check the exit code (0 for success, 1 for errors).

How to view API usage and cost statistics for Claude Code?

Use cli-anything-ccswitch usage stats --days 30 to see aggregated usage statistics, or usage logs --limit 10 for recent request logs. Both commands support --json output and an --app filter for specific tools.

Does the CC Switch CLI require the desktop app to be installed?

Yes, the CLI reads from the live CC Switch SQLite database at ~/.cc-switch/cc-switch.db, so CC Switch must be installed with an active database. You can override the database path with the --db option.

Are API keys and secrets exposed in CLI output?

No, API tokens, keys, and secrets are masked in all output. The settings_config field in provider details shows truncated values such as sk-bc089...5cbb, so the CLI is safe for logging and agent consumption.

Which AI coding tools does the CC Switch CLI support?

The CLI supports six app types: claude, codex, gemini, opencode, openclaw, and hermes. Pass one of these values to the --app flag on provider, proxy, MCP, usage, and session commands.

Why does the CLI exit with code 1 on some commands?

Exit code 1 indicates an error such as a resource not found or an invalid app type, with the error message printed to stderr. Agents should check the exit code before parsing output.