@easytocloud/claude-personae 0.1.0
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 +76 -0
- package/dist/cli.js +1515 -0
- package/dist/cli.js.map +7 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# claude-personae (`ccp`)
|
|
2
|
+
|
|
3
|
+
A small CLI to switch [Claude Code](https://claude.com/claude-code) provider presets
|
|
4
|
+
from the shell — the headless companion to the
|
|
5
|
+
**[Claude Code Personae](https://marketplace.visualstudio.com/items?itemName=easytocloud.bedrock-claude-code)**
|
|
6
|
+
VS Code extension.
|
|
7
|
+
|
|
8
|
+
It operates on the **same profile store** the extension uses
|
|
9
|
+
(`~/.claude/coder-profiles.json`) and writes the same Claude Code config files, so a
|
|
10
|
+
preset you author in the GUI can be switched from a terminal — over SSH, inside a
|
|
11
|
+
devcontainer, or from a script.
|
|
12
|
+
|
|
13
|
+
> **Authoring stays in the GUI.** Create and edit providers, presets, MCP groups and
|
|
14
|
+
> directory groups in the VS Code extension. This CLI is for the *operate* verbs:
|
|
15
|
+
> switch, apply, list, current, export, import.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @easytocloud/claude-personae
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Provides two commands: `claude-personae` and the short alias `ccp`.
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
ccp <command> [options]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
| Command | Description |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `ccp list [presets\|providers\|scopes]` | List configured items (default: all). `--json` for machine output. |
|
|
34
|
+
| `ccp current` | Show the active global + workspace preset. |
|
|
35
|
+
| `ccp switch <preset> [scope]` | Set the active preset and write the config files. |
|
|
36
|
+
| `ccp apply` | Re-apply the stored scopes to disk (reprovision a machine / fresh checkout). |
|
|
37
|
+
| `ccp export` | Print the store as JSON with **credentials scrubbed** (`-o <file>` to write). |
|
|
38
|
+
| `ccp import <file\|->` | Import a store (`--mode merge` \| `replace`). `-` reads stdin. |
|
|
39
|
+
|
|
40
|
+
### Scope (for `switch`)
|
|
41
|
+
|
|
42
|
+
By default `switch` sets the **global** preset. To target a project instead:
|
|
43
|
+
|
|
44
|
+
| Flag | Effect |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `--global`, `-g` | Set the global preset (default). |
|
|
47
|
+
| `--workspace`, `-w` | Set the preset for a workspace (uses the current directory). |
|
|
48
|
+
| `--path <dir>` | Workspace directory to target (implies `--workspace`). |
|
|
49
|
+
| `--inherit` | Workspace inherits the global preset (removes its overrides). |
|
|
50
|
+
| `--manual` | Workspace is managed manually (the CLI leaves its files alone). |
|
|
51
|
+
|
|
52
|
+
### Examples
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
ccp list presets
|
|
56
|
+
ccp switch bedrock-prod # set the global preset
|
|
57
|
+
ccp switch dev --workspace # set a preset for the current project
|
|
58
|
+
ccp switch --workspace --inherit # project goes back to inheriting global
|
|
59
|
+
ccp apply # rewrite config files from the stored scopes
|
|
60
|
+
ccp export -o presets.json # share presets (keys replaced with <REPLACE_ME>)
|
|
61
|
+
cat presets.json | ccp import - --mode replace
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## What it writes
|
|
65
|
+
|
|
66
|
+
- **Global scope** → `~/.claude/settings.json` (env vars, allowed directories,
|
|
67
|
+
`awsAuthRefresh`/`apiKeyHelper`) and `~/.claude.json` (MCP servers).
|
|
68
|
+
- **Workspace scope** → `<dir>/.claude/settings.json` and `<dir>/.mcp.json`
|
|
69
|
+
(only the keys that differ from global). `--inherit` removes these so global applies.
|
|
70
|
+
|
|
71
|
+
Presets are resolved by the exact same engine as the extension, so a Bedrock preset
|
|
72
|
+
sets `CLAUDE_CODE_USE_BEDROCK=1`, `AWS_PROFILE`, `AWS_REGION`, the model overrides, etc.
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT
|