set-prompt 0.2.1 → 0.4.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/CHANGELOG.md CHANGED
@@ -4,6 +4,46 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ---
6
6
 
7
+ ## [0.4.0] - 2026-04-10
8
+
9
+ ### Added
10
+ - Cursor integration (`link cursor`) — creates plugin structure at `~/.cursor/` with backup/restore
11
+ - `linkCommand` now shows a Link / Unlink summary before executing; exits early when there are no changes
12
+ - All `unlink*` functions print a colored header banner on start (consistent with `link*`)
13
+ - Console output: `removed` → red, `restored` → green, `backed up` → yellow
14
+ - Console output: `Config loaded` is now green (consistent with `Config saved`)
15
+
16
+ ### Changed
17
+ - Claude Code plugin: `~/.claude/plugins/installed_plugins.json` is now directly patched so `installPath` points to the source plugin directory — bypasses Claude Code's cache management that was deleting the symlink on startup
18
+ - `install`: re-installing the same URL is blocked with a `set-prompt update` hint
19
+ - `install`: re-installing a different URL shows a "Switching repo" warning with confirmation (default: No)
20
+ - `install`: EPERM on directory rename is handled gracefully with a descriptive error message
21
+ - `install`: existing repo backup is automatically removed after a successful clone
22
+
23
+ ### Disabled
24
+ - `link codex` is temporarily unavailable in this release (implementation preserved, re-enable in next release)
25
+
26
+ ---
27
+
28
+ ## [0.3.0] - 2026-04-06
29
+
30
+ ### Added
31
+ - Antigravity integration (`link antigravity`) — symlinks `skills/` into `~/.gemini/antigravity/skills/` with backup/restore
32
+ - `unlinkClaudeCode`, `unlinkRooCode`, `unlinkOpenclaw`, `unlinkAntigravity` — unlink functions with force mode
33
+ - `link` command interactive mode now supports **deselection** — unchecking a linked agent triggers unlink + backup restore
34
+ - `uninstall` delegates to `unlinkXxx(true)` instead of inlining rollback logic
35
+
36
+ ### Changed
37
+ - `uninstall` no longer contains rollback logic — all agent cleanup goes through `link-command.ts`
38
+ - `AntigravityConfig` schema updated to include `backup_path` (consistent with RooCode/OpenClaw)
39
+ - `AGENT_PROMPT_DIRS[ANTIGRAVITY]` set to `['skills']` only
40
+ - `scaffold` always overwrites `SET_PROMPT_GUIDE.md` — ensures the latest template on every run
41
+ - `SET_PROMPT_GUIDE.md` template updated: Antigravity frontmatter added, OpenClaw `homepage`/`user-invocable` fields added, `metadata` format corrected
42
+ - `build` script now runs `rimraf dist` before `tsup`
43
+ - README workflow restructured into 4 explicit steps
44
+
45
+ ---
46
+
7
47
  ## [0.2.1] - 2026-04-02
8
48
 
9
49
  ### Changed
package/README.md CHANGED
@@ -6,13 +6,19 @@ But every time you try a new AI agent, you have to set it all up again from scra
6
6
 
7
7
  `set-prompt` was built to solve this. It maintains a single git repository of prompts and symlinks them into each tool's expected location — so your prompt set stays in one place, stays versioned, and stays consistent across every AI agent you use.
8
8
 
9
+ One repo. Every agent. Always in sync.
10
+
9
11
  ```
10
- my-prompts/ (git repo)
11
- └── skills/, commands/, hooks/
12
- set-prompt install <git-url>
13
- set-prompt link claudecode → ~/.set-prompt/claudecode/ (Claude Code plugin)
14
- ↓ set-prompt link roocode → ~/.roo/ (symlinks)
15
- ↓ set-prompt link openclaw → ~/.openclaw/workspace/ (symlinks)
12
+ my-prompts/ (git repo)
13
+ ├── skills/
14
+ ├── commands/
15
+ └── hooks/
16
+
17
+ ┌────────────────┼─────────────────┬─────────────────┐
18
+ ▼ ▼ ▼ ▼
19
+ ~/.set-prompt/ ~/.roo/ ~/.openclaw/ ~/.gemini/
20
+ claudecode/ workspace/ antigravity/
21
+ (Claude Code plugin) (symlinks) (symlinks) (symlinks)
16
22
  ```
17
23
 
18
24
  ## 📦 Installation
@@ -25,69 +31,88 @@ npx set-prompt <command>
25
31
 
26
32
  ## 🚀 Workflow
27
33
 
28
- ### 1. Create a prompt repository
34
+ ### Step 1 Install set-prompt
35
+
36
+ ```bash
37
+ npm install -g set-prompt
38
+ ```
39
+
40
+ Or run without installing:
41
+
42
+ ```bash
43
+ npx set-prompt <command>
44
+ ```
45
+
46
+ ---
47
+
48
+ ### Step 2 — Connect your prompt repository
49
+
50
+ Point `set-prompt` at a git repo containing your prompts. It clones it to `~/.set-prompt/repo/` and registers it as your prompt source.
51
+
52
+ ```bash
53
+ set-prompt install https://github.com/you/my-prompts
54
+ ```
55
+
56
+ Don't have a repo yet? Scaffold one first:
29
57
 
30
58
  ```bash
31
59
  mkdir my-prompts && cd my-prompts && git init
32
60
  set-prompt scaffold .
33
61
  ```
34
62
 
35
- Creates:
63
+ This creates the expected directory structure:
36
64
 
37
65
  ```
38
66
  my-prompts/
39
- ├── SET_PROMPT_GUIDE.md
40
67
  ├── skills/
41
- │ └── <skill-name>/
42
- │ └── SKILL.md
43
68
  ├── commands/
44
- │ └── <command-name>/
45
- │ └── COMMAND.md
46
69
  ├── hooks/
47
70
  └── agents/
48
71
  ```
49
72
 
50
- ### 2. Register the repository
73
+ ---
74
+
75
+ ### Step 3 — Link to AI agents 🔗
51
76
 
52
77
  ```bash
53
- # remote git URL cloned to ~/.set-prompt/repo/
54
- set-prompt install https://github.com/you/my-prompts
78
+ set-prompt link # interactive checkboxselect agents to link
79
+ set-prompt link claudecode # link Claude Code only
80
+ set-prompt link roocode # link RooCode only
81
+ set-prompt link openclaw # link OpenClaw only
82
+ set-prompt link antigravity # link Antigravity only
83
+ set-prompt link cursor # link Cursor only
55
84
  ```
56
85
 
57
- ### 3. Link to AI tools 🔗
86
+ The interactive mode shows all agents with their current state. **Check to link, uncheck to unlink** — existing directories are backed up before being replaced.
87
+
88
+ | Agent | Where prompts land | What gets linked |
89
+ |---|---|---|
90
+ | Claude Code | `~/.set-prompt/claude-code/` (plugin) | `skills/`, `commands/`, `hooks/`, `agents/` |
91
+ | RooCode | `~/.roo/` | `skills/`, `commands/` |
92
+ | OpenClaw | `~/.openclaw/workspace/` | `skills/` |
93
+ | Antigravity | `~/.gemini/antigravity/` | `skills/` |
94
+ | Cursor | `~/.cursor/` (plugin) | `skills/`, `commands/` |
95
+
96
+ ---
97
+
98
+ ### Step 4 — Uninstall
99
+
100
+ Removes all set-prompt data, reverts symlinks, and restores any backed-up directories.
58
101
 
59
102
  ```bash
60
- set-prompt link # interactive selection
61
- set-prompt link claudecode # Claude Code only
62
- set-prompt link roocode # RooCode only
103
+ set-prompt uninstall
63
104
  ```
64
105
 
65
- - **Claude Code**: creates a plugin at `~/.set-prompt/claudecode/`, registers via `~/.claude/settings.json`
66
- - **RooCode**: symlinks `skills/`, `commands/` into `~/.roo/` — backs up existing dirs first
67
- - **OpenClaw**: symlinks `skills/` into `~/.openclaw/workspace/` — backs up existing dir first
68
-
69
106
  ## 📋 Commands
70
107
 
71
- | Command | Description | Status |
72
- |---------|-------------|--------|
73
- | `scaffold [path]` | Verify and scaffold repo structure | |
74
- | `install <url>` | Clone remote git repo and register as prompt source | ✅ |
75
- | `link [agent]` | Link prompts to AI agents (interactive if omitted) | ✅ |
76
- | `link claudecode` | Link to Claude Code | |
77
- | `link roocode` | Link to RooCode | |
78
- | `link openclaw` | Link to OpenClaw | |
79
- | `link codex` | Link to Codex | 🔜 planned |
80
- | `link antigravity` | Link to Antigravity | 🔜 planned |
81
- | `update` | Fetch and pull latest changes from remote repo | ✅ |
82
- | `status` | Show current repo and linked agents | ✅ |
83
- | `uninstall` | Remove all set-prompt data | ✅ |
84
-
85
- ## 🗓️ Planned Integrations
86
-
87
- | Agent | Provider | Status |
88
- |-------|----------|--------|
89
- | Codex | OpenAI | 🔜 planned |
90
- | Antigravity | Google | 🔜 planned |
108
+ | Command | Description |
109
+ |---------|-------------|
110
+ | `install <url>` | Clone remote git repo and register as prompt source |
111
+ | `link [agent]` | Link/unlink agents interactively, or target one directly |
112
+ | `update` | Fetch and pull latest changes from remote repo |
113
+ | `status` | Show current repo and linked agents |
114
+ | `scaffold [path]` | Verify and create required directories in a prompt repo |
115
+ | `uninstall` | Remove all set-prompt data and restore backups |
91
116
 
92
117
  ## ☕ Support
93
118
 
@@ -118,9 +143,10 @@ npm test # Run tests with vitest
118
143
 
119
144
  `set-prompt` modifies configuration files managed by third-party AI agent applications:
120
145
 
121
- - **Claude Code** — writes to `~/.claude/settings.json`
146
+ - **Claude Code** — writes to `~/.claude/settings.json` and `~/.claude/plugins/installed_plugins.json`
122
147
  - **RooCode** — replaces directories in `~/.roo/`
123
148
  - **OpenClaw** — replaces directories in `~/.openclaw/workspace/`
149
+ - **Cursor** — writes to `~/.cursor/`
124
150
 
125
151
  Before making any changes, `set-prompt` creates a backup and rolls back automatically on failure. However, you should be aware that:
126
152
 
@@ -141,14 +167,15 @@ Stored at `~/.set-prompt/config.json`, managed via `ConfigManager`.
141
167
  │ ├── skills/
142
168
  │ ├── commands/
143
169
  │ └── hooks/
144
- └── claudecode/ # Claude Code plugin output
170
+ └── claude-code/ # Claude Code plugin output
145
171
  ├── .claude-plugin/
146
172
  │ └── marketplace.json
147
- └── plugins/set-prompt/
173
+ └── plugins/sppt/
148
174
  ├── .claude-plugin/plugin.json
149
175
  ├── skills/ → symlink to repo/skills/
150
176
  ├── commands/ → symlink to repo/commands/
151
- └── hooks/ → symlink to repo/hooks/
177
+ ├── hooks/ → symlink to repo/hooks/
178
+ └── agents/ → symlink to repo/agents/
152
179
 
153
180
  ~/.roo/ # RooCode integration (symlinks)
154
181
  ├── SET_PROMPT_BACKUP/ # backup of original dirs before linking
@@ -161,13 +188,18 @@ Stored at `~/.set-prompt/config.json`, managed via `ConfigManager`.
161
188
  ├── SET_PROMPT_BACKUP/ # backup of original dirs before linking
162
189
  │ └── skills/
163
190
  └── skills/ → symlink to repo/skills/
191
+
192
+ ~/.gemini/antigravity/ # Antigravity integration (symlinks)
193
+ ├── SET_PROMPT_BACKUP/ # backup of original dirs before linking
194
+ │ └── skills/
195
+ └── skills/ → symlink to repo/skills/
164
196
  ```
165
197
 
166
198
  ## 🖥️ Requirements
167
199
 
168
200
  - **Node.js** 18+
169
201
  - **Git** (must be available in `PATH` for `set-prompt install`)
170
- - **Windows**: symlink creation requires either Developer Mode enabled or running as Administrator
202
+ - **Windows only**: symlink creation requires Developer Mode enabled or running as Administrator (Linux/macOS work out of the box)
171
203
 
172
204
  ## 🤝 Contributing
173
205