cli-switch

Switch AI models across Claude Code, Gemini CLI, and Codex CLI with JSON outputs.

10|5|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/zhoutian1995/cli-switch --skill cli-switch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-switch
Source: https://github.com/zhoutian1995/cli-switch/tree/main
Command: npx skills add https://github.com/zhoutian1995/cli-switch --skill cli-switch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

cli-switch solves the challenge of coordinating AI model switching across Claude Code, Gemini CLI, and Codex CLI, especially when multiple terminals are used concurrently.

Core Features & Use Cases

  • One-click model switching across Claude Code, Gemini CLI, and Codex CLI to speed up development.
  • Per-terminal isolation to prevent cross-session interference and predictable behavior.
  • JSON outputs and hook support to integrate with agent workflows.

Quick Start

Try cli-switch opus4.6 to switch to Claude Code's top model and then run cli-switch status to confirm the active state.

Frequently Asked Questions about cli-switch

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

FAQPage Schema
How do I switch AI models across Claude Code, Gemini CLI, and Codex CLI from a single terminal command?

Switch AI models across Claude Code, Gemini CLI, and Codex CLI using a single command like cli-switch opus4.6. It applies atomic writes with per-session isolation to ensure fast, deterministic model changes without cross-terminal interference.

Can I run multiple terminal sessions with different AI models without causing state corruption?

Yes, running multiple terminal sessions with different AI models is supported through per-session isolation. This mechanism prevents cross-session interference and state corruption, ensuring predictable behavior across concurrent environments.

How do I integrate AI model switching into automated agent workflows?

Integrate AI model switching into automated agent workflows using JSON outputs and hook support. This allows deterministic model changes to be triggered and verified programmatically within existing automation pipelines.

What is the best way to verify the active AI model after switching in a CLI environment?

The best way to verify the active AI model is to run cli-switch status after switching. It confirms the active state across Claude Code, Gemini CLI, and Codex CLI, providing deterministic JSON outputs for confirmation.

Does CLI model switching work with YAML frontmatter and optional resources directories?

Yes, CLI model switching works by implementing YAML frontmatter and optional resources directories. This design supports structured configuration and atomic writes to ensure deterministic model changes across tools.

Why do I need per-session isolation when coordinating AI model changes across multiple terminals?

Per-session isolation is needed when coordinating AI model changes across multiple terminals to prevent cross-session interference. It ensures that switching a model in one terminal does not corrupt the state or behavior of another.