@promptscript/cli 1.0.0 → 1.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +122 -7
  3. package/index.js +5692 -2858
  4. package/package.json +2 -2
  5. package/skills/migrate-to-promptscript/SKILL.md +228 -0
  6. package/skills/promptscript/SKILL.md +372 -0
  7. package/src/cli.d.ts.map +1 -1
  8. package/src/commands/compile.d.ts.map +1 -1
  9. package/src/commands/diff.d.ts.map +1 -1
  10. package/src/commands/init.d.ts.map +1 -1
  11. package/src/commands/pull.d.ts.map +1 -1
  12. package/src/commands/registry/index.d.ts +6 -0
  13. package/src/commands/registry/index.d.ts.map +1 -0
  14. package/src/commands/registry/init.d.ts +7 -0
  15. package/src/commands/registry/init.d.ts.map +1 -0
  16. package/src/commands/registry/publish.d.ts +7 -0
  17. package/src/commands/registry/publish.d.ts.map +1 -0
  18. package/src/commands/registry/validate.d.ts +7 -0
  19. package/src/commands/registry/validate.d.ts.map +1 -0
  20. package/src/commands/update-check.d.ts.map +1 -1
  21. package/src/commands/validate.d.ts.map +1 -1
  22. package/src/config/env-config.d.ts +13 -0
  23. package/src/config/env-config.d.ts.map +1 -0
  24. package/src/config/index.d.ts +4 -1
  25. package/src/config/index.d.ts.map +1 -1
  26. package/src/config/loader.d.ts +9 -0
  27. package/src/config/loader.d.ts.map +1 -1
  28. package/src/config/merge-config.d.ts +7 -0
  29. package/src/config/merge-config.d.ts.map +1 -0
  30. package/src/config/user-config.d.ts +11 -0
  31. package/src/config/user-config.d.ts.map +1 -0
  32. package/src/types.d.ts +41 -0
  33. package/src/types.d.ts.map +1 -1
  34. package/src/utils/ai-tools-detector.d.ts +1 -1
  35. package/src/utils/ai-tools-detector.d.ts.map +1 -1
  36. package/src/utils/manifest-loader.d.ts +2 -15
  37. package/src/utils/manifest-loader.d.ts.map +1 -1
  38. package/src/utils/registry-scaffolder.d.ts +23 -0
  39. package/src/utils/registry-scaffolder.d.ts.map +1 -0
  40. package/src/utils/registry-validator.d.ts +30 -0
  41. package/src/utils/registry-validator.d.ts.map +1 -0
  42. package/src/utils/version-check.d.ts.map +1 -1
  43. package/src/templates/migrate-skill.d.ts +0 -9
  44. package/src/templates/migrate-skill.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.0](https://github.com/mrwogu/promptscript/compare/v1.0.0...v1.1.0) (2026-03-11)
9
+
10
+
11
+ ### Features
12
+
13
+ * add Factory AI, OpenCode, and Gemini CLI compilation targets ([9c206af](https://github.com/mrwogu/promptscript/commit/9c206af40fe35412b948b1a32d9fec8b309e3c91))
14
+ * add root SKILL.md as canonical source with sync pipeline ([#75](https://github.com/mrwogu/promptscript/issues/75)) ([cc76023](https://github.com/mrwogu/promptscript/commit/cc76023eaea92318303081dcd439ae3185b1bbe0))
15
+ * **cli:** enterprise registry redesign ([#74](https://github.com/mrwogu/promptscript/issues/74)) ([a1ce2ca](https://github.com/mrwogu/promptscript/commit/a1ce2cad2a80d902e380907dd5b1c474952f8b6f))
16
+ * new formatters ([#78](https://github.com/mrwogu/promptscript/issues/78)) ([b30585a](https://github.com/mrwogu/promptscript/commit/b30585ae483a3c02b690ab8755ccd44f9cf355a7))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **cli:** include skills in build assets and update CI smoke tests ([62d8d0b](https://github.com/mrwogu/promptscript/commit/62d8d0bbc86f02ad11424110fb7bf2215dd80299))
22
+
8
23
  ## [1.0.0](https://github.com/mrwogu/promptscript/compare/v1.0.0-rc.3...v1.0.0) (2026-03-06)
9
24
 
10
25
 
package/README.md CHANGED
@@ -15,7 +15,7 @@ Write AI instructions once in PromptScript, compile to GitHub Copilot, Claude Co
15
15
  Every AI coding tool uses a different config format. As your organization grows, so does the chaos:
16
16
 
17
17
  ```
18
- 50 repos x 4 AI tools = 200 files to maintain
18
+ 50 repos x 37 AI agents = 1850 files to maintain
19
19
 
20
20
  repo-1/CLAUDE.md repo-1/.cursorrules repo-1/.github/copilot-instructions.md
21
21
  repo-2/CLAUDE.md repo-2/.cursorrules repo-2/.github/copilot-instructions.md
@@ -120,12 +120,15 @@ Run `prs compile` and get correctly formatted output for every AI tool your team
120
120
 
121
121
  ## Supported Targets
122
122
 
123
- | AI Tool | Output |
124
- | :--------------------- | :------------------------------------------------- |
125
- | **GitHub Copilot** | `.github/copilot-instructions.md`, agents, prompts |
126
- | **Claude Code** | `CLAUDE.md`, skills, local memory |
127
- | **Cursor** | `.cursor/rules/*.mdc` |
128
- | **Google Antigravity** | `.agent/rules/*.md` |
123
+ | AI Tool | Output |
124
+ | :--------------------- | :---------------------------------------------------- |
125
+ | **GitHub Copilot** | `.github/copilot-instructions.md`, agents, prompts |
126
+ | **Claude Code** | `CLAUDE.md`, skills, local memory |
127
+ | **Cursor** | `.cursor/rules/*.mdc` |
128
+ | **Google Antigravity** | `.agent/rules/*.md` |
129
+ | **Factory AI** | `AGENTS.md`, `.factory/skills/`, `.factory/commands/` |
130
+ | **OpenCode** | `agents.yaml` |
131
+ | **Gemini CLI** | `GEMINI.md` |
129
132
 
130
133
  ## Configuration
131
134
 
@@ -141,10 +144,122 @@ targets:
141
144
  - github
142
145
  - claude
143
146
  - cursor
147
+ - factory
148
+ - opencode
149
+ - gemini
144
150
  ```
145
151
 
146
152
  See the [full configuration reference](https://getpromptscript.dev/reference/config/) for registry auth, watch settings, validation rules, and more.
147
153
 
154
+ ## Detailed Command Usage
155
+
156
+ ### Init
157
+
158
+ ```bash
159
+ prs init [options]
160
+
161
+ Options:
162
+ -n, --name <name> Project name (auto-detected)
163
+ -t, --team <team> Team namespace
164
+ --inherit <path> Inheritance path (e.g., @company/team)
165
+ --registry <path> Registry path
166
+ --targets <targets...> Target AI tools (github, claude, cursor, opencode, gemini, ...)
167
+ -i, --interactive Force interactive mode
168
+ -y, --yes Skip prompts, use defaults
169
+ -f, --force Force reinitialize even if already initialized
170
+ ```
171
+
172
+ **Auto-detection:** Project name, languages, frameworks, and existing AI tool configurations.
173
+
174
+ Creates:
175
+
176
+ - `promptscript.yaml` - Configuration file
177
+ - `.promptscript/project.prs` - Main project file
178
+
179
+ ### Compile
180
+
181
+ ```bash
182
+ prs compile [options]
183
+
184
+ Options:
185
+ -t, --target <target> Specific target (github, claude, cursor, opencode, gemini, ...)
186
+ -a, --all All configured targets (default)
187
+ -w, --watch Watch mode for continuous compilation (uses chokidar)
188
+ -o, --output <dir> Output directory
189
+ --dry-run Preview changes without writing files
190
+ --force Force overwrite existing files without prompts
191
+ --registry <path> Path or URL to registry
192
+ --verbose Show detailed compilation progress
193
+ --debug Show debug information (includes verbose)
194
+ ```
195
+
196
+ **Watch Mode:** Uses [chokidar](https://github.com/paulmillr/chokidar) for reliable file watching across all platforms. Automatically recompiles when `.prs` files change.
197
+
198
+ **Overwrite Protection:** By default, `prs compile` protects user-created files from accidental overwriting. Files generated by PromptScript contain a marker (`> Auto-generated by PromptScript`) and are overwritten silently. For files without this marker:
199
+
200
+ - **Interactive mode:** You'll be prompted to overwrite (y/N/a)
201
+ - **Non-interactive mode:** Compilation fails with a list of conflicting files
202
+
203
+ Use `--force` to skip all prompts and overwrite everything. Use `--dry-run` to preview conflicts before writing.
204
+
205
+ ### Validate
206
+
207
+ ```bash
208
+ prs validate [options]
209
+
210
+ Options:
211
+ --strict Treat warnings as errors
212
+ --format <format> Output format (text, json)
213
+ ```
214
+
215
+ ### Pull Updates
216
+
217
+ ```bash
218
+ prs pull [options]
219
+
220
+ Options:
221
+ -f, --force Force overwrite local files
222
+ ```
223
+
224
+ ### Show Diff
225
+
226
+ ```bash
227
+ prs diff [options]
228
+
229
+ Options:
230
+ -t, --target <target> Specific target to diff
231
+ --full Show full diff without truncation
232
+ --no-pager Disable pager output
233
+ ```
234
+
235
+ By default, diff output is shown through a pager (`less`) for easy scrolling. Use `--no-pager` to disable this behavior. You can customize the pager via the `PAGER` environment variable.
236
+
237
+ ### Check for Updates
238
+
239
+ ```bash
240
+ prs update-check
241
+ ```
242
+
243
+ Checks if a newer version of the CLI is available on npm and displays the result:
244
+
245
+ ```
246
+ @promptscript/cli v1.0.0
247
+ ✓ Up to date
248
+ ```
249
+
250
+ Or if an update is available:
251
+
252
+ ```
253
+ @promptscript/cli v1.0.0
254
+ Update available: 1.0.0 → 1.1.0 (npm i -g @promptscript/cli)
255
+ ```
256
+
257
+ **Automatic Update Checks:** The CLI automatically checks for updates once every 24 hours when running any command. The check is non-blocking and cached locally. To disable automatic checks, set the `PROMPTSCRIPT_NO_UPDATE_CHECK` environment variable:
258
+
259
+ ```bash
260
+ PROMPTSCRIPT_NO_UPDATE_CHECK=1 prs compile
261
+ ```
262
+
148
263
  ## Environment Variables
149
264
 
150
265
  | Variable | Description |