@vishalpunjabi/claude-profile 0.1.5
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/LICENSE +21 -0
- package/README.md +151 -0
- package/dist/bin/claude-profile.js +2190 -0
- package/package.json +67 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vishal Punjabi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# claude-profile
|
|
2
|
+
|
|
3
|
+
Sync your `~/.claude/` config across machines via a git-backed multi-profile system.
|
|
4
|
+
|
|
5
|
+
**Status: v0.1.0 — early release. macOS + Linux only. Not yet on npm.**
|
|
6
|
+
|
|
7
|
+
**Docs:** https://vshalpnjabi.github.io/claude-profile/ (deployed from `main` on every doc change)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Until the package is published to npm, install directly from GitHub:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Latest from default branch (main)
|
|
17
|
+
npm install -g github:vshalpnjabi/claude-profile
|
|
18
|
+
|
|
19
|
+
# Pinned to a release tag
|
|
20
|
+
npm install -g github:vshalpnjabi/claude-profile#v0.1.0
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or clone and link locally:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/vshalpnjabi/claude-profile.git
|
|
27
|
+
cd claude-profile
|
|
28
|
+
npm install && npm run build && npm link
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quickstart
|
|
34
|
+
|
|
35
|
+
### Machine A (first machine)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Create an empty private GitHub repo first (e.g., github.com/you/my-claude)
|
|
39
|
+
claude-profile init --git git@github.com:you/my-claude.git --profile default --activate
|
|
40
|
+
claude-profile install-skill # wires SessionStart/Stop hooks for auto-sync
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Machine B (second machine)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
claude-profile init --git git@github.com:you/my-claude.git --profile default --activate
|
|
47
|
+
claude-profile install-skill
|
|
48
|
+
# ~/.claude/ now mirrors Machine A
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### See what's in a profile
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
claude-profile describe # full sectioned report
|
|
55
|
+
claude-profile describe --brief # counts only
|
|
56
|
+
claude-profile describe --json # machine-readable
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## What gets synced
|
|
62
|
+
|
|
63
|
+
**Synced by default (everything under `~/.claude/`):** `settings.json`,
|
|
64
|
+
`settings.local.json`, `CLAUDE.md`, `agents/`, `skills/`, `commands/`, `hooks/`,
|
|
65
|
+
`output-styles/`, `plugins/` (including installed plugin code), statusline script,
|
|
66
|
+
and 5 tracked keys from `~/.claude.json` (`mcpServers`, `autoUpdates`,
|
|
67
|
+
`autoUpdatesProtectedForNative`, `showExpandedTodos`, `showSpinnerTree`).
|
|
68
|
+
|
|
69
|
+
**Never synced (per-machine state):**
|
|
70
|
+
- Credentials and secrets — hard-blocked by built-in denylist:
|
|
71
|
+
`.credentials.json`, `*.key`, `*.pem`, `.env*`, `*secret*`, `*token*`
|
|
72
|
+
- Caches: `cache/`, `paste-cache/`, `downloads/`, `stats-cache.json`,
|
|
73
|
+
`mcp-needs-auth-cache.json`, `plugins/cache/`, `plugins/plugin-catalog-cache.json`,
|
|
74
|
+
`plugins/data/`
|
|
75
|
+
- Per-machine runtime: `daemon*`, `tasks/`, `telemetry/`, `jobs/`, `security/`,
|
|
76
|
+
`security_warnings_state_*.json`, `*.bak.*`, `.last-cleanup`
|
|
77
|
+
- Project + session history: `projects/`, `sessions/`, `history.jsonl`,
|
|
78
|
+
`file-history/`, `shell-snapshots/`, `session-env/`
|
|
79
|
+
- `~/.claude/.claude-profile/backups/` (claude-profile owns this)
|
|
80
|
+
- Most top-level `~/.claude.json` keys (`oauthAccount`, `projects`, `theme`,
|
|
81
|
+
`userID`, `firstStartTime`, etc.) — run `claude-profile describe` to see the
|
|
82
|
+
full list on your machine
|
|
83
|
+
|
|
84
|
+
You can override either list with a repo-root `claude-profile.yaml`:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
include:
|
|
88
|
+
- "**"
|
|
89
|
+
exclude:
|
|
90
|
+
- "projects/**"
|
|
91
|
+
- "sessions/**"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Commands
|
|
97
|
+
|
|
98
|
+
| Command | Purpose |
|
|
99
|
+
|---|---|
|
|
100
|
+
| `claude-profile init --git <url>` | Clone repo and register a profile on this machine |
|
|
101
|
+
| `claude-profile sync` | Pull, merge, commit, push. Usually invoked by the hook |
|
|
102
|
+
| `claude-profile status` | Show what sync would do; no writes |
|
|
103
|
+
| `claude-profile diff <path>` | Unified diff between home and repo for one path |
|
|
104
|
+
| `claude-profile describe [name]` | Inventory a profile: settings, hooks, MCP, commands, skills, agents, plugins, backups, and excluded `~/.claude.json` keys |
|
|
105
|
+
| `claude-profile use <name>` | Switch active profile (always backs up first) |
|
|
106
|
+
| `claude-profile list` | List registered + repo-only profiles |
|
|
107
|
+
| `claude-profile adopt <name>` | Snapshot current `~/.claude/` into a new profile |
|
|
108
|
+
| `claude-profile merge <source> --into <dest>` | Merge profiles (`prefer-dest` \| `prefer-source` \| `newer` \| `mark-conflicts`) |
|
|
109
|
+
| `claude-profile backups` | List backup snapshots |
|
|
110
|
+
| `claude-profile restore <profile> [ts]` | Restore a backup snapshot |
|
|
111
|
+
| `claude-profile prune [--keep N]` | Delete old backups |
|
|
112
|
+
| `claude-profile config <op> [key] [value]` | Per-machine config (get/set/unset) |
|
|
113
|
+
| `claude-profile install-skill` | Install `/profile` skill + SessionStart/Stop hooks |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Auto-sync
|
|
118
|
+
|
|
119
|
+
`install-skill` wires two Claude Code hooks: a **SessionStart** hook that pulls the
|
|
120
|
+
latest profile (3-second timeout, non-blocking) and a **Stop** hook that pushes any
|
|
121
|
+
local changes in the background. Once installed you rarely need to run `sync` manually
|
|
122
|
+
— changes flow between machines automatically each time Claude Code starts and stops.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Conflicts
|
|
127
|
+
|
|
128
|
+
When both machines edit the same file, the newer timestamp wins and the losing version
|
|
129
|
+
is preserved at `profiles/<active>/.conflicts/<path>.<host>.<ts>` in the repo. No data
|
|
130
|
+
is ever silently discarded.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Per-machine config
|
|
135
|
+
|
|
136
|
+
Machine-specific settings (which git remote to use, sync timeout, debounce window)
|
|
137
|
+
live in `~/.claude-profile/config.json` and are never committed to the repo. Manage
|
|
138
|
+
with `claude-profile config get/set/unset`.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Docs
|
|
143
|
+
|
|
144
|
+
- [Full documentation site](https://vshalpnjabi.github.io/claude-profile/) (quickstart, command reference, sync algorithm, configuration, FAQ)
|
|
145
|
+
- [Design spec](docs/superpowers/specs/2026-05-24-claude-profile-design.md)
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT — see [LICENSE](LICENSE).
|