Multi Claude Code Window Manager is a PowerShell script that allows you to manage multiple Claude Code instances in separate Windows Terminal windows. Each instance can be configured with different API endpoints, models, and startup prompts.
- Launch multiple Claude Code instances simultaneously in separate Windows Terminal tabs
- Configure different API endpoints, models, and authentication tokens for each instance
- Inject custom prompts automatically after startup
- Manage configurations through a JSON file
- Support for custom commands (e.g.,
claudeorccr code)
- Windows 10/11 with Windows Terminal installed
- PowerShell 5.1 or later
- Claude Code application installed and accessible from command line
- Windows Terminal should be installed (comes by default with Windows 11)
- Clone or download this repository
- Ensure PowerShell execution policy allows running scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- (Optional) Copy
mcc.ps1to a directory in your PATH environment variable to run it from anywhere:
The script uses a JSON configuration file (by default located at %APPDATA%\multiClaudeCode\config.json) to define Claude Code instances.
To create a new configuration file:
.\mcc.ps1 -Create{
"configurations": [
{
"name": "Claude-Default",
"ANTHROPIC_AUTH_TOKEN": "your-api-key-here",
"ANTHROPIC_BASE_URL": "https://api.anthropic.com",
"ANTHROPIC_MODEL": "claude-3-5-sonnet-20241022",
"ANTHROPIC_SMALL_FAST_MODEL": "claude-3-haiku-20240307",
"command": "claude",
"prompt": "You will do nothing until an exactly command, and will always response in Chinese."
}
]
}name: The name of the configurationANTHROPIC_AUTH_TOKEN: API key for authentication (optional)ANTHROPIC_BASE_URL: API endpoint URL (optional)ANTHROPIC_MODEL: Main model to use (optional)ANTHROPIC_SMALL_FAST_MODEL: Small/fast model to use (optional)command: Command to execute (default:claude)prompt: Optional prompt to inject after startup
To display help information:
.\mcc.ps1 -HelpTo start all Claude Code instances defined in the configuration file:
.\mcc.ps1To start a specific configuration by name:
.\mcc.ps1 -Name "Claude-Default"To switch to (or create) a git worktree for a branch and start its corresponding configuration:
.\mcc.ps1 -Branch "feature-branch"This command streamlines development on different features. It automatically manages a git worktree for the specified branch and then launches the configuration from your config.json that has the same name as the branch.
The worktree directory is created using the format {projectName}_{branchName} (e.g., multiClaudeCode_feature-branch) to avoid conflicts between different projects with the same branch names.
To start a configuration by its index (1-based):
.\mcc.ps1 -U 1To list all available configurations:
.\mcc.ps1 -ListTo edit the configuration file:
.\mcc.ps1 -EditTo create a new configuration file:
.\mcc.ps1 -CreateTo use a custom configuration file path:
.\mcc.ps1 -Config "C:\path\to\your\config.json"-
Show help information:
.\mcc.ps1 -Help -
Start all configurations:
.\mcc.ps1
-
Start a specific configuration:
.\mcc.ps1 -Name "Claude-Default"
-
List all configurations:
.\mcc.ps1 -List
Charlie Chu (朱國棟) - [email protected]
This project is licensed under the MIT License - see the LICENSE file for details.