Wrapper Script
A wrapper script is a generated shell script that acts as the entry point for a claude-multi instance. It sets the right environment variables and then runs Claude Code.
What it does
When you run claude-glm (for example), the wrapper script:
- Sets
CLAUDE_CONFIG_DIRto~/.claude-multi/glm/ - Exports the provider’s environment variables (API key, base URL, model names, timeouts)
- Runs the
claudebinary
That’s it. No daemon, no proxy, no background process. Just environment setup and a binary call.
Where it lives
Wrapper scripts are installed to /usr/local/bin/claude-<name> by default. This path is in your $PATH, so you can run claude-glm or claude-deepseek from any terminal.
How it’s generated
When you create an instance through the TUI or CLI, claude-multi generates the wrapper script based on the provider template. The template defines which environment variables to set. The wrapper script is written to disk and made executable.
Customization
You can edit a wrapper script directly to change environment variables without touching the TUI. Just open /usr/local/bin/claude-<name> in any editor. Changes take effect on the next run.
What it looks like
A simplified example:
#!/bin/bashexport CLAUDE_CONFIG_DIR="$HOME/.claude-multi/glm"export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"export ANTHROPIC_MODEL="glm-5.1"exec claude "$@"The exec replaces the shell process with Claude Code, so signals and exit codes pass through cleanly.
Related terms
- Config Directory
The directory where a claude-multi instance stores its settings.json, conversation history, MCP server configs, plugins, and skills.
- Provider Template
A pre-configured set of environment variables, base URLs, and model mappings that tells Claude Code how to reach a specific LLM provider.
- Instance Isolation
Each claude-multi instance runs in its own config directory with separate settings, history, MCP servers, and plugins. No shared state between instances.
- API Key
The authentication token that identifies your account with an LLM provider. Each claude-multi instance stores its own API key in its config directory.
- Base URL
The API endpoint URL that Claude Code sends requests to. Each provider template sets a different base URL to route traffic to the right service.