Chuyển đến nội dung
Skillpedia
Agent58k · #3187

cli-anything-ccswitch

Skill này làm gì

Skill này cho phép agent kiểm tra và quản lý cài đặt của các công cụ lập trình AI do CC Switch kiểm soát, như Claude Code và Codex. Nó dành cho lập trình viên chuyển đổi giữa nhiều nhà cung cấp và công cụ.

Khi nào nên dùng

  • ✓Khi bạn muốn xem công cụ lập trình AI nào đang dùng nhà cung cấp nào.
  • ✓Khi bạn muốn đổi nhà cung cấp đang hoạt động cho một công cụ lập trình AI.
  • ✓Khi bạn muốn kiểm tra thống kê sử dụng API và chi phí cho các công cụ lập trình của mình.

Liên kết skill

https://github.com/HKUDS/CLI-Anything/blob/main/cc-switch/agent-harness/cli_anything/ccswitch/skills/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/CLI-Anything/blob/main/cc-switch/agent-harness/cli_anything/ccswitch/skills/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Cho tôi biết công cụ lập trình của tôi đang dùng nhà cung cấp AI nào, và chi phí trong ba ngày qua là bao nhiêu.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill đọc cơ sở dữ liệu CC Switch trên máy bạn và chạy công cụ dòng lệnh của nó để liệt kê hoặc thay đổi cài đặt. Nó cũng có thể hiển thị log sử dụng và duyệt các phiên đã qua.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

CC Switch CLI

CLI harness for CC Switch, a desktop app that manages AI coding tool (Claude Code, Codex, Gemini CLI, OpenCode, OpenClaw, Hermes) configurations. Built with Click and the CLI-Anything methodology.

Prerequisites

  • Python 3.10+
  • CC Switch installed with an active database at ~/.cc-switch/cc-switch.db

Installation

pip install -e .

After installation, the command cli-anything-ccswitch is available.

Command Groups

Group Description
status Show a quick database overview
providers Manage AI provider configurations (list, get, set-current)
proxy Manage the local HTTP proxy server (status, config)
mcp Manage MCP (Model Context Protocol) servers (list, enable)
skills Manage installed skills (list, repos)
usage View API usage and cost statistics (stats, logs)
settings View and manage CC Switch settings (list, get, set)
sessions Browse and search AI conversation sessions (list)

Global Options

  • --json — Output in machine-readable JSON format (recommended for agent use)
  • --db PATH — Override the database path

Agent-Specific Guidance

JSON Output

Always use --json for programmatic consumption. Place it before the subcommand:

cli-anything-ccswitch --json providers list
cli-anything-ccswitch --json usage stats --days 30
cli-anything-ccswitch --json providers get <id> --app claude

Sensitive Values

API tokens, keys, and secrets are masked in all output. The settings_config field in provider details shows masked values (e.g., sk-bc089...5cbb).

Exit Codes

  • 0 — Success
  • 1 — Error (e.g., resource not found, invalid app type)

App Types

Valid app types: claude, codex, gemini, opencode, openclaw, hermes.

Examples

List all providers

cli-anything-ccswitch providers list
cli-anything-ccswitch --json providers list --app claude

Switch active provider

cli-anything-ccswitch providers set-current <provider-id> --app claude

Check proxy status

cli-anything-ccswitch proxy status --app claude
cli-anything-ccswitch proxy config --app claude --set-port 8080

View usage stats

cli-anything-ccswitch usage stats --days 7
cli-anything-ccswitch --json usage stats --days 30 --app claude
cli-anything-ccswitch usage logs --limit 10

List skills

cli-anything-ccswitch skills list
cli-anything-ccswitch skills repos

MCP servers

cli-anything-ccswitch mcp list
cli-anything-ccswitch mcp enable <server-id> --app claude --on

Settings

cli-anything-ccswitch settings list
cli-anything-ccswitch settings get <key>
cli-anything-ccswitch settings set <key> <value>

Sessions

cli-anything-ccswitch sessions list --app claude --limit 10

Status overview

cli-anything-ccswitch status
cli-anything-ccswitch
cli-anything-ccswitch --json

Error Handling

When a resource is not found, the CLI prints an error message to stderr and exits with code 1. Agents should check the exit code before parsing output.

Database

The CLI reads from the live CC Switch SQLite database. All read operations are safe and do not modify the database. Write operations (providers set-current, proxy config, mcp enable, settings set) modify the database directly.

Câu hỏi thường gặp

Tôi có cần cài CC Switch không?

Có, CC Switch phải được cài với một cơ sở dữ liệu đang hoạt động trên máy bạn.

Nó bao gồm những công cụ nào?

Nó bao gồm Claude Code, Codex, Gemini CLI, OpenCode, OpenClaw và Hermes.

Nó có thay đổi cài đặt được không?

Có, nó có thể đặt nhà cung cấp hiện tại và bật MCP server, cùng các thay đổi khác.

Chi tiết

Mô tả gốc của tác giả

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

repo: HKUDS/CLI-Anything

Độ phổ biến

Sao GitHub
58k
Vị trí xếp hạng
#3187
Giấy phép
Apache-2.0
Cập nhật
21/9/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự