tchivs

Smart Switch — AI skill for Claude Code

AI community

Multi-app model provider switcher: manage OpenAI/Anthropic-protocol providers (base URL + API key + models) and sync them, with models.dev metadata, into 8 coding agents — Claude Code, Codex CLI, omp.

How to install Smart Switch

This entry records only its repository, not the path inside it, so there is no exact command to give. Open tchivs/smart-switch and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Smart Switch does

Multi-app model provider switcher: manage OpenAI/Anthropic-protocol providers (base URL + API key + models) and sync them, with models.dev metadata, into 8 coding agents — Claude Code, Codex CLI, omp, pi, prime-agent, opencode, Hermes, WorkBuddy.

Alternatives in AI

  • Claude Code Switch — One-command model switcher for Claude Code (Only for Anthropic API) 655 ★
  • Qiaomu Markdown Proxy — Fetch any URL as clean Markdown via proxy services (r.jina.ai / defuddle.md) or built-in scripts 426 ★
  • Folkbench — AI API 中转站评测排行与切换工具:实测可用率、延迟与价格 · Open-source AI API relay benchmark, rankings & switcher for Claude Code / Co 420 ★

README

smart-switch

[![npm version](https://img.shields.io/npm/v/smart-switch?logo=npm&logoColor=white)](https://www.npmjs.com/package/smart-switch) [![CI](https://img.shields.io/github/actions/workflow/status/tchivs/smart-switch/ci.yml?branch=main&logo=github&logoColor=white&label=CI)](https://github.com/tchivs/smart-switch/actions/workflows/ci.yml) [![node version](https://img.shields.io/node/v/smart-switch?logo=nodedotjs&logoColor=white)](#install) [![license](https://img.shields.io/npm/l/smart-switch?color=blue)](./LICENSE)

[English] | [简体中文](./README.zh-CN.md)

Multi-app model provider switcher. Manage OpenAI-protocol and Anthropic-protocol providers (base URL + API key + models) in one place and sync them into the config files of your coding agents — like cc-switch, but for eight apps at once.

App Config written Protocols
Claude Code ~/.claude/settings.json env block anthropic
Codex CLI ~/.codex/config.toml + auth.json (Responses API only) openai
Oh My Pi (omp) ~/.omp/agent/models.yml (comments preserved) both
pi ~/.pi/agent/models.json + settings.json both
prime-agent ~/.prime/agent/models.json + settings.json both
opencode ~/.config/opencode/opencode.json both
Hermes ~/.hermes/config.yaml + .env (comments preserved) both
WorkBuddy ~/.workbuddy/models.json + settings.json openai

Model metadata — context window, max input/output tokens, reasoning/thinking levels, image input, pricing — is enriched from [models.dev](https://models.dev) and pushed into each app's config (`thinkingLevelMap` for pi/prime, `limit`/`attachment` for opencode, `contextWindow`/`maxTokens` for omp, ...). Reseller `/v1/models` endpoints carry no metadata; this closes that gap.

Install

npx smart-switch             # zero install: opens the interactive menu
npm install -g smart-switch  # requires Node >= 22.12

Quick start

smart-switch