claudectx CLI
A Go CLI that switches Claude Code profiles with one command, swapping settings, CLAUDE.md and MCP servers together with a backup.
- 144 ★ on the repository
- Last commit
Extended access
Why this level
- The tool overwrites `settings.json` and `CLAUDE.md` and can carry keys and environment variables into a profile.
Install
- Works in
Manual install
brew install foxj77/tap/claudectxThe first README option for macOS and Linux that also installs completions. Windows and manual install are in the Installation section.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The tool overwrites `settings.json` and `CLAUDE.md` and can carry keys and environment variables into a profile.
This is third-party code. Review the repository files before installing.
What it does
claudectx keeps several Claude Code configurations as profiles. `claudectx work` switches the active `settings.json`, `CLAUDE.md` and MCP server list in a second. A backup is taken before the switch and the profile rolls back on failure. `claudectx -` returns to the previous profile, and with no arguments an arrow-key list opens. Separately, `claudectx run work` launches Claude Code with a profile for the current terminal only and leaves global settings untouched, so work and personal sessions can sit side by side. Profiles export to JSON with `export` and `import` for sharing in a team. Different API providers fit too: Anthropic, Bedrock, OpenRouter and custom endpoints.
Who it is for. Freelancers and consultants who keep work, personal and client sets of Claude Code settings.
Good fit when
- Mornings run on a corporate key and evenings on a personal project, and editing `settings.json` by hand is tiresome.
- A client has their own `CLAUDE.md` instructions and MCP server set.
- You want to compare models from different providers without breaking the main configuration.
- A team needs one vetted profile to hand out as a JSON file.
Not a fit when
- You need separate account logins; authentication is not profile-scoped.
- A profile must narrow permissions; `allow` and `deny` lists merge with global ones during `run`.
- The agent is not Claude Code; the tool knows only its files.
Example request
Create a `client-acme` profile from current settings, then launch Claude Code with it in this terminal through `claudectx run`.Limitations
Login is not profile-scoped: `claudectx run` uses whichever Claude Code login is active. In `run` mode, scalar profile settings (model, variables, permission mode) override global ones, but `allow` and `deny` lists merge, so a profile cannot narrow permissions already granted. The profile `CLAUDE.md` is appended to the system prompt while the global `~/.claude/CLAUDE.md` stays active. Global MCP servers from `~/.claude.json` are disabled in such a session.
How to disable. Remove the tool with `brew uninstall claudectx` or delete the binary from `PATH`. The current `settings.json` and `CLAUDE.md` stay active; delete profiles and backups by hand.
FAQ
How does `switch` differ from `run`?
`claudectx work` changes global Claude Code files for every terminal. `claudectx run work` applies a profile to one launch only and leaves global state untouched.
How do I pass Claude flags?
Put them after `--`: `claudectx run work -- --model opus`. `claudectx run work --dry-run` prints the command without launching.
Can I share a profile?
Yes. `claudectx export work work-profile.json` exports it and `claudectx import work-profile.json client-new` loads it under another name. Check for keys before sending the file.
Is there a profile check?
`claudectx health` validates current profile settings and reports problems.
What does a profile contain?
The `settings.json` settings, `CLAUDE.md` instructions and MCP servers. A profile is created from current settings with `claudectx -n work`.
Discussion
No questions or reviews yet.
Related
CLI toolsCCS
CCS - Claude Codex Switch
A CLI that switches Claude Code between accounts, providers and local models without editing configs
A CLI that deploys managed Claude Code instructions to a project, previews file changes and can undo the installation.
Workflows for Claude Code: /do, /omo, /bmad-pilot and more commands, with Codex, Gemini or OpenCode writing the code through codeagent-wrapper
A desktop app to switch providers and manage MCP servers, prompts and skills for Claude Code, Codex, Gemini CLI and other agents
An environment for Claude Code that keeps context across sessions via hooks, ledgers and handoffs, orchestrates agents and saves tokens
Bridle keeps configuration profiles for Claude Code, OpenCode, Goose, Amp and Copilot CLI and installs skills and MCP from GitHub.
README in short
Homebrew installs shell completions. Binaries for macOS, Linux and Windows are published on the Releases page.