Show HN: Clenv – Manage multiple Claude Code profiles, each Git-versioned
Summary
The more I used Claude Code, the messier my ~/.claude got.<p>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.<p>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<p>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.<p>That's when I thought: nvm and pyenv let you switch environments by profile. Why not Claude Code? So I built clenv.<p>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).<p><pre><code> 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" </code></pre> Teams can export a baseline and let members layer personal changes on top:<p><pre><code> clenv profile export team-standard -o team.clenvprofile clenv profile import team.clenvprofile --use </code></pre> MCP API keys are automatically redacted during export.<p>Per-directory auto-switching works like .nvmrc:<p><pre><code> clenv rc set work # pin profile to this directory clenv rc show </code></pre> Written in Rust, statically linked, zero runtime deps. macOS and Linux.<p><pre><code> brew tap Imchaemin/clenv && brew install clenv cargo install clenv </code></pre> GitHub: <a href="https://github.com/Imchaemin/clenv" rel="nofollow">https://github.com/Imchaemin/clenv</a><p>Would especially love feedback from people doing AI agent development — that's the use case where environment isolation feels most important.
Tags
Metadata
- Article ID
- #201
- Source
- HackerNews
- Scraped At
- 3/2/2026, 7:10:01 AM
- URL Hash
- 1473beb4e3c40d64…