I started out thinking one global config was fine — just put the skills and MCP servers everyone needs at the user level and call it done. But over time I was wearing two hats: a frontend developer at my day job, and a fullstack developer on side projects. The configs started bleeding into each other.
The specific frustrations that pushed me over the edge: - Project-level settings had to be redone for every new repo - Marketplace and plugin-based configs needed manual toggling depending on which context I was in - Trying an experimental setup, then cleaning it up afterward, was tedious every time
Beyond config mess, the bigger realization was about personas. As I started doing more AI agent development, my developer identity kept splitting. More roles, more personas — and a single global Claude Code environment can't cleanly represent all of them.
That's when I thought: nvm and pyenv let you switch environments by profile. Why not Claude Code? So I built clenv.
clenv manages multiple Claude Code profiles. Each profile is an isolated ~/.claude directory (CLAUDE.md, MCP servers, hooks, agents, skills) backed by its own git repository. Free and open source (MIT).
clenv init # backs up ~/.claude, creates default profile
clenv profile create work --use # create + switch instantly
clenv profile create agent-prod --from agent-dev # clone from existing
clenv commit -m "add GitHub MCP server"
clenv diff HEAD~1..HEAD
clenv log --oneline
clenv revert abc123f
clenv tag v1.0 -m "production agent config"
Teams can export a baseline and let members layer personal changes on top: clenv profile export team-standard -o team.clenvprofile
clenv profile import team.clenvprofile --use
MCP API keys are automatically redacted during export.Per-directory auto-switching works like .nvmrc:
clenv rc set work # pin profile to this directory
clenv rc show
Written in Rust, statically linked, zero runtime deps. macOS and Linux. brew tap Imchaemin/clenv && brew install clenv
cargo install clenv
GitHub: https://github.com/Imchaemin/clenvWould especially love feedback from people doing AI agent development — that's the use case where environment isolation feels most important.