cli-model-switcher

Switch CLI AI agent profiles and share memory across Codex, Claude, and OpenCode.

Updated May 29, 2026
One-click install
npx skills add https://github.com/UtenKekkoDev/cli-model-switcher --skill cli-model-switcher-utenkekkodev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-model-switcher
Source: https://github.com/UtenKekkoDev/cli-model-switcher
Command: npx skills add https://github.com/UtenKekkoDev/cli-model-switcher --skill cli-model-switcher-utenkekkodev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Managing multiple command-line AI coding agents means juggling separate configs, API keys, and context files. This Skill centralizes profile switching between Codex, Claude Code, OpenCode, Gemini CLI, local models, and OpenAI-compatible gateways while keeping one shared memory layer across all agents. ## Core Features & Use Cases - Profile & Recipe Management: Switch active CLI AI profiles with ai-use, install one-step recipes for stacks like OpenCode + OpenRouter, Claude Code, DeepSeek, Ollama, and LM Studio, and manage API presets for 20+ providers. - Shared Cross-Agent Memory: Store global, project, and session context in neutral files exposed through AI_CLI_MEMORY, with tagging, dedupe, compaction, and secret auditing. - Multi-Agent Workflows: Run several agents in one terminal workspace via tmux or Windows Terminal, install agent bridge files so /switch claude works inside a running agent, and pass handoff notes between agents. - Use Case: A developer working in a project runs ai-lite to install agent bridges, then switches between Codex for implementation and Claude for review using ai-workspace switch claude, with both agents reading the same shared memory context. ## Quick Start Ask the AI to set up the CLI model switcher by running the installer and then switching the active profile to a recipe like opencode-openrouter.

Frequently Asked Questions about cli-model-switcher

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

FAQPage Schema
How do I switch between Codex and Claude Code in the terminal?

Run ai-use codex or ai-use claude to change the active profile, or use ai-workspace switch claude inside a tmux or Windows Terminal workspace. The switcher updates environment variables and exposes the shared memory file through AI_CLI_MEMORY.

How do I share memory between multiple AI coding agents?

The switcher maintains global, project, and session memory files under ~/.ai-cli-switcher/memory and merges them into a combined context.md file. Every active profile exposes this file through the AI_CLI_MEMORY environment variable so all agents read the same context.

Can I use OpenRouter or local models like Ollama with CLI agents?

Yes, built-in API presets cover OpenRouter, DeepSeek, Ollama, LM Studio, Groq, and many others, plus custom OpenAI-compatible endpoints. Recipes like opencode-openrouter and local-ollama install complete profiles in one command.

Does the switcher store API keys in its config files?

No, direct-looking API keys are refused in profile env values by default. You reference environment variable names such as ${OPENROUTER_API_KEY}, and ai-secret audit scans state and memory for accidental secrets before export.

How do I make /switch work inside an already-running agent?

Run ai-agent install codex claude opencode in your project to write AGENTS.md and CLAUDE.md bridge files, or paste the output of ai-agent prompt into the running session. The agent then maps /switch commands to ai-workspace switch.

What shells and platforms does the CLI switcher support?

It generates helpers for PowerShell, cmd.exe, Bash, Zsh, fish, and Nushell, and runs on Windows, Linux, macOS, and WSL. Session backends include tmux, Windows Terminal tabs, PowerShell windows, and a printable fallback.