set-prompt 0.5.4 → 0.7.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 +48 -0
- package/README.md +82 -26
- package/dist/index.js +1245 -401
- package/package.json +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,54 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [0.7.0] - 2026-04-20
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **OpenCode integration** (`link opencode`) — dir symlinks into `~/.config/opencode/` (OpenCode's default config directory). Links `skills/`, `commands/`, `agents/`.
|
|
11
|
+
- **Gemini CLI integration** (`link geminicli`) — dir symlinks into `~/.gemini/` (coexists with Antigravity's `~/.gemini/antigravity/` subtree). Links `skills/`, `commands/`, `agents/`.
|
|
12
|
+
- `OpencodeConfigSchema` / `GeminicliConfigSchema` + types + `configManager.opencode` / `configManager.geminicli` getter/setter + `isOpencodeEnabled()` / `isGeminicliEnabled()`
|
|
13
|
+
- `SET_PROMPT_GUIDE` template: OpenCode frontmatter reference — skills (`name`, `description`, `license`, `compatibility`, `metadata`), commands (`template` required + `agent`/`model`/`subtask`), agents (`mode`, `temperature`, `top_p`, `steps`, `tools`, `permission`, `prompt` with `{file:...}` reference, etc.)
|
|
14
|
+
- `SET_PROMPT_GUIDE` template: Gemini CLI frontmatter reference — skills (`name` + `description` — minimal), agents (`kind`, `tools` as array, `model`, `temperature` 0–2.0, `max_turns`, `timeout_mins`, `mcpServers` as nested YAML map), and a dedicated TOML sample for Gemini CLI commands (`prompt` required + `description`) with `{{args}}`/`!{cmd}`/`@{path}` placeholders and namespaced subdirectory support (`/git:commit`)
|
|
15
|
+
- Tests: `tests/commands/link-opencode.test.ts`, `tests/commands/link-geminicli.test.ts`
|
|
16
|
+
- README hero rewrite with `One repo. Every AI coding tool. Always in sync.` tagline, npm/GitHub/Sponsor badges, Quick Start section
|
|
17
|
+
- `engines.node >=18` declared in `package.json`
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- `link-command.ts`: `LINK_MAP` / `UNLINK_MAP` / `prevLinked` extended with OpenCode and Gemini CLI entries
|
|
21
|
+
- `checkbox` prompt UX: added `loop: false` and `pageSize: ALL_AGENTS.length` so the agent list no longer wraps around and shows all options without scrolling
|
|
22
|
+
- Removed Contributing section from README (not accepting external PRs yet)
|
|
23
|
+
|
|
24
|
+
### Notes / Caveats
|
|
25
|
+
- **Gemini CLI commands use `.toml`** (not `.md`) — repo's `commands/` needs TOML files for Gemini to recognize them
|
|
26
|
+
- **Gemini CLI agents have strict frontmatter validation** — rejects unknown keys (e.g. `color`, `allowed-tools`, `mode` from other platforms). Allowed keys only: `name`, `description`, `kind`, `tools`, `mcpServers`, `model`, `temperature`, `max_turns`, `timeout_mins`. Warning printed on link completion.
|
|
27
|
+
- **RooCode skill directories must use hyphens, not underscores** — `my_skill` silently fails to register, `my-skill` works. Document-only gotcha (no code change); noted in `SET_PROMPT_GUIDE` skill `name` row.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## [0.6.0] - 2026-04-14
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- `set-prompt repo status` — VCS status: current branch, upstream + ahead/behind, colored list of changed files (separate from `set-prompt status`, which shows linked agents)
|
|
35
|
+
- `set-prompt repo pull` — git fetch + pull (replaces `set-prompt update`)
|
|
36
|
+
- `set-prompt repo commit [-m <msg>]` — stage all + commit locally; auto-generates a subject+body message when `-m` omitted (subject: `update N files`, body: bullet list of repo-relative paths)
|
|
37
|
+
- `set-prompt repo push` — push local commits to remote
|
|
38
|
+
- `set-prompt repo save [-m <msg>]` — one-step macro: commit + push (also auto-generates message)
|
|
39
|
+
- `set-prompt repo path` — prints the installed repo path to stdout (designed for `cd $(sppt repo path)`); errors go to stderr so piping stays clean
|
|
40
|
+
- `set-prompt repo open` — opens the repo in the OS file manager (`explorer` / `open` / `xdg-open`); `--code` opens in VSCode (`code` CLI), `--stree` opens in Sourcetree (auto-detects `SourceTree.exe` at `%LOCALAPPDATA%\SourceTree` on Windows where the `stree` wrapper isn't shipped)
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
- `scaffold` and `install`: when the resulting working tree is dirty, print a hint guiding the user to run `sppt repo save`. Non-interactive — the user stays in control (earlier design had auto-prompted to run `save`, which risked failing pushes during `install`).
|
|
44
|
+
- `scaffold`: plugin manifests (`.claude-plugin/plugin.json`, `.codex-plugin/plugin.json`) are no longer overwritten when they already exist. Existing files are validated against required fields (`name` for Claude; `name` + `skills` + `mcpServers` + `apps` for Codex — the latter three are pointers Codex uses to load each integration) and preserved as-is — custom values like `version`, `description`, or non-default `name` survive re-runs. Invalid files trigger a warning but stay untouched (status: `+` created / `✓` valid / `⚠` invalid).
|
|
45
|
+
|
|
46
|
+
### Changed (Breaking)
|
|
47
|
+
- `set-prompt update` removed. Use `set-prompt repo pull` instead.
|
|
48
|
+
- Rationale: VCS-grouped commands read more clearly and leave room for future operations; `pull` is already the cross-VCS norm (Hg/JJ/Fossil all use it). `commit` and `push` stay pure git semantics; `save` is the convenience macro for the common case. `path` / `open` close the "where is my repo?" UX gap since the default install location (`~/.set-prompt/repo/`) felt distant.
|
|
49
|
+
|
|
50
|
+
### Migration
|
|
51
|
+
- Replace any `set-prompt update` / `sppt update` calls with `set-prompt repo pull` / `sppt repo pull`
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
7
55
|
## [0.5.4] - 2026-04-13
|
|
8
56
|
|
|
9
57
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# Set Prompt
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/set-prompt)
|
|
4
|
+
[](https://www.npmjs.com/package/set-prompt)
|
|
5
|
+
[](https://github.com/juncha9/set-prompt/stargazers)
|
|
6
|
+
[](https://github.com/juncha9/set-prompt/commits/main)
|
|
7
|
+
[](./LICENSE.md)
|
|
8
|
+
[](https://nodejs.org)
|
|
9
|
+
[](https://github.com/sponsors/juncha9)
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
### One repo. Every AI coding tool. Always in sync.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
Your skills, commands, and agents live in git. One command syncs them into every AI coding tool you use — so the prompts you built stay with you no matter which tool you're in.
|
|
10
14
|
|
|
11
15
|
```
|
|
12
16
|
repo/ (git)
|
|
@@ -23,26 +27,40 @@ One repo. Every agent. Always in sync.
|
|
|
23
27
|
┌──────────────────┼──────────────────────┐
|
|
24
28
|
▼ ▼ ▼
|
|
25
29
|
Claude Code Codex RooCode, OpenClaw,
|
|
26
|
-
(marketplace + (marketplace + Antigravity, Cursor
|
|
27
|
-
repo symlink) cache symlink)
|
|
30
|
+
(marketplace + (marketplace + Antigravity, Cursor,
|
|
31
|
+
repo symlink) cache symlink) OpenCode, Gemini CLI
|
|
32
|
+
(dir symlinks)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
From zero to linked in under a minute:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g set-prompt
|
|
41
|
+
sppt install https://github.com/you/my-prompts # or: sppt scaffold .
|
|
42
|
+
sppt link # interactive checkbox — pick your tools
|
|
28
43
|
```
|
|
29
44
|
|
|
45
|
+
That's it. Your prompts are now live in every AI tool you selected.
|
|
46
|
+
|
|
30
47
|
## Installation
|
|
31
48
|
|
|
32
49
|
```bash
|
|
50
|
+
# global install (recommended)
|
|
33
51
|
npm install -g set-prompt
|
|
34
|
-
|
|
52
|
+
|
|
53
|
+
# one-off run without installing
|
|
35
54
|
npx set-prompt <command>
|
|
36
55
|
```
|
|
37
56
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
`sppt` is a built-in short alias for `set-prompt` — all commands work with either name:
|
|
57
|
+
Both `set-prompt` and the short alias `sppt` are registered — use whichever you prefer:
|
|
41
58
|
|
|
42
59
|
```bash
|
|
43
60
|
sppt install <url> # connect an existing repo
|
|
44
61
|
sppt link # link to AI agents
|
|
45
|
-
sppt
|
|
62
|
+
sppt repo pull # pull latest changes
|
|
63
|
+
sppt repo save -m "…" # commit + push local edits
|
|
46
64
|
```
|
|
47
65
|
|
|
48
66
|
## Workflow
|
|
@@ -78,6 +96,8 @@ my-prompts/
|
|
|
78
96
|
└── SET_PROMPT_GUIDE.md (optional reference doc)
|
|
79
97
|
```
|
|
80
98
|
|
|
99
|
+
> **Re-run safety**: `scaffold` never overwrites existing plugin manifests. On re-run, it validates them against required fields and preserves your customizations (custom `name`, `version`, `description`, etc.). Invalid files trigger a warning but stay untouched.
|
|
100
|
+
|
|
81
101
|
---
|
|
82
102
|
|
|
83
103
|
### Step 2 — Link to AI agents
|
|
@@ -90,6 +110,8 @@ set-prompt link openclaw # link OpenClaw only
|
|
|
90
110
|
set-prompt link codex # link Codex only
|
|
91
111
|
set-prompt link antigravity # link Antigravity only
|
|
92
112
|
set-prompt link cursor # link Cursor only
|
|
113
|
+
set-prompt link opencode # link OpenCode only
|
|
114
|
+
set-prompt link geminicli # link Gemini CLI only
|
|
93
115
|
```
|
|
94
116
|
|
|
95
117
|
The interactive mode shows all agents with their current state. **Check to link, uncheck to unlink** — existing directories are backed up before being replaced.
|
|
@@ -102,22 +124,44 @@ The interactive mode shows all agents with their current state. **Check to link,
|
|
|
102
124
|
| OpenClaw | dir symlinks into `~/.openclaw/workspace/` | `skills/` |
|
|
103
125
|
| Antigravity | dir symlinks into `~/.gemini/antigravity/` | `skills/` |
|
|
104
126
|
| Cursor | dir symlinks into `~/.cursor/` | `skills/`, `agents/`, `commands/`, `hooks/`, `mcp.json` (hardlink) |
|
|
127
|
+
| OpenCode | dir symlinks into `~/.config/opencode/` | `skills/`, `commands/`, `agents/` |
|
|
128
|
+
| Gemini CLI | dir symlinks into `~/.gemini/` | `skills/`, `commands/`, `agents/` |
|
|
105
129
|
|
|
106
130
|
> **Note on Claude Code**: Operates as a plugin. Restart Claude Code after linking for the plugin to be recognized.
|
|
107
131
|
|
|
108
132
|
> **Note on Codex**: Operates as a plugin. Restart Codex after linking — you may need to restart **twice** before the plugin is fully recognized.
|
|
109
133
|
|
|
134
|
+
> **Note on RooCode**: Skill directory names must use hyphens only — `my_skill` (underscore) silently fails to be recognized, while `my-skill` works. Hyphens work on every platform, so default to them.
|
|
135
|
+
|
|
110
136
|
> **Note on Cursor**: Does not load `rules/` from symlinked directories. Use `.cursor/rules/` within each project instead, or manage rules via Cursor Settings.
|
|
111
137
|
|
|
138
|
+
> **Note on OpenCode**: Linked at `~/.config/opencode/` — OpenCode's default config directory, so no env var setup required.
|
|
139
|
+
|
|
140
|
+
> **Note on Gemini CLI**: Skills follow the standard `skills/<name>/SKILL.md` pattern. Commands use `.toml` format (not `.md`) and agents use `.md` with YAML frontmatter. Files in your repo's `commands/` must be TOML for Gemini CLI to recognize them. **Agents have strict frontmatter validation** — unknown keys (e.g. `allowed-tools`, `color`, `mode` from other platforms) cause Gemini CLI to reject the agent. See `SET_PROMPT_GUIDE.md` for the allowed keys.
|
|
141
|
+
|
|
112
142
|
---
|
|
113
143
|
|
|
114
144
|
### Step 3 — Keep in sync
|
|
115
145
|
|
|
146
|
+
Primary flow — pull incoming, save outgoing:
|
|
147
|
+
|
|
116
148
|
```bash
|
|
117
|
-
set-prompt
|
|
149
|
+
set-prompt repo pull # fetch + pull latest changes from remote
|
|
150
|
+
set-prompt repo save -m "message" # stage + commit + push in one step
|
|
151
|
+
set-prompt repo save # same, but auto-generates message from changed files
|
|
118
152
|
```
|
|
119
153
|
|
|
120
|
-
|
|
154
|
+
Additional commands:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
set-prompt repo status # show branch, ahead/behind, changed files
|
|
158
|
+
set-prompt repo commit -m "message" # commit locally without pushing
|
|
159
|
+
set-prompt repo push # push existing local commits
|
|
160
|
+
set-prompt repo path # print repo location (e.g. cd "$(sppt repo path)")
|
|
161
|
+
set-prompt repo open # open repo in OS file manager (--code VSCode, --stree Sourcetree)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Symlink-based agents (Claude Code, Codex, RooCode, OpenClaw, Antigravity, OpenCode, Gemini CLI) reflect changes immediately after pull. Cursor's `mcp.json` is a hardlink to repo's `.mcp.json`, so edits to either side are reflected automatically.
|
|
121
165
|
|
|
122
166
|
---
|
|
123
167
|
|
|
@@ -135,9 +179,15 @@ set-prompt uninstall
|
|
|
135
179
|
|---------|-------------|
|
|
136
180
|
| `install <url>` | Clone remote git repo and register as prompt source |
|
|
137
181
|
| `link [agent]` | Link/unlink agents interactively, or target one directly |
|
|
138
|
-
| `
|
|
182
|
+
| `repo status` | Show VCS status: branch, ahead/behind, changed files |
|
|
183
|
+
| `repo pull` | Fetch and pull latest changes from remote repo |
|
|
184
|
+
| `repo commit [-m <msg>]` | Stage all changes and commit locally (auto-generates message from changed files if omitted) |
|
|
185
|
+
| `repo push` | Push local commits to remote |
|
|
186
|
+
| `repo save [-m <msg>]` | Stage + commit + push in one step (macro) |
|
|
187
|
+
| `repo path` | Print the repo path to stdout (e.g. `cd $(sppt repo path)`) |
|
|
188
|
+
| `repo open` | Open the repo in the OS file manager (`--code` for VSCode, `--stree` for Sourcetree) |
|
|
139
189
|
| `status` | Show current repo and linked agents |
|
|
140
|
-
| `scaffold [path]` | Create directories and plugin manifests
|
|
190
|
+
| `scaffold [path]` | Create or validate directories and plugin manifests (existing files are preserved) |
|
|
141
191
|
| `uninstall` | Remove all set-prompt data and restore backups |
|
|
142
192
|
|
|
143
193
|
## What Gets Created
|
|
@@ -186,6 +236,19 @@ set-prompt uninstall
|
|
|
186
236
|
├── commands/ → repo/commands
|
|
187
237
|
├── hooks/ → repo/hooks
|
|
188
238
|
└── mcp.json ⇔ repo/.mcp.json (hardlink)
|
|
239
|
+
|
|
240
|
+
~/.config/opencode/ # OpenCode (dir symlinks)
|
|
241
|
+
├── SET_PROMPT_BACKUP/
|
|
242
|
+
├── skills/ → repo/skills
|
|
243
|
+
├── commands/ → repo/commands
|
|
244
|
+
└── agents/ → repo/agents
|
|
245
|
+
|
|
246
|
+
~/.gemini/ # Gemini CLI (dir symlinks)
|
|
247
|
+
├── SET_PROMPT_BACKUP/
|
|
248
|
+
├── skills/ → repo/skills (Gemini reads SKILL.md)
|
|
249
|
+
├── commands/ → repo/commands (Gemini reads *.toml)
|
|
250
|
+
├── agents/ → repo/agents (Gemini reads *.md)
|
|
251
|
+
└── antigravity/ (Antigravity's own subtree, unrelated)
|
|
189
252
|
```
|
|
190
253
|
|
|
191
254
|
## Warning
|
|
@@ -198,6 +261,8 @@ set-prompt uninstall
|
|
|
198
261
|
- **OpenClaw** — replaces directories in `~/.openclaw/workspace/`
|
|
199
262
|
- **Antigravity** — replaces directories in `~/.gemini/antigravity/`
|
|
200
263
|
- **Cursor** — replaces directories and `mcp.json` in `~/.cursor/`
|
|
264
|
+
- **OpenCode** — replaces directories in `~/.config/opencode/`
|
|
265
|
+
- **Gemini CLI** — replaces directories in `~/.gemini/` (`antigravity/` subtree untouched)
|
|
201
266
|
|
|
202
267
|
Before making any changes, `set-prompt` creates a backup and rolls back automatically on failure. However, you should be aware that:
|
|
203
268
|
|
|
@@ -219,9 +284,7 @@ Use `set-prompt uninstall` to cleanly revert all changes.
|
|
|
219
284
|
- Star this repo
|
|
220
285
|
- Report bugs — open an [issue](https://github.com/juncha9/set-prompt/issues) with steps to reproduce
|
|
221
286
|
- Request features — share ideas via [issues](https://github.com/juncha9/set-prompt/issues)
|
|
222
|
-
-
|
|
223
|
-
|
|
224
|
-
[](https://github.com/sponsors/juncha9)
|
|
287
|
+
- [Sponsor on GitHub](https://github.com/sponsors/juncha9) if the project saves you time
|
|
225
288
|
|
|
226
289
|
## Dev Commands
|
|
227
290
|
|
|
@@ -233,13 +296,6 @@ npm unlink -g set-prompt # Remove global CLI
|
|
|
233
296
|
npm test # Run tests with vitest
|
|
234
297
|
```
|
|
235
298
|
|
|
236
|
-
## Contributing
|
|
237
|
-
|
|
238
|
-
> Contribution guidelines are still being figured out. For now, feel free to open an issue to discuss ideas or report bugs.
|
|
239
|
-
|
|
240
|
-
- Bug reports and feature requests → [GitHub Issues](https://github.com/juncha9/set-prompt/issues)
|
|
241
|
-
- PRs for new agent integrations are especially appreciated
|
|
242
|
-
|
|
243
299
|
## License
|
|
244
300
|
|
|
245
301
|
This project is licensed under the [MIT License](./LICENSE.md).
|