{"_id":"@chandan.bhagat/claude-man","name":"@chandan.bhagat/claude-man","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@chandan.bhagat/claude-man","version":"0.1.0","description":"Switch between multiple Claude Code accounts, nvm-style.","author":{"name":"Chandan Bhagat"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/thechandanbhagat/claude-man.git"},"type":"module","bin":{"claude-man":"dist/index.js","clman":"dist/index.js"},"engines":{"node":">=18"},"scripts":{"build":"tsc","dev":"tsc --watch","start":"node dist/index.js","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"dependencies":{"@inquirer/prompts":"^7.2.1","cli-table3":"^0.6.5","commander":"^12.1.0"},"devDependencies":{"@types/node":"^22.10.2","typescript":"^5.7.2","vitest":"^2.1.8"},"gitHead":"d5f1198f38ac13d5171187994a97c195a08f2782","_id":"@chandan.bhagat/claude-man@0.1.0","bugs":{"url":"https://github.com/thechandanbhagat/claude-man/issues"},"homepage":"https://github.com/thechandanbhagat/claude-man#readme","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-v6KA9DG37ASnV/reAhT6abD3abL+tl1LehJdb5idpCyeDH2vay4bUkZfPXfLSxWnejBUQwTFLwNbZ6rom+ks0w==","shasum":"6b7f7559a60bdffcfa44f9c73da3da6ec22f2c7e","tarball":"https://registry.npmjs.org/@chandan.bhagat/claude-man/-/claude-man-0.1.0.tgz","fileCount":39,"unpackedSize":57069,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDt8bTb3wKwVZLL5rnyowFZXBzmhyzcRsIBvPijjSKLSAIhAOTAo5xKBWP1oJ1f8k0+lLJINc03/HNYK7Lldi3/P0aj"}]},"_npmUser":{"name":"chandan.bhagat","email":"chandan.bhagat@outlook.com"},"directories":{},"maintainers":[{"name":"chandan.bhagat","email":"chandan.bhagat@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/claude-man_0.1.0_1780951424620_0.6929421737152763"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-08T20:43:44.405Z","0.1.0":"2026-06-08T20:43:44.757Z","modified":"2026-06-08T20:43:45.017Z"},"maintainers":[{"name":"chandan.bhagat","email":"chandan.bhagat@outlook.com"}],"description":"Switch between multiple Claude Code accounts, nvm-style.","homepage":"https://github.com/thechandanbhagat/claude-man#readme","repository":{"type":"git","url":"git+https://github.com/thechandanbhagat/claude-man.git"},"author":{"name":"Chandan Bhagat"},"bugs":{"url":"https://github.com/thechandanbhagat/claude-man/issues"},"license":"MIT","readme":"# claude-man\r\n\r\n[![CI](https://github.com/thechandanbhagat/claude-man/actions/workflows/ci.yml/badge.svg)](https://github.com/thechandanbhagat/claude-man/actions/workflows/ci.yml)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\r\n[![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg)](https://nodejs.org)\r\n\r\nSwitch between multiple Claude Code accounts, nvm-style.\r\n\r\nA \"profile\" is a snapshot of the two files that identify a logged-in Claude\r\naccount on disk:\r\n\r\n- `~/.claude/.credentials.json` — the OAuth tokens (whole file)\r\n- the `oauthAccount` block inside `~/.claude.json` — email, org, subscription\r\n\r\nEverything else in `~/.claude.json` (project history, MCP config, settings) is\r\nleft untouched.\r\n\r\n> **Platform note:** this targets the token-file auth used on Windows and Linux.\r\n> macOS stores tokens in the Keychain, so the credentials file is empty there and\r\n> the tool will refuse to run with a clear message.\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install\r\nnpm run build\r\nnpm link        # exposes `claude-man` (and `clman`) on your PATH\r\n```\r\n\r\n## Usage\r\n\r\n```bash\r\nclaude-man add work        # snapshot the account you're logged into now\r\n# log out, log into your other account in Claude Code, then:\r\nclaude-man add personal\r\n\r\nclaude-man ls              # list profiles (email · plan · active marker)\r\nclaude-man use work        # switch the active account\r\nclaude-man current         # show active profile + live account\r\nclaude-man rename work job\r\nclaude-man rm personal     # refuses the active profile unless --force\r\n\r\nclaude-man                 # no args → interactive arrow-key menu\r\n```\r\n\r\n## Why switching is safe\r\n\r\nClaude refreshes the access token in the background and rewrites\r\n`.credentials.json`. Every `use` therefore **re-captures the live (possibly\r\nrotated) credentials back into the currently-active profile before** overwriting\r\nthem with the target. No rotated refresh token is ever lost.\r\n\r\nThe first switch also backs up your original login to\r\n`~/.claude-man/backups/`.\r\n\r\n## Layout\r\n\r\n```\r\n~/.claude-man/\r\n  profiles/<name>/credentials.json    copy of ~/.claude/.credentials.json\r\n  profiles/<name>/oauthAccount.json   the oauthAccount block\r\n  state.json                          { activeProfile, profiles{} }\r\n  backups/                            first-run backup of your live files\r\n```\r\n\r\n## Develop\r\n\r\n```bash\r\nnpm test           # vitest\r\nnpm run typecheck\r\n```\r\n\r\n## License\r\n\r\n[MIT](LICENSE) © Chandan Bhagat\r\n","readmeFilename":"README.md","_rev":"1-4fbb66c0ec7321140c3d796177bc8286"}