@remeic/ccm 0.1.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -26
- package/dist/index.js +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,23 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div id="toc">
|
|
2
|
+
<table>
|
|
3
|
+
<tr>
|
|
4
|
+
<td width="170" valign="top">
|
|
5
|
+
<img src="./docs/assets/ccm-logo.png" alt="CCM Logo" width="150" height="150" />
|
|
6
|
+
</td>
|
|
7
|
+
<td valign="middle">
|
|
8
|
+
<h1 align="left">ccm</h1>
|
|
9
|
+
<p><strong>Multi-profile manager for Claude Code</strong></p>
|
|
10
|
+
<p>Switch between Claude Code accounts instantly. Like <code>nvm</code> for Claude Code profiles.</p>
|
|
11
|
+
</td>
|
|
12
|
+
</tr>
|
|
13
|
+
</table>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
[](https://github.com/remeic/ccm/actions/workflows/ci.yml)
|
|
6
17
|
[](https://www.npmjs.com/package/@remeic/ccm)
|
|
18
|
+
[](https://github.com/Remeic/homebrew-tap)
|
|
7
19
|
[](LICENSE)
|
|
8
20
|
[](https://nodejs.org)
|
|
9
|
-
[](https://codecov.io/github/Remeic/ccm)
|
|
10
22
|
[](https://stryker-mutator.io/)
|
|
11
23
|
|
|
12
|
-
|
|
24
|
+
Manage separate Claude Code profiles for personal, work, and client accounts without repeated logout/login cycles. `ccm` keeps each profile isolated so switching is immediate and parallel sessions stay clean.
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<img src="./docs/assets/intro.gif" alt="ccm in action in a terminal view" width="100%" />
|
|
28
|
+
</p>
|
|
13
29
|
|
|
14
30
|
## Table of Contents
|
|
15
31
|
|
|
32
|
+
- [Table of Contents](#table-of-contents)
|
|
16
33
|
- [Why](#why)
|
|
17
34
|
- [Prerequisites](#prerequisites)
|
|
18
35
|
- [Install](#install)
|
|
19
36
|
- [Quick Start](#quick-start)
|
|
20
37
|
- [Commands](#commands)
|
|
38
|
+
- [Passing Flags and Environment Variables](#passing-flags-and-environment-variables)
|
|
39
|
+
- [Multi-Account Login](#multi-account-login)
|
|
40
|
+
- [Different Browser per Profile](#different-browser-per-profile)
|
|
41
|
+
- [URL-Only Mode](#url-only-mode)
|
|
42
|
+
- [API Key Auth](#api-key-auth)
|
|
21
43
|
- [How It Works](#how-it-works)
|
|
22
44
|
- [Architecture Overview](#architecture-overview)
|
|
23
45
|
- [Profile Isolation](#profile-isolation)
|
|
@@ -46,13 +68,20 @@ Claude Code stores authentication in a single config directory. If you use multi
|
|
|
46
68
|
## Install
|
|
47
69
|
|
|
48
70
|
```sh
|
|
49
|
-
npm
|
|
71
|
+
npm install -g @remeic/ccm
|
|
72
|
+
pnpm add -g @remeic/ccm
|
|
73
|
+
yarn global add @remeic/ccm
|
|
74
|
+
bun add -g @remeic/ccm
|
|
75
|
+
brew install remeic/tap/ccm
|
|
50
76
|
```
|
|
51
77
|
|
|
52
|
-
|
|
78
|
+
Homebrew core already ships an unrelated `ccm` formula, so install this one with the fully qualified tap name.
|
|
53
79
|
|
|
54
80
|
```sh
|
|
55
81
|
npx @remeic/ccm <command>
|
|
82
|
+
pnpm dlx @remeic/ccm <command>
|
|
83
|
+
yarn dlx @remeic/ccm <command>
|
|
84
|
+
bunx @remeic/ccm <command>
|
|
56
85
|
```
|
|
57
86
|
|
|
58
87
|
The installed command remains `ccm`.
|
|
@@ -73,15 +102,15 @@ $ ccm use work
|
|
|
73
102
|
|
|
74
103
|
## Commands
|
|
75
104
|
|
|
76
|
-
| Command
|
|
77
|
-
|
|
78
|
-
| `ccm create <name> [-l label] [-b browser]`
|
|
79
|
-
| `ccm list`
|
|
80
|
-
| `ccm use <name> [-- args]`
|
|
81
|
-
| `ccm login <name> [--console] [-b browser] [--url-only]` | Authenticate a profile
|
|
82
|
-
| `ccm status [name]`
|
|
83
|
-
| `ccm remove <name> [-f]`
|
|
84
|
-
| `ccm run <name> -p <prompt>`
|
|
105
|
+
| Command | Description |
|
|
106
|
+
| -------------------------------------------------------- | ------------------------------------------------------------- |
|
|
107
|
+
| `ccm create <name> [-l label] [-b browser]` | Create a profile. `-b` sets the browser for OAuth |
|
|
108
|
+
| `ccm list` | List all profiles with auth status, including drifted entries |
|
|
109
|
+
| `ccm use <name> [-- args]` | Launch Claude Code. Args after `--` are passed to Claude |
|
|
110
|
+
| `ccm login <name> [--console] [-b browser] [--url-only]` | Authenticate a profile |
|
|
111
|
+
| `ccm status [name]` | Show auth status and storage state for one or all profiles |
|
|
112
|
+
| `ccm remove <name> [-f]` | Remove a profile. `-f` skips confirmation |
|
|
113
|
+
| `ccm run <name> -p <prompt>` | Run a prompt non-interactively |
|
|
85
114
|
|
|
86
115
|
## Passing Flags and Environment Variables
|
|
87
116
|
|
|
@@ -331,8 +360,8 @@ ccm locates the Claude binary using the following strategy:
|
|
|
331
360
|
|
|
332
361
|
## Configuration
|
|
333
362
|
|
|
334
|
-
| Variable
|
|
335
|
-
|
|
363
|
+
| Variable | Description |
|
|
364
|
+
| ------------ | ------------------------------------------------------------------------------------------------ |
|
|
336
365
|
| `CLAUDE_BIN` | Override the path to the Claude binary. Useful if Claude is installed in a non-standard location |
|
|
337
366
|
|
|
338
367
|
All ccm data is stored in `~/.ccm/`. This includes the config file and all profile directories.
|
|
@@ -351,12 +380,12 @@ You can verify this yourself: the runtime dependencies are [Commander.js](https:
|
|
|
351
380
|
|
|
352
381
|
## Comparison
|
|
353
382
|
|
|
354
|
-
|
|
|
355
|
-
|
|
356
|
-
| Switch accounts
|
|
357
|
-
| Multiple sessions
|
|
358
|
-
| Config mixing risk | High — single config directory
|
|
359
|
-
| Setup per account
|
|
383
|
+
| | Without ccm | With ccm |
|
|
384
|
+
| ------------------ | --------------------------------------------- | ------------------------------- |
|
|
385
|
+
| Switch accounts | `claude auth logout` then `claude auth login` | `ccm use work` |
|
|
386
|
+
| Multiple sessions | Not possible simultaneously | Each profile runs independently |
|
|
387
|
+
| Config mixing risk | High — single config directory | None — full isolation |
|
|
388
|
+
| Setup per account | Manual every time | One-time `create` + `login` |
|
|
360
389
|
|
|
361
390
|
## FAQ
|
|
362
391
|
|
|
@@ -378,6 +407,23 @@ ccm uses cross-platform binary discovery (`which`/`where`) and standard Node.js
|
|
|
378
407
|
|
|
379
408
|
## Contributing
|
|
380
409
|
|
|
410
|
+
### Homebrew Releases
|
|
411
|
+
|
|
412
|
+
Homebrew publication is handled through a dedicated tap, not `homebrew/core`. After `npm publish`, the release workflow updates `Formula/ccm.rb` in the tap repository.
|
|
413
|
+
|
|
414
|
+
To keep the release PR and changelog accurate, prefer **Squash and merge** with a Conventional Commit PR title like `feat: add profile import command`. `release-please` uses the merged commit on `main`, so `docs:` and `refactor:` changes are typically omitted from Node release notes while `feat:` and `fix:` become releasable entries.
|
|
415
|
+
|
|
416
|
+
Required repository configuration:
|
|
417
|
+
|
|
418
|
+
- `HOMEBREW_TAP_GITHUB_TOKEN`: GitHub token with write access to the tap repo
|
|
419
|
+
- `HOMEBREW_TAP_REPOSITORY`: optional repository override, defaults to `remeic/homebrew-tap`
|
|
420
|
+
|
|
421
|
+
Generate the formula locally:
|
|
422
|
+
|
|
423
|
+
```sh
|
|
424
|
+
bun run homebrew:formula -- --sha256 <npm-tarball-sha256> --output /tmp/ccm.rb
|
|
425
|
+
```
|
|
426
|
+
|
|
381
427
|
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
382
428
|
|
|
383
429
|
## License
|
package/dist/index.js
CHANGED
|
@@ -591,7 +591,7 @@ function registerUse(program2) {
|
|
|
591
591
|
}
|
|
592
592
|
|
|
593
593
|
// src/index.ts
|
|
594
|
-
var program = new Command().name("ccm").version("0.
|
|
594
|
+
var program = new Command().name("ccm").version("0.2.2").description("Manage multiple Claude Code profiles");
|
|
595
595
|
registerCreate(program);
|
|
596
596
|
registerList(program);
|
|
597
597
|
registerRemove(program);
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remeic/ccm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "nvm-like manager for Claude Code profiles",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Giulio Fagioli",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/
|
|
9
|
+
"url": "git+https://github.com/Remeic/ccm.git"
|
|
10
10
|
},
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/Remeic/ccm/issues"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://github.com/
|
|
14
|
+
"homepage": "https://github.com/Remeic/ccm#readme",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"claude",
|
|
17
17
|
"claude-code",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "tsup",
|
|
32
32
|
"dev": "tsup --watch",
|
|
33
|
+
"homebrew:formula": "node scripts/homebrew/generate-formula.mjs",
|
|
33
34
|
"test": "vitest run",
|
|
34
35
|
"test:watch": "vitest",
|
|
35
36
|
"test:coverage": "vitest run --coverage",
|