Smart Switch banner
tchivs tchivs

Smart Switch

AI community

Description

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.

Installation

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

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