Getting Started

What is claude-multi and why should I use it?

claude-multi is a CLI that lets you run multiple Claude Code instances at the same time, each pointed at a different AI provider. Every instance gets its own config directory under ~/.claude-<name>/, so settings, history, and MCP servers don’t bleed into each other.

The problem it solves

Claude Code keeps everything in one ~/.claude folder, settings, plugins, skills, MCP servers, conversation history. That works fine until you want to try a second provider, or keep a work setup separate from a personal one. Suddenly you’re manually copying files around, swapping environment variables, and hoping nothing gets overwritten.

claude-multi gives each provider its own alias (claude-glm, claude-deepseek, claude-anthropic), each backed by a real directory you can browse and edit. No shared state, no accidental overwrites.

What it isn’t

It doesn’t fork or patch Claude Code. It doesn’t run a proxy or daemon. It doesn’t do model routing. Each instance is a standalone Claude Code environment, claude-multi just manages the plumbing.

What you get

  • 8 provider templates with pre-configured endpoints and model mappings
  • Plugin auto-sync via symlinks (update once, all instances get it)
  • MCP server management across instances
  • Health monitoring that catches broken symlinks, missing dirs, corrupted config
  • A terminal UI built with Ink/React, plus a fallback prompts mode

More info

How do I install claude-multi?

Pick whichever package manager you already use:

Terminal window
# bun
bun add -g claude-multi
# npm
npm install -g claude-multi
# pnpm
pnpm add -g claude-multi
# Deno
deno install -g npm:claude-multi

Then launch the interactive TUI:

Terminal window
claude-multi

Or create an instance directly:

Terminal window
claude-multi add deepseek --provider deepseek --api-key sk-your-key

This generates a wrapper script in your PATH (the exact location depends on your package manager, could be ~/.bun/bin/, ~/.local/bin/, or similar) that you can run like any other command.

Before you start

You’ll need Claude Code installed (npm install -g @anthropic-ai/claude-code), a supported runtime (Bun 1+, Node 18+, or Deno 1+), and an API key for at least one provider.

More info

Providers

Which AI providers are supported?

Each provider is a template: a bundle of environment variables (base URL, model mappings, default settings) merged into a new instance. You bring the API key; the template handles the rest. The full list, with endpoints and model mappings for all eight templates, lives on the providers page.

Using Anthropic directly

You don’t need a template for Anthropic, that’s Claude Code’s default. Run claude directly for Anthropic, and use claude-multi for everything else. If you still want a managed instance for Anthropic (to keep its config isolated), create one without a provider:

Terminal window
claude-multi add anthropic --skip-prompts

It connects to Anthropic’s API using Claude Code’s built-in defaults.

Using a provider that’s not listed

You can create an instance without a template and configure it manually:

Terminal window
claude-multi add my-provider
# Then edit ~/.claude-multi/my-provider/settings.json

Set ANTHROPIC_BASE_URL, ANTHROPIC_MODEL, and ANTHROPIC_SMALL_FAST_MODEL to match your provider’s API.

More info

Can I use it with local models like Ollama?

Yes, as long as your local model server exposes an Anthropic-compatible REST endpoint. Claude Code speaks the Anthropic API protocol, so the server on the other end needs to understand that format.

How to set it up

Create an instance without a template:

Terminal window
claude-multi add local

Then edit ~/.claude-multi/local/settings.json and set the env vars to point at your local server:

{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:11434/v1",
"ANTHROPIC_MODEL": "your-model-name",
"ANTHROPIC_SMALL_FAST_MODEL": "your-fast-model"
}
}

Replace the URL and model names with whatever your local server exposes.

What works and what doesn’t

If your local server faithfully implements the Anthropic messages API (the /v1/messages endpoint), Claude Code will work with it. Tools like Ollama with an Anthropic-compatible adapter, LiteLLM, or vLLM with the right proxy can bridge the gap.

The further your local setup deviates from the Anthropic API spec, the more likely you are to hit edge cases, especially around streaming, tool use, and extended thinking.

A practical note on cost

Running local models eliminates per-token API costs entirely. You pay in compute (GPU time, electricity) instead. For high-volume tasks like code generation and refactoring, this can be significantly cheaper than any cloud provider, if you have the hardware.

More info

  • /providers/: template reference and env var details
  • src/templates.ts: see how templates set ANTHROPIC_BASE_URL and model mappings for reference

Usage

How do I create a new instance for a provider?

Two ways: the interactive TUI, or a single CLI command.

Interactive TUI

Terminal window
claude-multi

Pick Add new instance. The wizard walks through instance name, provider template, API key, paths, copy options, plugin selection, and sync mode. The instance is created and you’re back at the menu.

CLI command

Terminal window
claude-multi add deepseek --provider deepseek --api-key sk-your-key

The add command takes --provider, --api-key, and a set of copy and sync flags (--copy-settings, --copy-plugins, --copy-mcp, --sync-mode). See the CLI reference for the full set.

After that, run claude-<name> (e.g. claude-deepseek) to launch Claude Code with that provider.

More info

Can I run multiple instances at the same time?

Yes. Open two (or more) terminals and run different aliases:

Terminal window
# Terminal 1
claude-deepseek
# Terminal 2
claude-glm

Each instance has its own config directory, so they don’t interfere: separate settings, separate conversation history, separate MCP servers. You can even point two instances at the same provider if you want isolated contexts for different projects.

There’s no shared state between instances (no lock files, no central server, no port conflicts) because each claude-<name> command just sets CLAUDE_CONFIG_DIR and launches the real claude binary. For why that’s safe and the common multi-instance workflows, see how it works.

How do I remove an instance?

From the CLI:

Terminal window
claude-multi remove deepseek

Or use the alias:

Terminal window
claude-multi rm deepseek

From the TUI, select Remove instance and pick which one.

What gets removed

The remove command does two things:

  1. Removes the instance from claude-multi’s registry (~/.claude-multi/config.json)
  2. Deletes the wrapper script (e.g. ~/.local/bin/claude-deepseek)

It does not delete the config directory (~/.claude-multi/deepseek/). This is intentional, your conversation history lives there, and you might want to keep it.

Deleting the config directory

After removing the instance, you’ll see a hint:

To remove config files, run: rm -rf ~/.claude-multi/deepseek

Run that if you’re sure you don’t need the history. Skip it if you might want to recreate the instance later with the same conversation context.

Removing in scripts or CI

Use --force to skip the confirmation prompt:

Terminal window
claude-multi remove deepseek --force

More info

Architecture

Is claude-multi a fork of Claude Code?

No. claude-multi doesn’t fork, patch, or modify Claude Code. Each instance is a shell wrapper script that sets CLAUDE_CONFIG_DIR to point at an isolated config directory, then execs the real claude binary. No proxy, no monkey-patching, no background process.

Everything else (flags, commands, keybindings) works exactly as it does normally, and Claude Code updates land immediately because you’re running the actual binary. Each instance is also a real directory you can cd into, inspect, or delete with standard tools.

For the wrapper script itself and the full architecture, see how it works.

What’s inside an instance directory

Every instance lives under ~/.claude-multi/<name>/: a settings.json (provider env vars and merged settings), a .claude.json (instance-level Claude config), plugins/ and skills/ (symlinked or copied), and a projects/ directory holding conversation history per project.

More info

Plugins & MCP

How does plugin and skill syncing work?

Auto-sync symlinks each instance’s plugins/ and skills/ directories back to your primary ~/.claude, so you install or update a plugin once and every synced instance picks it up immediately. Toggle it per instance:

Terminal window
claude-multi auto-sync deepseek on
claude-multi auto-sync deepseek off

If symlinks break (you moved or deleted ~/.claude), repair them with claude-multi fix-symlinks, or use Re-sync symlinks in the TUI.

Sync now has three modes (auto / half-manual / full-manual), and conversions are one-way: you can step down from auto to half-manual to full-manual, but not back up. For the full mechanism, the mode comparison, and collision detection, see the plugins and MCP guide.

More info

How do I manage MCP servers across instances?

MCP (Model Context Protocol) servers let Claude Code talk to external tools: Jira, GitHub, Slack, databases, anything you’ve wired up. Each instance can have its own set, and claude-multi manages them without making you dig through JSON:

  • claude-multi mcp list — show MCP server configs across all instances
  • claude-multi mcp copy — copy a server config from one instance to another (also available in the TUI under MCP servers)
  • claude-multi mcp verify — check that referenced executables and paths still exist

When you create an instance through the TUI, the Copy Options step can bring MCP configs over from your primary ~/.claude install. Configs live in each instance’s settings.json at ~/.claude-multi/<name>/settings.json, same format as Claude Code’s native MCP config.

For setup details, edge cases, and the full command reference, see the plugins and MCP guide.

More info

Security

Is my API key stored safely?

Your API keys stay on your machine. claude-multi has no backend, no telemetry, and makes no network calls during normal operation.

Where keys end up

Each instance stores its key in ~/.claude-multi/<name>/settings.json as part of the ANTHROPIC_AUTH_TOKEN env var. When you launch that instance, Claude Code reads the key directly from the config file, claude-multi isn’t involved at runtime.

The only time claude-multi touches your key is during instance creation, when it writes it into the settings file. After that, it’s between you and Claude Code.

About those config writes

Settings files are written using a temp-file-rename pattern with JSON verification. The file gets written to a temp path, verified as valid JSON, then atomically renamed into place. No partial writes, no corrupted configs.

Practical tips

  • If you use the same key across providers, you can copy settings from ~/.claude during instance creation instead of re-entering it
  • For different keys per provider, enter them individually during setup or edit the settings file directly
  • Run claude-multi info <name> to see what’s stored for any instance
  • The version subcommand checks npm for updates, but that’s the only network call claude-multi ever makes, and it doesn’t involve your API key

More info

Troubleshooting

How do I troubleshoot broken instances?

claude-multi has a health monitor. Press ! in the TUI (or watch for the warning banner on the main menu), or run claude-multi list. It surfaces missing config directories, deleted wrapper scripts, broken symlinks, corrupted settings.json, and failed migrations, each with a suggested fix. It won’t change anything without asking.

The most common issue is broken symlinks. Repair them across every instance:

Terminal window
claude-multi fix-symlinks

You can also target specific instances: claude-multi fix-symlinks deepseek glm.

For the full set of checks, recovery steps, and how migrations roll back from .bak files, see the troubleshooting guide.

More info

Pricing

Does claude-multi cost anything?

claude-multi is free. It’s MIT-licensed, published on npm, and takes no commission or cut from your API usage. The only cost is what your provider charges you for tokens.

Where the money goes

When you run claude-deepseek, you’re hitting DeepSeek’s API directly. When you run claude-glm, you’re hitting GLM’s API directly. claude-multi doesn’t sit in the middle, it just configures which endpoint Claude Code talks to.

So your bill depends on:

  • Which provider you’re using
  • How many tokens you consume
  • That provider’s pricing model (pay-per-token vs. subscription)

Comparing providers

That’s actually one of the reasons claude-multi exists, you can A/B providers on the same task and see which gives you the best results per dollar. Some providers like DeepSeek and MiMo are significantly cheaper per token than Anthropic. Others like Kimi or Qwen offer subscription plans with credit pools.

Check the providers page for the full list with model details.

What about Claude Code itself?

Claude Code (the @anthropic-ai/claude-code package) is also free. It’s Anthropic’s open-source CLI. You pay for API access, not the tool.

More info

Compatibility

Does it work on Windows?

Yes. claude-multi works on Windows, macOS, and Linux. The CLI commands, the TUI, plugin and MCP management, and instance creation all behave the same across the three platforms.

What’s different on Windows

The only difference is the wrapper scripts claude-multi generates for each instance. On Unix they are plain shell scripts starting with #!/bin/sh. On Windows they are .cmd batch files that do the same job:

Terminal window
@echo off
REM Claude Multi - Wrapper for deepseek
set "CLAUDE_CONFIG_DIR=%USERPROFILE%\.claude-multi\deepseek"
"C:\path\to\claude.exe" %*

The mechanism is identical: set CLAUDE_CONFIG_DIR so Claude Code reads its config from the instance directory, then run the unmodified claude binary. On Windows that binary is claude.cmd or claude.exe, whichever Claude Code’s installer placed in your PATH. claude-multi finds it the same way your terminal does.

Installing on Windows

Use PowerShell or Command Prompt with the Node.js runtime you already have:

Terminal window
npm install -g claude-multi

If you use Bun for Windows or Deno, those work too:

Terminal window
bun add -g claude-multi
deno install -g -A -n claude-multi npm:claude-multi

After install, run claude-multi to open the TUI. The instance names you pick become commands like claude-deepseek.cmd, written to the global bin directory your package manager manages.

claude-<name> not recognized

If Windows can’t find the wrapper after you create an instance, the package manager’s global bin directory is probably not on your PATH. For npm that directory is usually %APPDATA%\npm. Check it with:

Terminal window
npm config get prefix

Make sure the returned path is in your user PATH environment variable, then open a new terminal. The health check (! from the main menu, or claude-multi list) will also flag a missing wrapper and tell you what’s wrong.

A note on line endings and shells

Git Bash, WSL, and Cygwin are common on Windows. claude-multi generates native .cmd wrappers, so calling claude-deepseek from a bash-style shell works because the shell hands off to cmd.exe for .cmd files. If you live entirely inside WSL, you are effectively on Linux, and claude-multi will generate Unix shell wrappers there instead.

CI/CD testing

The project’s CI runs install and execution tests on all three operating systems against all three runtimes (bun, node, deno). Windows is not an afterthought, it is in the matrix on every release. If a Windows-specific regression lands, the tests catch it before publish.

More info

Maintenance

How do I update claude-multi and Claude Code?

Two separate things need updating, and they update independently: the claude-multi tool itself, and the Claude Code binary it wraps. Mixing them up is the most common source of “I updated but nothing changed” confusion.

Updating Claude Code

Claude Code is the @anthropic-ai/claude-code package. Every claude-<name> instance launches the same shared binary, so you only update it once. Check what you have versus what’s published:

Terminal window
claude-multi version

This prints three things: the version of claude-multi you are running, the installed version of Claude Code, and the latest Claude Code available on npm, with a flag if an update is pending. To apply it:

Terminal window
claude-multi update

That runs the upgrade for the shared @anthropic-ai/claude-code package. After it finishes, every instance picks up the new binary on its next launch. You do not need to recreate or touch any instance.

Updating claude-multi itself

claude-multi is a separate npm package. Update it with whatever you installed it with:

Terminal window
# bun
bun update -g claude-multi
# npm
npm update -g claude-multi
# pnpm
pnpm update -g claude-multi
# Deno
deno install -g -A -n claude-multi npm:claude-multi

Deno’s install command reinstalls, which is how you get the new version under Deno. With bun, npm, and pnpm, the update -g flag pulls the latest.

What happens to instances during updates

Nothing destructive. Neither an update to Claude Code nor an update to claude-multi touches your instance directories. The config at ~/.claude-multi/<name>/, the settings.json, the plugins, the skills, and the conversation history under projects/ all stay exactly where they were. An instance is just a config directory plus a wrapper script, and the wrapper only sets CLAUDE_CONFIG_DIR before exec’ing claude. None of that depends on a specific version.

After a major Claude Code release

Occasionally Claude Code ships a breaking change to its config schema. claude-multi runs a migration on launch when it detects one, and those migrations write .bak files first. If an instance looks wrong after an update, open the TUI and press ! for the health screen, or check for .bak files in ~/.claude-multi/<name>/ and restore manually. See the troubleshooting FAQ for the full recovery flow.

More info

Didn't find it?

Open an issue. We actually read them.