Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

clother

> 开发工具
Open source

Use multiple Claude Code–compatible LLM providers from one CLI, switching profiles instantly with simple clother-* commands.

375 stars0 likes3 views
WebsiteGitHub

About

Use multiple Claude Code–compatible LLM providers from one CLI, switching profiles instantly with simple clother-* commands.

Why Clother?

Switching Claude Code providers usually means changing env vars, endpoints, models, and launcher scripts by hand. Clother gives you one install and one command pattern across Claude, Z.AI, Kimi, Alibaba, OpenRouter, local backends, China endpoints, and many other Anthropic-compatible providers.

Table of Contents

  • Installation
  • Core Usage
    • Benchmarking
  • Provider Reference
  • Troubleshooting
  • VS Code Integration
  • Platform Support
  • Under the Hood
  • Contributors
  • Star History
  • License

Installation

Homebrew (macOS recommended)

bash
# 1. Install Claude Code CLI
curl -fsSL https://claude.ai/install.sh | bash

# 2. Install Clother via tap
brew tap jolehuit/tap
brew install clother

# 3. Start using it — all launchers are ready immediately
clother-native                          # Use your Claude Pro/Max/Team subscription
clother-zai                             # Z.AI (GLM-5.2)
clother-zai --yolo                      # Skip permission prompts
clother-kimi                            # Kimi (K3)
clother config                          # Configure providers

All clother-* provider launchers are installed directly into $(brew --prefix)/bin by the formula — no extra setup needed. brew upgrade clother keeps everything up to date.

Update:

bash
clother update          # routes to brew upgrade under Homebrew
# or equivalently:
brew upgrade clother

curl (macOS / Linux)

…

Update:

bash
clother update          # downloads and installs latest release

This installs:

  • clother
  • clother-* provider launchers
  • resume compatibility for claude --resume ...

Install Options

By default, Clother installs launchers to:

  • the same directory as your existing claude binary, when claude is already on PATH
  • otherwise macOS: ~/bin
  • otherwise Linux: ~/.local/bin (XDG standard)

If the chosen bin directory is not on PATH, clother install prints a warning with the exact directory to add.

You can override this with --bin-dir or the CLOTHER_BIN environment variable:

bash
# Using --bin-dir flag
curl -fsSL https://raw.githubusercontent.com/jolehuit/clother/main/scripts/install.sh | bash -s -- --bin-dir ~/.local/bin

# Using environment variable
export CLOTHER_BIN="$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/jolehuit/clother/main/scripts/install.sh | bash

Clother keeps claude --resume ... working with Clother features after install.

Core Usage

Commands

Command Description
clother config [provider] Configure provider
clother list List profiles
clother info Show provider details
clother test Test connectivity
clother bench [provider...] [--prompt "..."] Benchmark provider latency
clother status Installation status
clother install Install/update Clother (create/refresh symlinks)
clother update Update to latest version
clother uninstall Remove everything

Update

bash
clother update

Routes to brew upgrade clother under Homebrew, or downloads the latest release for curl installs. Also refreshes provider symlinks.

Changing the Default Model

Each provider launcher comes with a default model (for example glm-5.2 for Z.AI). You can override it in two ways:

bash
# One-time: pass --model through to Claude CLI
clother-zai --model glm-4.7

# Permanent: configure the provider and pick a different default
clother config zai

Use clother info to inspect the resolved model.

Benchmarking

Compare latency across all configured providers at once:

bash
clother bench                              # all configured providers
clother bench zai kimi                     # specific providers only
clother bench --prompt "Write a haiku"     # custom prompt

Output shows TTFT (time to first token) and total response time, sorted fastest first:

  Provider           Model                      TTFT    Total   Preview
  ──────────────────────────────────────────────────────────────────────────────
  kimi               k3-256k                    180ms    0.9s   "Hello!"
  zai                glm-5.2                    312ms    1.2s   "Hello!"
  deepseek           deepseek-chat              890ms    3.1s   "Hello!"

Only providers with a configured API key are included. Local providers are skipped.

Resume

Clother keeps the resume command printed by Claude Code working across providers.

After a provider-launched session, Clother also prints a provider-aware reopen command such as:

bash
clother-kimi --resume 

When resuming a non-Claude session into native Claude, Clother temporarily sanitizes incompatible non-Claude thinking blocks for the duration of that single launch, then restores the original session file afterwards.

Provider Reference

Cloud

Command Provider Model API Key
clother-native Anthropic Claude Your subscription
clother-zai Z.AI GLM-5.2 z.ai
clother-minimax MiniMax MiniMax-M3 minimax.io
clother-kimi Kimi k3-256k kimi.com
clother-moonshot Moonshot AI kimi-k3 moonshot.ai
clother-deepseek DeepSeek deepseek-chat deepseek.com
clother-mimo Xiaomi MiMo mimo-v2.5-pro xiaomimimo.com
clother-alibaba Alibaba Coding Plan qwen3.7-plus modelstudio
clother-alibaba-us Alibaba Coding Plan (US) qwen3.7-plus modelstudio

OpenRouter (100+ Models)

bash
clother config openrouter               # Set API key + add models
# Example: alias moonshotai/kimi-k2.5 as kimi-k25
clother-or kimi-k25                     # Works on every install
clother-or-kimi-k25                     # Per-alias shortcut (curl installs)

clother-or works on every install. curl installs additionally get a clother-or- symlink per alias when you run clother config; Homebrew installs skip per-alias symlinks (the formula owns its bin directory), so use the clother-or form there.

Tip: Find model IDs on openrouter.ai/models — click the copy icon next to any model name.

If a model doesn't work as expected, try the :exacto variant (e.g. moonshotai/kimi-k2-0905:exacto) which provides better tool calling support.

China Endpoints

Command Provider Endpoint
clother-zai-cn Z.AI China open.bigmodel.cn
clother-minimax-cn MiniMax China api.minimaxi.com
clother-ve Volcengine ark.cn-beijing.volces.com
clother-alibaba-cn Alibaba China coding.dashscope.aliyuncs.com

Local (No API Key)

Command Provider Port Setup
clother-ollama Ollama 11434 ollama.com
clother-lmstudio LM Studio 1234 lmstudio.ai
clother-llamacpp llama.cpp 8000 github.com/ggml-org/llama.cpp
bash
# Ollama
ollama pull qwen3-coder && ollama serve
clother-ollama --model qwen3-coder

# LM Studio
clother-lmstudio --model 

# llama.cpp
./llama-server --model model.gguf --port 8000 --jinja
clother-llamacpp --model 

Remote servers

Local launchers default to localhost, but the backend can run on another machine. Point a launcher at a remote base URL with clother config:

bash
clother config lmstudio
# Base URL [http://localhost:1234]: http://192.168.123.123:1234
clother-lmstudio --model 

Works the same for ollama and llamacpp. Enter the default localhost URL again to switch back.

Custom

Any Anthropic-compatible endpoint:

bash
clother config custom                   # e.g. name it "myprovider"
clother-custom myprovider               # Works on every install
clother-myprovider                      # Per-provider shortcut (curl installs)

As with OpenRouter aliases, the per-provider clother- symlink is only created on curl installs — under Homebrew, use clother-custom .

Alibaba Coding Plan Models

All Alibaba variants (alibaba, alibaba-us, alibaba-cn) share the same API key. The Coding Plan enforces an exact-string model allowlist; the currently supported IDs are:

Model
qwen3.7-plus (default)
qwen3.6-plus
qwen3.5-plus
kimi-k2.5
glm-5
MiniMax-M2.5
qwen3-coder-next
qwen3-coder-plus
qwen3-max-2026-01-23
glm-4.7

Switch models with --model:

bash
clother-alibaba --model kimi-k2.5
clother-alibaba --model glm-5
clother-alibaba-cn --model qwen3-coder-next

Troubleshooting

Problem Solution
claude: command not found Install Claude CLI first
clother: command not found Run clother status to see the installed bin dir, then add that directory to PATH and restart your shell
claude --resume ... does not behave like Clother Restart your shell, then run clother install again
--yolo is not recognized Restart your shell, then run clother install again
API key not set Run clother config

VS Code Integration

Clother works with the official Claude Code extension. Use Claude Code extension 2.6+.

To configure it:

  1. Open VS Code Settings (Cmd+, or Ctrl+,).
  2. Search for "Claude Process Wrapper" (claudeProcessWrapper).
  3. Set it to the full path of your chosen launcher:
    • macOS: /Users/yourname/bin/clother-zai
    • Linux: /home/yourname/.local/bin/clother-zai
  4. Reload VS Code.

Note: Requires Clother v2.6+ (which handles non-interactive shell output correctly).

Platform Support

macOS (zsh/bash) • Linux (zsh/bash) • Windows (WSL)

Under the Hood

How It Works

Clother is a single Go binary. The installer downloads the release artifact, installs clother into your bin directory, then creates:

  • clother-* symlinks for providers
  • a claude shim symlink for resume compatibility

At runtime, the binary resolves the selected profile from its own invocation name, loads config and secrets, sets the required Anthropic-compatible environment variables, then launches the real Claude binary outside the Clother bin directory.

Example for clother-zai:

bash
export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="$ZAI_API_KEY"
exec /path/to/the/real/claude "$@"

API keys stored in ~/.local/share/clother/secrets.env (chmod 600).

--yolo is accepted by Clother launchers and by the Clother claude shim as shorthand for --dangerously-skip-permissions.

Local Release Testing

Test the binary installer locally against a local directory or server:

bash
CLOTHER_RELEASE_BASE_URL=http://127.0.0.1:8000 \
  ./scripts/install.sh install

Contributors

  • @darkokoa — China endpoints
  • @RawToast — Kimi endpoint fix
  • @sammcj — Security hardening
  • @aprakasa — Linux compatibility fixes in load_secrets()
  • @luciano-fiandesio — Install directory improvement (issue)
  • @canberksinangil — Config overlay fix, GLM-5.2 default
  • @yasaricli — clother bench command, GLM-5.1 support
  • @jeliseocd — Config overlay collision report and diagnosis

Star

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goclaudeclaudecodeclivibecoding

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具