@promptscript/cli 1.0.0-alpha.1 → 1.0.0-alpha.10

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 (37) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/README.md +56 -9
  3. package/index.js +16213 -18545
  4. package/package.json +29 -17
  5. package/src/cli.d.ts.map +1 -1
  6. package/src/commands/compile.d.ts +2 -1
  7. package/src/commands/compile.d.ts.map +1 -1
  8. package/src/commands/diff.d.ts.map +1 -1
  9. package/src/commands/init.d.ts.map +1 -1
  10. package/src/commands/update-check.d.ts +6 -0
  11. package/src/commands/update-check.d.ts.map +1 -0
  12. package/src/commands/validate.d.ts.map +1 -1
  13. package/src/index.d.ts +3 -0
  14. package/src/index.d.ts.map +1 -1
  15. package/src/output/console.d.ts +15 -1
  16. package/src/output/console.d.ts.map +1 -1
  17. package/src/prettier/index.d.ts +2 -0
  18. package/src/prettier/index.d.ts.map +1 -0
  19. package/src/prettier/loader.d.ts +36 -0
  20. package/src/prettier/loader.d.ts.map +1 -0
  21. package/src/services.d.ts +1 -0
  22. package/src/services.d.ts.map +1 -1
  23. package/src/templates/migrate-skill.d.ts +9 -0
  24. package/src/templates/migrate-skill.d.ts.map +1 -0
  25. package/src/types.d.ts +4 -2
  26. package/src/types.d.ts.map +1 -1
  27. package/src/utils/ai-tools-detector.d.ts +10 -0
  28. package/src/utils/ai-tools-detector.d.ts.map +1 -1
  29. package/src/utils/manifest-loader.d.ts +157 -0
  30. package/src/utils/manifest-loader.d.ts.map +1 -0
  31. package/src/utils/registry-resolver.d.ts +41 -0
  32. package/src/utils/registry-resolver.d.ts.map +1 -0
  33. package/src/utils/suggestion-engine.d.ts +56 -0
  34. package/src/utils/suggestion-engine.d.ts.map +1 -0
  35. package/src/utils/version-check.d.ts +48 -0
  36. package/src/utils/version-check.d.ts.map +1 -0
  37. package/package.publish.json +0 -32
package/CHANGELOG.md CHANGED
@@ -5,6 +5,129 @@ 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.0.0-alpha.10](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2026-01-31)
9
+
10
+
11
+ ### chore
12
+
13
+ * prepare alpha release ([c6595b6](https://github.com/mrwogu/promptscript/commit/c6595b6fd639f93f0093c503e8468fbbbf057cf9))
14
+
15
+ ## [1.0.0-alpha.9](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2026-01-30)
16
+
17
+
18
+ ### chore
19
+
20
+ * prepare alpha release ([ce96d95](https://github.com/mrwogu/promptscript/commit/ce96d954ae0a015689dda443effc7e80ce80dec5))
21
+
22
+
23
+ ### Features
24
+
25
+ * **docs:** add interactive terminal demos to homepage and getting started ([b2f781b](https://github.com/mrwogu/promptscript/commit/b2f781b45d57862026e5c8ab8cb4525ccacbbd15))
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **cli:** correct version detection in bundled package ([28c15a2](https://github.com/mrwogu/promptscript/commit/28c15a2622c92e99051854868a45825cbedf80cc))
31
+ * **cli:** use universal migration hint instead of Claude Code specific ([ff2e731](https://github.com/mrwogu/promptscript/commit/ff2e731371840b95ed2378755ff431399903c3c2))
32
+
33
+ ## [1.0.0-alpha.8](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2026-01-30)
34
+
35
+
36
+ ### chore
37
+
38
+ * prepare alpha release ([7b1fe19](https://github.com/mrwogu/promptscript/commit/7b1fe197b1ddc9b0fec87c407f557fbaa67113fd))
39
+
40
+ ## [1.0.0-alpha.7](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2026-01-28)
41
+
42
+
43
+ ### chore
44
+
45
+ * prepare alpha release ([9f2f1ed](https://github.com/mrwogu/promptscript/commit/9f2f1ed61923048312206118ff1e0a10679f9899))
46
+
47
+
48
+ ### Features
49
+
50
+ * **cli:** add registry manifest support for init command ([790ae31](https://github.com/mrwogu/promptscript/commit/790ae312bfef2cb80a74feb6ccbb334f15a3985b))
51
+
52
+ ## [1.0.0-alpha.6](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2026-01-28)
53
+
54
+
55
+ ### chore
56
+
57
+ * prepare alpha release ([970c1c8](https://github.com/mrwogu/promptscript/commit/970c1c8c6bc2ebdc4a508314ce7c9c38ddc10a6d))
58
+
59
+
60
+ ### Features
61
+
62
+ * **cli:** add --migrate flag to init command for AI-assisted migration ([3e567c6](https://github.com/mrwogu/promptscript/commit/3e567c606ddff779b841f76615a2aac93e35dec3))
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * **cli:** skip writing unchanged files during compilation ([8542512](https://github.com/mrwogu/promptscript/commit/854251214d927dd5f5dea0aea04a65e0f96819a2))
68
+
69
+ ## [1.0.0-alpha.5](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2026-01-27)
70
+
71
+
72
+ ### chore
73
+
74
+ * prepare alpha release ([54696c9](https://github.com/mrwogu/promptscript/commit/54696c93e27cf9fc2f09dd730b09e568d0dc425e))
75
+
76
+
77
+ ### Features
78
+
79
+ * **cli:** add AI-assisted migration skill and CLI integration ([53e9cca](https://github.com/mrwogu/promptscript/commit/53e9cca8669a30e787cbc2aa7679bb63f7896fce))
80
+ * **cli:** add verbose and debug logging throughout compilation pipeline ([36bd63a](https://github.com/mrwogu/promptscript/commit/36bd63a2fa1dde1acbfd0794bb174f645ef71335))
81
+
82
+
83
+ ### Bug Fixes
84
+
85
+ * **cli:** add migrationCandidates to test mocks ([d8fe117](https://github.com/mrwogu/promptscript/commit/d8fe117ff5523bb5b1c15996e00d8c24548c7b8f))
86
+ * **cli:** extend marker detection from 10 to 20 lines ([229e9bc](https://github.com/mrwogu/promptscript/commit/229e9bc5bf4d0441c9674e6483a5125347b6f0b8))
87
+
88
+ ## [1.0.0-alpha.4](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2026-01-27)
89
+
90
+
91
+ ### ⚠ BREAKING CHANGES
92
+
93
+ * **compiler:** Generated files now have compact marker instead of verbose header. Existing files with legacy marker still recognized.
94
+
95
+ ### chore
96
+
97
+ * prepare alpha release ([8c3a428](https://github.com/mrwogu/promptscript/commit/8c3a428856bc088fb27a4fdd6a16185fe5e63589))
98
+
99
+
100
+ ### Features
101
+
102
+ * **compiler:** add compact PromptScript marker to all outputs ([6d74480](https://github.com/mrwogu/promptscript/commit/6d744800a4ab38030b6c23b2ab949c79977ab12e))
103
+
104
+ ## [1.0.0-alpha.3](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2026-01-27)
105
+
106
+
107
+ ### chore
108
+
109
+ * prepare alpha release ([8bb0fb2](https://github.com/mrwogu/promptscript/commit/8bb0fb2e643566af2fed08a5cd7bc17420c4dd96))
110
+
111
+
112
+ ### Features
113
+
114
+ * **cli:** add file overwrite protection for prs compile ([9213a1d](https://github.com/mrwogu/promptscript/commit/9213a1d6edecff54333c65226a2ede8ff20ae417))
115
+ * **formatting:** add dynamic Prettier configuration support ([c7ceca1](https://github.com/mrwogu/promptscript/commit/c7ceca13928df3449d3ac9f16b1c4749cc48dc2f))
116
+
117
+ ## [1.0.0-alpha.2](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2026-01-24)
118
+
119
+
120
+ ### chore
121
+
122
+ * prepare alpha.2 release ([449fbcc](https://github.com/mrwogu/promptscript/commit/449fbccc119d34ab2a674cbfcd8cc4cc3012d108))
123
+
124
+
125
+ ### Bug Fixes
126
+
127
+ * **cli:** resolve ESM dynamic require error for simple-git ([748a401](https://github.com/mrwogu/promptscript/commit/748a401377b5b58dff1935b94543f65f11f5360c))
128
+ * **formatters:** read devCommands and postWork from [@knowledge](https://github.com/knowledge) block ([83a2727](https://github.com/mrwogu/promptscript/commit/83a272707bf3550142ae440f1a595657bb5704e9))
129
+ * sync package.publish.json keywords and description ([ae7481f](https://github.com/mrwogu/promptscript/commit/ae7481fe64639420ba38fc98ea1349bca17cb91d))
130
+
8
131
  ## [1.0.0-alpha.1](https://github.com/mrwogu/promptscript/compare/v1.0.0-alpha.1...v1.0.0-alpha.1) (2026-01-23)
9
132
 
10
133
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @promptscript/cli
2
2
 
3
- > Part of the [PromptScript](https://github.com/mrwogu/promptscript) ecosystem - The Infrastructure-as-Code for AI Context.
3
+ > Part of the [PromptScript](https://github.com/mrwogu/promptscript) ecosystem - The Prompt-as-Code for AI Instructions.
4
4
 
5
5
  Command-line interface for PromptScript. Compile, validate, and manage AI instructions at enterprise scale.
6
6
 
@@ -8,16 +8,17 @@ Command-line interface for PromptScript. Compile, validate, and manage AI instru
8
8
 
9
9
  The CLI bundles all internal packages into a single distributable:
10
10
 
11
- ```text
11
+ ```
12
12
  @promptscript/cli (published)
13
13
 
14
- └─► bundles:
15
- ├─► compiler
16
- │ ├─► parser
17
- ├─► resolver
18
- ├─► validator
19
- └─► formatters
20
- └─► core
14
+ ├─► compiler (pipeline orchestration)
15
+ ├─► resolver
16
+ │ ├─► validator ─────► core
17
+ └─► formatters ────► core
18
+
19
+ └─► resolver (inheritance & import resolution)
20
+ ├─► parser ────────► core
21
+ └───────────────────► core
21
22
  ```
22
23
 
23
24
  See the [PromptScript monorepo](https://github.com/mrwogu/promptscript) for development details.
@@ -66,11 +67,21 @@ Options:
66
67
  -w, --watch Watch mode for continuous compilation (uses chokidar)
67
68
  -o, --output <dir> Output directory
68
69
  --dry-run Preview changes without writing files
70
+ --force Force overwrite existing files without prompts
69
71
  --registry <path> Path or URL to registry
72
+ --verbose Show detailed compilation progress
73
+ --debug Show debug information (includes verbose)
70
74
  ```
71
75
 
72
76
  **Watch Mode:** Uses [chokidar](https://github.com/paulmillr/chokidar) for reliable file watching across all platforms. Automatically recompiles when `.prs` files change.
73
77
 
78
+ **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:
79
+
80
+ - **Interactive mode:** You'll be prompted to overwrite (y/N/a)
81
+ - **Non-interactive mode:** Compilation fails with a list of conflicting files
82
+
83
+ Use `--force` to skip all prompts and overwrite everything. Use `--dry-run` to preview conflicts before writing.
84
+
74
85
  ### Validate
75
86
 
76
87
  ```bash
@@ -103,6 +114,42 @@ Options:
103
114
 
104
115
  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.
105
116
 
117
+ ### Check for Updates
118
+
119
+ ```bash
120
+ prs update-check
121
+ ```
122
+
123
+ Checks if a newer version of the CLI is available on npm and displays the result:
124
+
125
+ ```
126
+ @promptscript/cli v1.0.0
127
+ ✓ Up to date
128
+ ```
129
+
130
+ Or if an update is available:
131
+
132
+ ```
133
+ @promptscript/cli v1.0.0
134
+ Update available: 1.0.0 → 1.1.0 (npm i -g @promptscript/cli)
135
+ ```
136
+
137
+ **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:
138
+
139
+ ```bash
140
+ PROMPTSCRIPT_NO_UPDATE_CHECK=1 prs compile
141
+ ```
142
+
143
+ ## Environment Variables
144
+
145
+ | Variable | Description |
146
+ | ------------------------------ | ---------------------------------------------- |
147
+ | `PROMPTSCRIPT_NO_UPDATE_CHECK` | Set to `1` to disable automatic update checks |
148
+ | `PROMPTSCRIPT_VERBOSE` | Set to `1` to enable verbose output |
149
+ | `PROMPTSCRIPT_DEBUG` | Set to `1` to enable debug output |
150
+ | `PAGER` | Custom pager for diff output (default: `less`) |
151
+ | `NO_COLOR` | Set to disable colored output |
152
+
106
153
  ## Configuration
107
154
 
108
155
  Create a `promptscript.yaml` file: