@promptscript/cli 1.13.2 → 1.14.1
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/README.md +324 -164
- package/index.js +9737 -1922
- package/package.json +3 -2
- package/skills/promptscript/SKILL.md +68 -26
- package/src/cli.d.ts.map +1 -1
- package/src/commands/check.d.ts +2 -2
- package/src/commands/check.d.ts.map +1 -1
- package/src/commands/compile.d.ts.map +1 -1
- package/src/commands/diff.d.ts +7 -0
- package/src/commands/diff.d.ts.map +1 -1
- package/src/commands/hook.d.ts.map +1 -1
- package/src/commands/hooks.d.ts.map +1 -1
- package/src/commands/import.d.ts +1 -0
- package/src/commands/import.d.ts.map +1 -1
- package/src/commands/init.d.ts +3 -0
- package/src/commands/init.d.ts.map +1 -1
- package/src/commands/inspect.d.ts.map +1 -1
- package/src/commands/lock-reference-scanner.d.ts +8 -8
- package/src/commands/lock-reference-scanner.d.ts.map +1 -1
- package/src/commands/lock-references.d.ts +4 -0
- package/src/commands/lock-references.d.ts.map +1 -0
- package/src/commands/lock-scanner.d.ts +14 -0
- package/src/commands/lock-scanner.d.ts.map +1 -1
- package/src/commands/lock.d.ts +4 -3
- package/src/commands/lock.d.ts.map +1 -1
- package/src/commands/migrate.d.ts +0 -7
- package/src/commands/migrate.d.ts.map +1 -1
- package/src/commands/pull.d.ts.map +1 -1
- package/src/commands/registry/index.d.ts.map +1 -1
- package/src/commands/registry/init.d.ts.map +1 -1
- package/src/commands/registry/list.d.ts +2 -1
- package/src/commands/registry/list.d.ts.map +1 -1
- package/src/commands/registry/publish.d.ts.map +1 -1
- package/src/commands/registry/validate.d.ts.map +1 -1
- package/src/commands/resolve-cmd.d.ts +1 -1
- package/src/commands/resolve-cmd.d.ts.map +1 -1
- package/src/commands/serve.d.ts.map +1 -1
- package/src/commands/skills.d.ts.map +1 -1
- package/src/commands/update.d.ts +0 -3
- package/src/commands/update.d.ts.map +1 -1
- package/src/commands/upgrade.d.ts.map +1 -1
- package/src/commands/validate.d.ts +2 -2
- package/src/commands/validate.d.ts.map +1 -1
- package/src/commands/vendor.d.ts +3 -4
- package/src/commands/vendor.d.ts.map +1 -1
- package/src/config/loader.d.ts +6 -0
- package/src/config/loader.d.ts.map +1 -1
- package/src/output/console.d.ts +2 -0
- package/src/output/console.d.ts.map +1 -1
- package/src/services.d.ts +5 -0
- package/src/services.d.ts.map +1 -1
- package/src/types.d.ts +27 -2
- package/src/types.d.ts.map +1 -1
- package/src/utils/ai-tools-detector.d.ts +1 -1
- package/src/utils/ai-tools-detector.d.ts.map +1 -1
- package/src/utils/backup.d.ts.map +1 -1
- package/src/utils/conflict-detector.d.ts +15 -0
- package/src/utils/conflict-detector.d.ts.map +1 -1
- package/src/utils/managed-output-cleanup.d.ts +30 -0
- package/src/utils/managed-output-cleanup.d.ts.map +1 -0
- package/src/utils/migration-prompt.d.ts +5 -1
- package/src/utils/migration-prompt.d.ts.map +1 -1
- package/src/utils/registry-resolver.d.ts +10 -2
- package/src/utils/registry-resolver.d.ts.map +1 -1
- package/src/utils/version-check.d.ts.map +1 -1
- package/src/utils/write-plan.d.ts +18 -0
- package/src/utils/write-plan.d.ts.map +1 -0
package/README.md
CHANGED
|
@@ -1,236 +1,396 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://github.com/mrwogu/promptscript/actions/workflows/ci.yml)
|
|
5
|
-
[](https://opensource.org/licenses/MIT)
|
|
6
|
-
|
|
7
|
-
**One compiler. 37 AI coding agents. Zero manual syncing.**
|
|
3
|
+
# @promptscript/cli
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
**Agent platform configuration as code**
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
Define instructions, skills, agents, MCP servers, hooks, workflows, and policies once. Compile
|
|
8
|
+
native configuration for 48 AI coding platforms.
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
[](https://www.npmjs.com/package/@promptscript/cli)
|
|
11
|
+
[](https://github.com/mrwogu/promptscript/actions/workflows/ci.yml)
|
|
12
|
+
[](https://github.com/mrwogu/promptscript/blob/main/LICENSE)
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
[**Get started**](https://getpromptscript.dev/getting-started/) ·
|
|
15
|
+
[**Documentation**](https://getpromptscript.dev/) ·
|
|
16
|
+
[**Playground**](https://getpromptscript.dev/playground/) ·
|
|
17
|
+
[**GitHub**](https://github.com/mrwogu/promptscript)
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
</div>
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
- ❌ Security policy update? Manual changes across every repo, for every tool
|
|
21
|
-
- ❌ Switching AI tools? Rewrite instructions, READMEs, and docs everywhere
|
|
22
|
-
- ❌ No inheritance, no validation, no audit trail
|
|
21
|
+
[](https://youtu.be/7sHMn-DbZig)
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
AI coding platforms use different files for instructions, skills, agents, commands, MCP
|
|
24
|
+
integrations, hooks, and settings. PromptScript replaces hand-maintained copies with one validated,
|
|
25
|
+
composable, Git-native source and target-specific compilers.
|
|
25
26
|
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
GEMINI.md
|
|
32
|
-
OPENCODE.md
|
|
33
|
-
... 31 more
|
|
27
|
+
```text
|
|
28
|
+
.promptscript/project.prs
|
|
29
|
+
-> resolve inheritance, imports, and policies
|
|
30
|
+
-> validate language and capabilities
|
|
31
|
+
-> compile deterministic native files
|
|
34
32
|
```
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
- ✅ Hierarchical inheritance - org, team, and project levels cascade like CSS
|
|
38
|
-
- ✅ Full validation catches errors before they reach your AI tools
|
|
39
|
-
- ✅ Version-pinned registries for reproducible builds
|
|
34
|
+
No runtime proxy. Each selected platform keeps consuming its own native configuration.
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
## Install
|
|
42
37
|
|
|
43
|
-
|
|
38
|
+
Requires Node.js 20 or later.
|
|
44
39
|
|
|
45
40
|
```bash
|
|
46
41
|
npm install -g @promptscript/cli
|
|
47
|
-
|
|
48
|
-
prs init # auto-detects your tech stack
|
|
49
|
-
prs compile # outputs to all configured AI tools
|
|
50
42
|
```
|
|
51
43
|
|
|
52
|
-
|
|
44
|
+
Also available through pnpm or yarn:
|
|
53
45
|
|
|
54
46
|
```bash
|
|
55
|
-
|
|
47
|
+
pnpm add -g @promptscript/cli
|
|
48
|
+
yarn global add @promptscript/cli
|
|
56
49
|
```
|
|
57
50
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
### Already have CLAUDE.md or .cursorrules?
|
|
51
|
+
Verify installation:
|
|
61
52
|
|
|
62
53
|
```bash
|
|
63
|
-
prs
|
|
64
|
-
prs migrate # or migrate everything at once
|
|
54
|
+
prs --version
|
|
65
55
|
```
|
|
66
56
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## Use Skills from Anywhere
|
|
70
|
-
|
|
71
|
-
Import skills directly from GitHub - no scripts, no downloads, no manual steps:
|
|
57
|
+
## 60-Second Quick Start
|
|
72
58
|
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
59
|
+
```bash
|
|
60
|
+
prs init
|
|
61
|
+
# Edit .promptscript/project.prs
|
|
62
|
+
prs validate --strict
|
|
63
|
+
prs compile
|
|
77
64
|
```
|
|
78
65
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
66
|
+
`prs init` detects the project stack and installed AI tools, then creates a clean
|
|
67
|
+
`promptscript.yaml` and `.promptscript/project.prs`. Detected targets are preselected, while other
|
|
68
|
+
targets remain explicit choices. For automation, use `prs init --yes --targets claude factory`.
|
|
69
|
+
Pass `--no-hooks` to skip hook installation or `--dry-run` to preview all writes.
|
|
70
|
+
|
|
71
|
+
Generated output can include:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
.github/copilot-instructions.md
|
|
75
|
+
.github/prompts/review.prompt.md
|
|
76
|
+
CLAUDE.md
|
|
77
|
+
.claude/agents/reviewer.md
|
|
78
|
+
.claude/skills/security-review/SKILL.md
|
|
79
|
+
.cursor/rules/project.mdc
|
|
80
|
+
.opencode/agents/reviewer.md
|
|
86
81
|
```
|
|
87
82
|
|
|
88
|
-
|
|
83
|
+
## Define the Platform
|
|
89
84
|
|
|
90
|
-
|
|
85
|
+
`.promptscript/project.prs`:
|
|
91
86
|
|
|
92
87
|
```promptscript
|
|
93
|
-
@meta {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
@use github.com/anthropics/skills/code-review.md@1.0.0
|
|
88
|
+
@meta {
|
|
89
|
+
id: "checkout-service"
|
|
90
|
+
syntax: "1.4.0"
|
|
91
|
+
}
|
|
98
92
|
|
|
99
93
|
@identity {
|
|
100
94
|
"""
|
|
101
|
-
You are
|
|
102
|
-
|
|
95
|
+
You are working on the checkout service.
|
|
96
|
+
Preserve transaction integrity and auditability.
|
|
103
97
|
"""
|
|
104
98
|
}
|
|
105
99
|
|
|
100
|
+
@standards {
|
|
101
|
+
code: ["Use strict TypeScript", "Test every business rule"]
|
|
102
|
+
}
|
|
103
|
+
|
|
106
104
|
@shortcuts {
|
|
107
|
-
"/review":
|
|
108
|
-
|
|
105
|
+
"/review": {
|
|
106
|
+
prompt: true
|
|
107
|
+
description: "Review current changes"
|
|
108
|
+
content: "Review correctness, security, tests, and operational impact."
|
|
109
|
+
}
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
@skills {
|
|
112
|
-
security-
|
|
113
|
-
description: "
|
|
114
|
-
userInvocable: true
|
|
113
|
+
security-review: {
|
|
114
|
+
description: "Review payment changes for security risks"
|
|
115
115
|
allowedTools: ["Read", "Grep", "Bash"]
|
|
116
|
-
|
|
117
|
-
inputs:
|
|
118
|
-
|
|
116
|
+
content: "Inspect authentication, authorization, secrets, and payment data handling."
|
|
117
|
+
inputs: {
|
|
118
|
+
targetPath: {
|
|
119
|
+
description: "Path to review"
|
|
120
|
+
type: "string"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
outputs: {
|
|
124
|
+
report: {
|
|
125
|
+
description: "Review report"
|
|
126
|
+
type: "string"
|
|
127
|
+
}
|
|
128
|
+
highestSeverity: {
|
|
129
|
+
description: "Highest detected severity"
|
|
130
|
+
type: "enum"
|
|
131
|
+
options: [low, medium, high, critical]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@mcpServers {
|
|
138
|
+
issue-tracker: {
|
|
139
|
+
transport: "stdio"
|
|
140
|
+
command: ["node", "./tools/issues.mjs"]
|
|
119
141
|
}
|
|
120
142
|
}
|
|
121
143
|
|
|
122
144
|
@agents {
|
|
123
|
-
reviewer: {
|
|
124
|
-
|
|
145
|
+
reviewer: {
|
|
146
|
+
description: "Review changes before merge"
|
|
147
|
+
tools: ["Read", "Grep", "Glob", "Bash"]
|
|
148
|
+
skills: ["security-review"]
|
|
149
|
+
mcpServers: ["issue-tracker"]
|
|
150
|
+
content: "Review changed code, tests, and operational impact."
|
|
151
|
+
}
|
|
125
152
|
}
|
|
126
|
-
```
|
|
127
153
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
Plus **30 more**: Windsurf, Cline, Roo Code, Codex, Continue, Augment, and others. See the [full list](https://getpromptscript.dev/formatters/).
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Key Features
|
|
149
|
-
|
|
150
|
-
| Feature | What it does |
|
|
151
|
-
| :--------------------------- | :----------------------------------------------------------------------------- |
|
|
152
|
-
| **Inheritance** | Org -> team -> project configs that cascade like CSS |
|
|
153
|
-
| **Composition** | Reuse fragments and skills with `@use` |
|
|
154
|
-
| **Markdown imports** | `@use` plain `.md` files and GitHub skills directly |
|
|
155
|
-
| **Parameterized templates** | `@inherit @stacks/node(port: 8080, db: "postgres")` |
|
|
156
|
-
| **Skills** | SKILL.md files with resource bundles, tool permissions, input/output contracts |
|
|
157
|
-
| **Sub-agents** | `@agents` block compiles to Claude / Factory native agents |
|
|
158
|
-
| **Multi-target compilation** | One source, any number of AI tools (37 supported) |
|
|
159
|
-
| **Hooks** | `prs hooks install --all` auto-recompiles + protects outputs |
|
|
160
|
-
| **Watch mode** | `prs compile -w` for instant recompilation |
|
|
161
|
-
| **Overwrite protection** | Never accidentally clobbers hand-written files |
|
|
162
|
-
| **Validation** | `prs validate --strict --format json` for CI |
|
|
163
|
-
| **Registry support** | Share configs via Git registries (private or public) |
|
|
164
|
-
| **Lockfile** | `promptscript.lock` for reproducible builds across repos |
|
|
165
|
-
| **Vendor mode** | `prs vendor sync` for offline / air-gapped CI |
|
|
166
|
-
| **Migration** | Import existing CLAUDE.md, .cursorrules with `prs import` |
|
|
167
|
-
|
|
168
|
-
## Commands
|
|
169
|
-
|
|
170
|
-
| Command | Description |
|
|
171
|
-
| :------------------------------------ | :----------------------------------------------------- |
|
|
172
|
-
| `prs init` | Initialize project with auto-detection |
|
|
173
|
-
| `prs compile` | Compile to all target formats |
|
|
174
|
-
| `prs compile -w` | Watch mode, recompile on changes |
|
|
175
|
-
| `prs compile --dry-run` | Preview without writing files |
|
|
176
|
-
| `prs compile --strict` | Fail on output path conflicts |
|
|
177
|
-
| `prs build <profile>` | Compile a named build profile from `promptscript.yaml` |
|
|
178
|
-
| `prs validate` | Validate `.prs` files with detailed errors |
|
|
179
|
-
| `prs validate --strict --format json` | Machine-readable output for CI pipelines |
|
|
180
|
-
| `prs validate --fix` | Auto-fix syntax version mismatches |
|
|
181
|
-
| `prs inspect <skill>` | Show skill composition layers and provenance |
|
|
182
|
-
| `prs diff` | Show diff between source and compiled output |
|
|
183
|
-
| `prs check` | Check configuration and dependencies health |
|
|
184
|
-
| `prs hooks install --all` | Install auto-compile + overwrite-protection hooks |
|
|
185
|
-
| `prs hooks uninstall <tool>` | Remove hooks for a specific tool |
|
|
186
|
-
| `prs lock` | Generate / update `promptscript.lock` |
|
|
187
|
-
| `prs lock --update` | Force re-hash of all registry references |
|
|
188
|
-
| `prs update [package]` | Re-resolve versions and update lockfile |
|
|
189
|
-
| `prs vendor sync` | Mirror all cached deps to `.promptscript/vendor/` |
|
|
190
|
-
| `prs vendor check` | Verify vendor directory matches lockfile |
|
|
191
|
-
| `prs skills add <source>` | Add a remote skill (GitHub URL or alias) |
|
|
192
|
-
| `prs skills list` | List installed skills |
|
|
193
|
-
| `prs skills update [name]` | Update markdown-sourced skill lock entries |
|
|
194
|
-
| `prs skills remove <name>` | Remove a skill from the project |
|
|
195
|
-
| `prs registry ...` | Manage registries (publish, add, list) |
|
|
196
|
-
| `prs resolve <import>` | Show full resolution chain for an import (debug) |
|
|
197
|
-
| `prs import` | Import existing AI instruction files |
|
|
198
|
-
| `prs migrate` | Migrate all existing instructions at once |
|
|
199
|
-
| `prs upgrade` | Upgrade `.prs` files to latest syntax version |
|
|
200
|
-
| `prs pull` | Pull updates from registry |
|
|
201
|
-
| `prs serve` | Start local playground server |
|
|
202
|
-
|
|
203
|
-
## Configuration
|
|
154
|
+
@hooks {
|
|
155
|
+
validate-changes: {
|
|
156
|
+
event: "post-tool-use"
|
|
157
|
+
matcher: "Edit|Write"
|
|
158
|
+
command: ["npm", "run", "typecheck"]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@workflows {
|
|
163
|
+
release: {
|
|
164
|
+
description: "Prepare a validated release"
|
|
165
|
+
content: "Run quality gates, summarize changes, and prepare release metadata."
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
204
169
|
|
|
205
170
|
`promptscript.yaml`:
|
|
206
171
|
|
|
207
172
|
```yaml
|
|
208
|
-
|
|
173
|
+
id: checkout-service
|
|
174
|
+
syntax: '1.4.0'
|
|
175
|
+
|
|
209
176
|
input:
|
|
210
|
-
entry:
|
|
177
|
+
entry: .promptscript/project.prs
|
|
178
|
+
|
|
211
179
|
targets:
|
|
212
|
-
- github
|
|
213
|
-
|
|
214
|
-
-
|
|
180
|
+
- github:
|
|
181
|
+
version: multifile
|
|
182
|
+
- claude:
|
|
183
|
+
version: full
|
|
184
|
+
- cursor:
|
|
185
|
+
version: full
|
|
186
|
+
- opencode:
|
|
187
|
+
version: full
|
|
188
|
+
- gemini:
|
|
189
|
+
version: full
|
|
215
190
|
```
|
|
216
191
|
|
|
192
|
+
Run `prs compile`. Formatters map each supported capability to native target files and omit
|
|
193
|
+
unsupported platform-specific features.
|
|
194
|
+
|
|
195
|
+
## What PromptScript Manages
|
|
196
|
+
|
|
197
|
+
| Capability | Source | Result |
|
|
198
|
+
| :---------------------- | :---------------------------------------------------------------- | :------------------------------------------------------------------------------- |
|
|
199
|
+
| Instructions and policy | `@identity`, `@context`, `@standards`, `@restrictions`, `@guards` | Main instructions and scoped rules |
|
|
200
|
+
| Portable skills | `@skills` | Native skill directories with references, assets, scripts, and contracts |
|
|
201
|
+
| Specialist agents | `@agents` | Native Markdown, TOML, or droid files with models, tools, skills, and MCP access |
|
|
202
|
+
| User commands | `@shortcuts` | Native prompts, commands, or documented shortcuts |
|
|
203
|
+
| Tool integrations | `@mcpServers` | Platform-specific MCP configuration |
|
|
204
|
+
| Capability bundles | `@plugins` | Native plugin manifests where supported |
|
|
205
|
+
| Automation | `@hooks`, `@workflows` | Lifecycle hooks and repeatable workflow files |
|
|
206
|
+
| Monorepo delivery | `builds` in `promptscript.yaml` | Scoped output for packages and applications |
|
|
207
|
+
|
|
208
|
+
## 48 Built-In Targets
|
|
209
|
+
|
|
210
|
+
| Platform | Primary and rich output |
|
|
211
|
+
| :------------- | :--------------------------------------------------------------- |
|
|
212
|
+
| GitHub Copilot | `.github/copilot-instructions.md`, agents, skills, prompts |
|
|
213
|
+
| Claude Code | `CLAUDE.md`, `.claude/agents/`, `.claude/skills/<name>/SKILL.md` |
|
|
214
|
+
| Cursor | `.cursor/rules/`, `.cursor/agents/`, commands, MCP and hooks |
|
|
215
|
+
| Factory AI | `AGENTS.md`, `.factory/droids/`, skills, MCP, hooks and plugins |
|
|
216
|
+
| Codex | `AGENTS.md`, `.codex/agents/*.toml`, skills and config |
|
|
217
|
+
| OpenCode | `OPENCODE.md`, agents, skills and commands |
|
|
218
|
+
| Gemini CLI | `GEMINI.md`, commands and interoperable skills |
|
|
219
|
+
| Antigravity | `.agent/rules/`, workflows and MCP configuration |
|
|
220
|
+
| Grok | `AGENTS.md`, agents, skills, commands and integrations |
|
|
221
|
+
|
|
222
|
+
PromptScript also supports 10 AGENTS.md targets and 29 Markdown instruction targets, including
|
|
223
|
+
Windsurf, Cline, Roo Code, Continue, Aider, Amazon Q, Warp, Zed, OpenHands, Qwen Code, Kimi, Mimo,
|
|
224
|
+
Deep Agents, and ForgeCode.
|
|
225
|
+
|
|
226
|
+
See the [complete target and capability matrix](https://getpromptscript.dev/reference/formatters/).
|
|
227
|
+
|
|
228
|
+
## Skills from Local Files, Registries, or Git
|
|
229
|
+
|
|
230
|
+
```promptscript
|
|
231
|
+
@use ./skills/security-review.md
|
|
232
|
+
@use @company/skills/release@^2.0.0
|
|
233
|
+
@use github.com/acme/agent-skills/database-review@1.3.0
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Skill directories can bundle `SKILL.md`, references, scripts, assets, and licenses while preserving
|
|
237
|
+
their directory structure:
|
|
238
|
+
|
|
239
|
+
```text
|
|
240
|
+
security-review/
|
|
241
|
+
├── SKILL.md
|
|
242
|
+
├── references/threat-model.md
|
|
243
|
+
├── scripts/scan.sh
|
|
244
|
+
└── assets/report-template.md
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Manage remote skills from the CLI:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
prs skills add github.com/acme/agent-skills/security-review@2.1.0
|
|
251
|
+
prs skills list
|
|
252
|
+
prs skills update
|
|
253
|
+
prs skills remove security-review
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Remote imports are recorded in `promptscript.lock` with commit and SHA-256 integrity data.
|
|
257
|
+
|
|
258
|
+
## Composition and Governance
|
|
259
|
+
|
|
260
|
+
```promptscript
|
|
261
|
+
@inherit @company/platform
|
|
262
|
+
@use @team/backend
|
|
263
|
+
|
|
264
|
+
@extend standards {
|
|
265
|
+
testing!: ["Use Vitest", "Require 95% coverage"]
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
- Inherit organization, team, and project layers.
|
|
270
|
+
- Compose local files, Markdown skills, aliases, and direct Git imports.
|
|
271
|
+
- Extend selected paths with deterministic merges, explicit replacement, negation, and sealed
|
|
272
|
+
properties.
|
|
273
|
+
- Pass typed parameters to reusable templates.
|
|
274
|
+
- Enforce layer boundaries, protected properties, and registry allowlists with policies.
|
|
275
|
+
- Inspect skill provenance with `prs inspect <skill>`.
|
|
276
|
+
- Build reproducibly with version pins, lockfile integrity, and vendor mode.
|
|
277
|
+
|
|
278
|
+
## Monorepo Build Profiles
|
|
279
|
+
|
|
280
|
+
Create scoped builds in `promptscript.yaml`:
|
|
281
|
+
|
|
282
|
+
```yaml
|
|
283
|
+
builds:
|
|
284
|
+
api:
|
|
285
|
+
entry: .promptscript/packages/api.prs
|
|
286
|
+
output: packages/api
|
|
287
|
+
targets:
|
|
288
|
+
- factory
|
|
289
|
+
codex-api:
|
|
290
|
+
entry: .promptscript/packages/api.prs
|
|
291
|
+
output: packages/api
|
|
292
|
+
targets:
|
|
293
|
+
- codex:
|
|
294
|
+
output: AGENTS.override.md
|
|
295
|
+
agentsFile: AGENTS.override.md
|
|
296
|
+
web:
|
|
297
|
+
entry: .promptscript/packages/web.prs
|
|
298
|
+
output: packages/web
|
|
299
|
+
targets:
|
|
300
|
+
- cursor:
|
|
301
|
+
version: full
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
prs build api
|
|
306
|
+
prs build codex-api
|
|
307
|
+
prs compile --build web
|
|
308
|
+
prs compile --all-builds
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Migrate Existing Instructions
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
prs import CLAUDE.md
|
|
315
|
+
prs import .github/copilot-instructions.md
|
|
316
|
+
prs migrate --static --dry-run
|
|
317
|
+
prs migrate --static
|
|
318
|
+
prs migrate --llm
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Static migration deterministically imports detected instruction files. AI-assisted migration
|
|
322
|
+
generates a migration prompt and installs the PromptScript skill. Existing source instructions
|
|
323
|
+
remain untouched, and existing PromptScript configuration is preserved byte-for-byte. Static output is isolated under
|
|
324
|
+
`.promptscript/migrated/`; no detected candidates means no writes.
|
|
325
|
+
|
|
326
|
+
Preview before writing:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
prs compile --dry-run
|
|
330
|
+
prs diff --all
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## CLI Commands
|
|
334
|
+
|
|
335
|
+
| Command | Purpose |
|
|
336
|
+
| :-------------------------------------------------- | :------------------------------------------------------- |
|
|
337
|
+
| `prs init` | Detect project context and initialize PromptScript |
|
|
338
|
+
| `prs compile` | Compile all configured targets |
|
|
339
|
+
| `prs compile --watch` | Recompile when source changes |
|
|
340
|
+
| `prs build <name>` | Compile one named build profile |
|
|
341
|
+
| `prs compile --all-builds` | Compile every named profile |
|
|
342
|
+
| `prs validate --strict` | Validate source, references, policies, and capabilities |
|
|
343
|
+
| `prs validate --fix` | Upgrade outdated syntax declarations when possible |
|
|
344
|
+
| `prs diff --all` | Preview compiled output differences |
|
|
345
|
+
| `prs inspect <skill>` | Show skill layers and property provenance |
|
|
346
|
+
| `prs hooks install [tool]` | Integrate supported AI tools and protect generated files |
|
|
347
|
+
| `prs skills <add\|remove\|list\|update>` | Manage remote Markdown skills |
|
|
348
|
+
| `prs registry <init\|validate\|publish\|list\|add>` | Manage registries and aliases |
|
|
349
|
+
| `prs lock` / `prs update` | Pin or refresh remote dependencies |
|
|
350
|
+
| `prs vendor sync` / `prs vendor check` | Prepare and verify offline dependencies |
|
|
351
|
+
| `prs resolve <import>` | Explain import resolution |
|
|
352
|
+
| `prs import <file>` / `prs migrate` | Adopt existing instruction files |
|
|
353
|
+
| `prs upgrade` | Upgrade `.prs` syntax versions |
|
|
354
|
+
| `prs serve` | Connect local files to the online playground |
|
|
355
|
+
|
|
356
|
+
See the [complete CLI reference](https://getpromptscript.dev/reference/cli/) for every option.
|
|
357
|
+
|
|
358
|
+
## Hooks and Generated-File Protection
|
|
359
|
+
|
|
360
|
+
PromptScript has two separate automation layers:
|
|
361
|
+
|
|
362
|
+
- `@hooks` compiles portable lifecycle events to native target hook configuration.
|
|
363
|
+
- `prs hooks install` integrates supported AI tools, recompiles after their `.prs` edit events, and
|
|
364
|
+
redirects direct edits of generated files back to PromptScript source.
|
|
365
|
+
|
|
366
|
+
Use `prs compile --watch` for changes made in a general-purpose editor.
|
|
367
|
+
|
|
368
|
+
Targets with native skill support can receive the bundled PromptScript language skill, allowing
|
|
369
|
+
compatible agents to work with `.prs` source. Disable it with
|
|
370
|
+
`includePromptScriptSkill: false`.
|
|
371
|
+
|
|
217
372
|
## Docker
|
|
218
373
|
|
|
219
374
|
```bash
|
|
220
|
-
docker run --rm -v $(pwd):/workspace ghcr.io/mrwogu/promptscript:latest compile
|
|
375
|
+
docker run --rm -v "$(pwd):/workspace" ghcr.io/mrwogu/promptscript:latest compile
|
|
221
376
|
```
|
|
222
377
|
|
|
223
378
|
## Editor Support
|
|
224
379
|
|
|
225
|
-
Install the
|
|
380
|
+
Install the
|
|
381
|
+
[PromptScript VS Code extension](https://marketplace.visualstudio.com/items?itemName=promptscript.promptscript-language)
|
|
382
|
+
for syntax highlighting, bracket matching, code folding, and file icons.
|
|
226
383
|
|
|
227
384
|
## Documentation
|
|
228
385
|
|
|
229
|
-
- [Getting Started](https://getpromptscript.dev/getting-started/)
|
|
230
|
-
- [
|
|
231
|
-
- [
|
|
232
|
-
- [
|
|
386
|
+
- [Getting Started](https://getpromptscript.dev/getting-started/)
|
|
387
|
+
- [Agent Platform](https://getpromptscript.dev/features/)
|
|
388
|
+
- [Language Reference](https://getpromptscript.dev/reference/language/)
|
|
389
|
+
- [Configuration Reference](https://getpromptscript.dev/reference/config/)
|
|
390
|
+
- [Target Matrix](https://getpromptscript.dev/reference/formatters/)
|
|
391
|
+
- [Enterprise Guide](https://getpromptscript.dev/guides/enterprise/)
|
|
392
|
+
- [Playground](https://getpromptscript.dev/playground/)
|
|
233
393
|
|
|
234
394
|
## License
|
|
235
395
|
|
|
236
|
-
MIT
|
|
396
|
+
[MIT](https://github.com/mrwogu/promptscript/blob/main/LICENSE)
|