cchost 0.3.1 → 0.4.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/CHANGELOG.md +113 -0
- package/README.md +80 -70
- package/lib/banner.js +22 -0
- package/lib/cli.js +341 -151
- package/lib/copy.js +242 -0
- package/lib/doctor.js +154 -22
- package/lib/env.js +20 -0
- package/lib/profiles.js +10 -0
- package/lib/share.js +343 -57
- package/package.json +2 -2
- package/lib/migrate.js +0 -145
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,119 @@ All notable changes to `cchost` are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.4.1] - 2026-06-04
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Shared resources expanded from 4 to 7.** Profiles now also auto-link
|
|
13
|
+
`mcp.json`, `settings.json`, and `CLAUDE.md` into `~/.claude/`, in addition
|
|
14
|
+
to the four directories (`projects/`, `skills/`, `agents/`, `commands/`).
|
|
15
|
+
MCP servers, user settings, and user-level memory are now visible to every
|
|
16
|
+
profile by default — the trust boundary becomes clean: only the three
|
|
17
|
+
credential files (`.credentials.json`, `.claude.json`, `.cc-env.json`) stay
|
|
18
|
+
per-profile.
|
|
19
|
+
- **`cc copy` replaces `cc migrate`.** Same direction (`default → <profile>`),
|
|
20
|
+
same `--force` flag — the verb just matches what the command actually does.
|
|
21
|
+
`cc migrate` still works as a deprecation alias and forwards to `cc copy`
|
|
22
|
+
with a one-line warning; it will be removed in a future version.
|
|
23
|
+
- **`cc link` / `cc unlink` accept `--config`** to target the three single
|
|
24
|
+
files. The three groups now: `--projects`, `--tools`, `--config`. No flag
|
|
25
|
+
still means all 7.
|
|
26
|
+
- **`cc unlink` is non-destructive.** Materializes the current pool content
|
|
27
|
+
into a private directory or file as part of breaking the link, so the
|
|
28
|
+
profile's view of that resource is preserved. Same-name collisions in the
|
|
29
|
+
profile (if any) are kept untouched.
|
|
30
|
+
- **`cc link` refuses to overwrite private content.** If a profile's resource
|
|
31
|
+
already has non-empty private content, `cc link` reports it as `refused`
|
|
32
|
+
and leaves it alone (other resources still link). Move or remove the
|
|
33
|
+
content manually, then re-run.
|
|
34
|
+
- **`cc remove` requires `--force` when private (unlinked) content exists.**
|
|
35
|
+
Symlinked resources are still removed silently (the shared pool is
|
|
36
|
+
untouched); private content prompts the user to acknowledge that its
|
|
37
|
+
content is unique and will be lost.
|
|
38
|
+
- **`cc list` uses a single `--reveal` flag.** Drops `--reveal-email`;
|
|
39
|
+
`--reveal` now shows both the API token (where applicable) and the full
|
|
40
|
+
email. Email mask format also changed for stronger redaction:
|
|
41
|
+
`allen@cyber.co.in` → `a*************.in` (first char + TLD only; the
|
|
42
|
+
domain is no longer visible).
|
|
43
|
+
- **`cc list` "Shared" column is `N/7`.**
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
|
|
47
|
+
- `cc doctor` now backfills missing resource symlinks on existing profiles
|
|
48
|
+
(e.g. v0.4.0 profiles that pre-date `mcp.json` / `settings.json` /
|
|
49
|
+
`CLAUDE.md` sharing). Safe auto-fix when the resource is missing or empty;
|
|
50
|
+
warning-only with manual guidance when private content exists.
|
|
51
|
+
- Windows file symlink fallback: when `fs.symlinkSync(..., 'file')` fails
|
|
52
|
+
with EPERM/UNKNOWN (Developer Mode not enabled), `cc link` falls back to a
|
|
53
|
+
hard link so editing-in-place still propagates between profiles. The
|
|
54
|
+
fallback is noted in the link command output.
|
|
55
|
+
|
|
56
|
+
### Help
|
|
57
|
+
|
|
58
|
+
- Per-command help (`cc help <cmd>`) now spells out the 7 resources, the
|
|
59
|
+
three flag groups, and what stays per-profile.
|
|
60
|
+
|
|
61
|
+
## [0.4.0] - 2026-06-04
|
|
62
|
+
|
|
63
|
+
### Changed (breaking)
|
|
64
|
+
|
|
65
|
+
- **`~/.claude/` is now the shared pool.** Every profile's `projects/`,
|
|
66
|
+
`skills/`, `agents/`, `commands/` symlink directly into Claude Code's own
|
|
67
|
+
default config dir. There is no longer a parallel `~/.claude-shared/` pool:
|
|
68
|
+
the two locations are unified. A profile is now a credential set + a
|
|
69
|
+
symlinked view onto the shared pool.
|
|
70
|
+
- **`cc add` auto-links all four artifact dirs.** New profiles ship with the
|
|
71
|
+
symlinks in place, so a skill, agent, or command installed under any profile
|
|
72
|
+
is immediately visible to every other profile. Bare `claude` (without
|
|
73
|
+
`cc use`) sees the same set too — there is no profile-vs-bare split.
|
|
74
|
+
- **`cc link <profile>` and `cc unlink <profile>` accept `--tools` and
|
|
75
|
+
`--projects` flags** to target a subset:
|
|
76
|
+
- `--tools` → `skills/`, `agents/`, `commands/`
|
|
77
|
+
- `--projects` → `projects/`
|
|
78
|
+
- No flag → all four (current default behavior)
|
|
79
|
+
- **`cc list` "Shared" column expects `4/4`** as the steady state for v0.4
|
|
80
|
+
profiles. `0/4`, `3/4`, etc. show profiles whose tool or project sharing has
|
|
81
|
+
been turned off via `cc unlink --tools` / `--projects`.
|
|
82
|
+
|
|
83
|
+
### Removed
|
|
84
|
+
|
|
85
|
+
- **`cc migrate default shared` and `cc migrate shared <profile>`.** The shared
|
|
86
|
+
pool was the destination of the first and the source of the second; with the
|
|
87
|
+
pool unified into `~/.claude/`, both directions are no-ops. Use
|
|
88
|
+
`cc link <profile>` / `cc unlink <profile>` to control sharing.
|
|
89
|
+
|
|
90
|
+
### Migration from 0.3.x
|
|
91
|
+
|
|
92
|
+
The v0.3 pool at `~/.claude-shared/` is folded into `~/.claude/` automatically
|
|
93
|
+
on the next `cc add` or `cc doctor --fix`. The migration:
|
|
94
|
+
|
|
95
|
+
- Moves every entry in `~/.claude-shared/{projects,skills,agents,commands}/`
|
|
96
|
+
into the matching `~/.claude/<sub>/`, renaming on collision (existing
|
|
97
|
+
`~/.claude/` content is never overwritten — duplicates get an `__legacy`
|
|
98
|
+
suffix).
|
|
99
|
+
- Re-points any existing profile symlink that targets `~/.claude-shared/<sub>/`
|
|
100
|
+
to `~/.claude/<sub>/`.
|
|
101
|
+
- Removes `~/.claude-shared/` once empty.
|
|
102
|
+
|
|
103
|
+
Idempotent and non-destructive — re-running is a no-op once the legacy dir is
|
|
104
|
+
gone. `cc doctor` surfaces an explicit warning while the legacy dir still
|
|
105
|
+
exists, with a `--fix` action that runs the migration.
|
|
106
|
+
|
|
107
|
+
## [0.3.2] - 2026-06-04
|
|
108
|
+
|
|
109
|
+
### Changed
|
|
110
|
+
|
|
111
|
+
- **`cc list` masks account emails by default.** Emails are shown as
|
|
112
|
+
`i***@example.com` in both the table view and the per-profile detail view,
|
|
113
|
+
including the `--json` output. Pass `--reveal-email` to print them in full.
|
|
114
|
+
The list is now safe to paste in screenshots or issue reports.
|
|
115
|
+
- `--reveal-email` is rejected together with `--json` — same precedent as
|
|
116
|
+
`--reveal`. Scripts that need the real address can read `.claude.json`
|
|
117
|
+
directly.
|
|
118
|
+
- Token masking is unchanged: `--reveal` still works on `cc list <profile>`
|
|
119
|
+
and `--reveal-email` does not affect it.
|
|
120
|
+
|
|
8
121
|
## [0.3.1] - 2026-05-19
|
|
9
122
|
|
|
10
123
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
# cchost
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/cchost)
|
|
4
|
+
[](https://github.com/allenhack638/cchost/actions/workflows/ci.yml)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
[](https://nodejs.org)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
<!-- Demo: record a ~15s clip of `cc add` → `cc use` → `cc list`, save it as
|
|
9
|
+
docs/demo.gif, and uncomment the line below. -->
|
|
10
|
+
<!--  -->
|
|
11
|
+
|
|
12
|
+
Claude Code keeps one account's login, history, and settings in a single config directory. To use a second account you normally have to log out and back in, which loses your place. cchost gives each account its own directory so you can keep several side by side and pick one when you launch.
|
|
13
|
+
|
|
14
|
+
Each profile is a complete, isolated `CLAUDE_CONFIG_DIR`: credentials, session history, project state, plugins, and settings. Create one with `cc add <name>`, launch under it with `cc use <name>`. Nothing is shared between profiles unless you ask for it.
|
|
15
|
+
|
|
16
|
+
`cc` is a plain Node CLI on your PATH, so it works the same from PowerShell, cmd, bash, zsh, or fish. No shell scripts, no rc-file edits. Tested on Windows, Linux, and macOS in CI.
|
|
6
17
|
|
|
7
18
|
## Install
|
|
8
19
|
|
|
@@ -16,14 +27,14 @@ Requires Node.js 18+ and Claude Code 2.1.140+ already installed. Get Claude Code
|
|
|
16
27
|
|
|
17
28
|
| Command | What it does |
|
|
18
29
|
| --- | --- |
|
|
19
|
-
| `cc add <profile>` | Create a subscription profile (logs in with Anthropic OAuth on first use). |
|
|
30
|
+
| `cc add <profile>` | Create a subscription profile (logs in with Anthropic OAuth on first use). Auto-symlinks artifact dirs into `~/.claude/`. |
|
|
20
31
|
| `cc add <profile> --custom [...]` | Create — or, if it already exists, edit — a profile routed through a custom API endpoint. Opens a wizard, or takes `--base-url=URL --token=TOKEN [--model=…]`. See [Custom endpoints](#custom-endpoints-kimi-openrouter-etc). |
|
|
21
32
|
| `cc use <profile> [...args]` | Launch Claude under that profile. Profile must already exist. Args after the name are forwarded verbatim to `claude`. |
|
|
22
|
-
| `cc list [<profile>] [--json] [--reveal]` | List every profile (login state, email, shared
|
|
23
|
-
| `cc
|
|
24
|
-
| `cc link <profile> [<profile>...]` |
|
|
25
|
-
| `cc unlink <profile
|
|
26
|
-
| `cc remove <profile
|
|
33
|
+
| `cc list [<profile>] [--json] [--reveal]` | List every profile (login state, email, shared count N/7, endpoint), or show one profile in detail. Emails and tokens are masked by default; `--reveal` shows both in full. |
|
|
34
|
+
| `cc copy default <profile> [--force]` | Copy `~/.claude/` resources into a profile. Meaningful only when one or more resources have been unlinked via `cc unlink`; otherwise every resource resolves to the same on-disk path and is skipped. Skip-on-collision by default; `--force` overwrites. `cc migrate` is a deprecated alias. |
|
|
35
|
+
| `cc link <profile> [<profile>...] [--projects\|--tools\|--config]` | (Re-)link a profile's resources to `~/.claude/`. No flag = all 7. Refuses to overwrite private content. |
|
|
36
|
+
| `cc unlink <profile> [--projects\|--tools\|--config]` | Break the links and copy current `~/.claude/` content into the profile as private resources. Non-destructive. |
|
|
37
|
+
| `cc remove <profile> [--force]` | Delete a profile. Requires typing the profile name to confirm. `--force` is required when private (unlinked) resources exist. |
|
|
27
38
|
| `cc doctor [--fix [--force]] [--json]` | Diagnose environment, storage, and platform issues. |
|
|
28
39
|
| `cc help [command]` | Print usage (top-level, or for a single command). |
|
|
29
40
|
|
|
@@ -41,88 +52,87 @@ cc remove old-profile
|
|
|
41
52
|
`cc list` output:
|
|
42
53
|
|
|
43
54
|
```
|
|
44
|
-
Profile LoggedIn Email
|
|
45
|
-
kimi false -
|
|
46
|
-
personal true
|
|
47
|
-
scratch false -
|
|
48
|
-
work true
|
|
55
|
+
Profile LoggedIn Email Shared Endpoint
|
|
56
|
+
kimi false - 7/7 api.moonshot.ai
|
|
57
|
+
personal true p************.com 7/7 subscription
|
|
58
|
+
scratch false - 7/7 subscription
|
|
59
|
+
work true w************.com 7/7 subscription
|
|
49
60
|
```
|
|
50
61
|
|
|
51
|
-
|
|
52
|
-
(`projects`, `skills`, `agents`, `commands`) are linked to `~/.claude-shared/`.
|
|
62
|
+
`7/7` is the steady state since v0.4.1 — every profile auto-shares 4 dirs (`projects`, `skills`, `agents`, `commands`) **and** 3 files (`mcp.json`, `settings.json`, `CLAUDE.md`) with `~/.claude/`. A lower number means one or more resources were unlinked via `cc unlink <profile> --projects|--tools|--config`.
|
|
53
63
|
|
|
54
|
-
|
|
55
|
-
- `4/4` — fully shared; all four point at the common pool.
|
|
56
|
-
- `1/4`, `2/4`, `3/4` — **partial**, and not a normal state. `cc link` links
|
|
57
|
-
all four at once and `cc unlink` unlinks all four at once, so you should
|
|
58
|
-
normally see only `0/4` or `4/4`.
|
|
64
|
+
Emails are masked by default so the list is safe to paste in screenshots and issue reports. Pass `--reveal` to show them in full (same flag also reveals the API token on custom-endpoint profiles).
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
The **Shared** column is a count: how many of the 7 shareable resources symlink into `~/.claude/`.
|
|
61
67
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
- `7/7` — the default since v0.4.1. All four artifact dirs *and* the three
|
|
69
|
+
config files point at the shared pool; a tool, server, or hook configured
|
|
70
|
+
under any profile is immediately visible to every other profile.
|
|
71
|
+
- `6/7`, `5/7`, … — one or more resources were `cc unlink`ed and now hold
|
|
72
|
+
private content.
|
|
73
|
+
- `0/7` — fully isolated; the profile keeps its own copy of everything.
|
|
74
|
+
- `4/7` — typical of a profile created on v0.4.0 before the file resources
|
|
75
|
+
were added. Run `cc doctor --fix` to backfill them.
|
|
69
76
|
|
|
70
|
-
|
|
71
|
-
directories are skipped and the missing ones are linked, bringing the profile
|
|
72
|
-
to `4/4`.
|
|
77
|
+
### What's shared, what's per-profile
|
|
73
78
|
|
|
74
|
-
|
|
79
|
+
Since v0.4.1, **`~/.claude/` is the shared pool**, and **all 7 resources** auto-link into it on `cc add`. The trust boundary is simple: anything that authenticates this profile's identity stays per-profile; everything else is global.
|
|
75
80
|
|
|
76
|
-
|
|
|
77
|
-
| --- |
|
|
78
|
-
| `projects/` |
|
|
79
|
-
| `skills/` |
|
|
80
|
-
| `agents/` |
|
|
81
|
-
| `commands/` |
|
|
82
|
-
| `mcp.json` | ✓ (
|
|
83
|
-
| `settings.json` | ✓ (
|
|
84
|
-
| `CLAUDE.md` | ✓ (
|
|
85
|
-
| `sessions/` |
|
|
86
|
-
| `plugins/` |
|
|
87
|
-
| `.credentials.json` |
|
|
88
|
-
| `.claude.json` |
|
|
89
|
-
| `.cc-env.json` |
|
|
81
|
+
| Resource | Location | Shared? | Flag group |
|
|
82
|
+
| --- | --- | :---: | --- |
|
|
83
|
+
| `projects/` | `~/.claude/projects/` | ✓ (symlink) | `--projects` |
|
|
84
|
+
| `skills/` | `~/.claude/skills/` | ✓ (symlink) | `--tools` |
|
|
85
|
+
| `agents/` | `~/.claude/agents/` | ✓ (symlink) | `--tools` |
|
|
86
|
+
| `commands/` | `~/.claude/commands/` | ✓ (symlink) | `--tools` |
|
|
87
|
+
| `mcp.json` | `~/.claude/mcp.json` | ✓ (file symlink / hard link) | `--config` |
|
|
88
|
+
| `settings.json` | `~/.claude/settings.json` | ✓ (file symlink / hard link) | `--config` |
|
|
89
|
+
| `CLAUDE.md` | `~/.claude/CLAUDE.md` | ✓ (file symlink / hard link) | `--config` |
|
|
90
|
+
| `sessions/` | per-profile | — | (never shared) |
|
|
91
|
+
| `plugins/` | per-profile | — | (never shared) |
|
|
92
|
+
| `.credentials.json` | per-profile | — | Anthropic OAuth token. Never touched. |
|
|
93
|
+
| `.claude.json` | per-profile | — | Account identity (re-synced on every launch). |
|
|
94
|
+
| `.cc-env.json` | per-profile | — | Custom-endpoint API key. Never copied, never linked. |
|
|
90
95
|
|
|
91
|
-
`mcp.json
|
|
96
|
+
`mcp.json` carries MCP server tokens and `settings.json` carries hooks that can run arbitrary commands. Sharing them means every profile sees the same set — if you need per-profile separation for one of them, `cc unlink <profile> --config` breaks the link and makes that profile's copies private.
|
|
92
97
|
|
|
93
|
-
###
|
|
98
|
+
### Seeding a private profile from `~/.claude/`
|
|
94
99
|
|
|
95
|
-
If
|
|
100
|
+
If a profile has unlinked resources (`cc unlink <p>`) and you want to seed them from the current `~/.claude/`:
|
|
96
101
|
|
|
97
102
|
```bash
|
|
98
|
-
cc
|
|
99
|
-
cc
|
|
100
|
-
cc migrate shared personal # copy ~/.claude-shared/* → ~/.claude-profiles/personal/
|
|
101
|
-
cc migrate default work --force # same as first, overwriting anything that already exists
|
|
103
|
+
cc copy default work # copies anything unlinked from ~/.claude/ → work
|
|
104
|
+
cc copy default work --force # same, overwriting if already present
|
|
102
105
|
```
|
|
103
106
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Credential files (`.credentials.json`, `.claude.json`) are never copied: each profile keeps its own auth state.
|
|
107
|
+
For a fresh `cc add` profile this is a no-op — every resource already resolves to `~/.claude/` via its symlink, so there's nothing to copy. `cc copy` becomes meaningful only after `cc unlink`. (`cc migrate` is a deprecated alias for `cc copy` and still works.)
|
|
107
108
|
|
|
108
|
-
###
|
|
109
|
-
|
|
110
|
-
If you want each profile to keep separate credentials but share project history and skills (e.g. rotate accounts on the same project when usage limits hit):
|
|
109
|
+
### Opting out of sharing for a profile
|
|
111
110
|
|
|
112
111
|
```bash
|
|
113
|
-
cc
|
|
114
|
-
cc
|
|
112
|
+
cc unlink work --tools # private skills/agents/commands for "work" only
|
|
113
|
+
cc unlink work --projects # private projects/ for "work" only
|
|
114
|
+
cc unlink work --config # private mcp.json/settings.json/CLAUDE.md
|
|
115
|
+
cc unlink work # private everything (all 7 unlinked)
|
|
116
|
+
cc link work --tools # re-share just the tools
|
|
117
|
+
cc link work --config # re-share just the config files
|
|
115
118
|
```
|
|
116
119
|
|
|
117
|
-
`
|
|
120
|
+
`cc unlink` is non-destructive — current pool content is copied into the profile as a private dir or file before the link is broken, so your view of the resource is preserved. `cc link` refuses to overwrite existing private content; move or remove it manually and re-run.
|
|
121
|
+
|
|
122
|
+
Credential files (`.credentials.json`, `.claude.json`, `.cc-env.json`) are never touched: each profile keeps its own auth state.
|
|
123
|
+
|
|
124
|
+
### How sharing works under the hood
|
|
125
|
+
|
|
126
|
+
Every profile created by `cc add` ships with 7 links pointing at `~/.claude/<resource>`:
|
|
118
127
|
|
|
119
|
-
|
|
128
|
+
- Directories use Windows junctions (no admin / Developer Mode required) or POSIX symlinks.
|
|
129
|
+
- Files (`mcp.json`, `settings.json`, `CLAUDE.md`) use file symlinks where possible. On Windows without Developer Mode, file symlinks require elevation — `cc link` falls back to a **hard link** there, which works without admin and behaves identically for edit-in-place flows.
|
|
120
130
|
|
|
121
|
-
`
|
|
131
|
+
`sessions/` and `plugins/` are **never** linked. `sessions/` holds transient per-process registry state (PID, status, timestamps) and sharing it would corrupt Claude's running-process bookkeeping. `plugins/` carries auth tokens.
|
|
122
132
|
|
|
123
|
-
If two profiles
|
|
133
|
+
If two profiles open the same project at the same time, both will write to the same conversation files in `~/.claude/projects/<cwd>/` (last write wins). Either avoid that or run `cc unlink <profile> --projects` on one of them.
|
|
124
134
|
|
|
125
|
-
`cc remove` is safe with shared profiles — it deletes only the
|
|
135
|
+
`cc remove` is safe with fully-shared profiles — it deletes only the symlinks, leaving `~/.claude/` untouched. If a profile has *private* (unlinked) resources, `cc remove` requires `--force` because that content is unique to the profile and will be lost.
|
|
126
136
|
|
|
127
137
|
## Custom endpoints (Kimi, OpenRouter, etc.)
|
|
128
138
|
|
|
@@ -161,7 +171,7 @@ Profile: kimi
|
|
|
161
171
|
Directory: /home/you/.claude-profiles/kimi
|
|
162
172
|
LoggedIn: false
|
|
163
173
|
Email: -
|
|
164
|
-
Shared:
|
|
174
|
+
Shared: 7/7
|
|
165
175
|
Endpoint: api.moonshot.ai
|
|
166
176
|
Base URL: https://api.moonshot.ai/anthropic
|
|
167
177
|
Token: sk-you...key9 (32 chars)
|
|
@@ -172,7 +182,7 @@ Endpoint: api.moonshot.ai
|
|
|
172
182
|
Subagent: kimi-k2.5
|
|
173
183
|
```
|
|
174
184
|
|
|
175
|
-
`cc list <profile> --reveal` prints the full API key
|
|
185
|
+
`cc list <profile> --reveal` prints the full API key and the full email — do not paste that output anywhere.
|
|
176
186
|
|
|
177
187
|
There is no way to convert a custom-endpoint profile back to a subscription profile. To stop using an endpoint, `cc remove` the profile and recreate it.
|
|
178
188
|
|
|
@@ -197,9 +207,9 @@ The env var is set on the child process only — that's all `claude` needs.
|
|
|
197
207
|
|
|
198
208
|
## Sensitive data
|
|
199
209
|
|
|
200
|
-
`~/.claude-profiles/<profile>/` holds real OAuth credentials. Treat it like SSH keys: don't commit it, don't share it, don't sync it to public cloud storage. The `.gitignore` shipped with this project excludes profile directories from anywhere they might land. `cc
|
|
210
|
+
`~/.claude-profiles/<profile>/` holds real OAuth credentials. Treat it like SSH keys: don't commit it, don't share it, don't sync it to public cloud storage. The `.gitignore` shipped with this project excludes profile directories from anywhere they might land. `cc copy` and `cc link` never touch `.credentials.json` or `.claude.json`.
|
|
201
211
|
|
|
202
|
-
`.cc-env.json` (custom-endpoint config) contains a third-party **API key** — treat it exactly like `.credentials.json`. It is written with user-only file permissions, and `cc
|
|
212
|
+
`.cc-env.json` (custom-endpoint config) contains a third-party **API key** — treat it exactly like `.credentials.json`. It is written with user-only file permissions, and `cc copy`/`cc link` never copy or link it across profiles. `cc list <profile>` masks the token; only `cc list <profile> --reveal` prints it in full.
|
|
203
213
|
|
|
204
214
|
## Troubleshooting
|
|
205
215
|
|
package/lib/banner.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const BANNER =
|
|
4
|
+
'\n' +
|
|
5
|
+
' ██████╗ ██████╗██╗ ██╗ ██████╗ ███████╗████████╗\n' +
|
|
6
|
+
' ██╔════╝██╔════╝██║ ██║██╔═══██╗██╔════╝╚══██╔══╝\n' +
|
|
7
|
+
' ██║ ██║ ███████║██║ ██║███████╗ ██║ \n' +
|
|
8
|
+
' ██║ ██║ ██╔══██║██║ ██║╚════██║ ██║ \n' +
|
|
9
|
+
' ╚██████╗╚██████╗██║ ██║╚██████╔╝███████║ ██║ \n' +
|
|
10
|
+
' ╚═════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ \n';
|
|
11
|
+
|
|
12
|
+
function renderBanner() {
|
|
13
|
+
let version = '';
|
|
14
|
+
try {
|
|
15
|
+
version = require('../package.json').version;
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
const tagline = 'Multi-profile launcher for Claude Code';
|
|
19
|
+
return BANNER + ' ' + '\n\n';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
module.exports = { renderBanner, BANNER };
|