@promptscript/cli 1.3.1 → 1.4.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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **One source of truth for all your AI coding assistants.**
4
4
 
5
- Write AI instructions once in PromptScript, compile to GitHub Copilot, Claude Code, Cursor, Antigravity, and more.
5
+ Write AI instructions once in PromptScript, compile to 37 AI coding agents: GitHub Copilot, Claude Code, Cursor, and more.
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/@promptscript/cli.svg)](https://www.npmjs.com/package/@promptscript/cli)
8
8
  [![CI](https://github.com/mrwogu/promptscript/actions/workflows/ci.yml/badge.svg)](https://github.com/mrwogu/promptscript/actions/workflows/ci.yml)
@@ -12,34 +12,19 @@ Write AI instructions once in PromptScript, compile to GitHub Copilot, Claude Co
12
12
 
13
13
  ## The Problem
14
14
 
15
- Every AI coding tool uses a different config format. As your organization grows, so does the chaos:
15
+ - 50 repos × 37 AI tools = **1,900 files** to keep in sync
16
+ - ❌ Security policy update? Manual changes across every repo
17
+ - ❌ Switching AI tools? Rewrite everything
18
+ - ❌ No audit trail, no inheritance, no validation
16
19
 
17
- ```
18
- 50 repos x 37 AI agents = 1850 files to maintain
19
-
20
- repo-1/CLAUDE.md repo-1/.cursorrules repo-1/.github/copilot-instructions.md
21
- repo-2/CLAUDE.md repo-2/.cursorrules repo-2/.github/copilot-instructions.md
22
- ...
23
- repo-50/CLAUDE.md repo-50/.cursorrules repo-50/.github/copilot-instructions.md
24
- ```
25
-
26
- - A security policy update means editing hundreds of files by hand
27
- - Standards drift across teams and repos
28
- - Switching AI tools means rewriting everything
29
- - No audit trail, no validation, no reuse
30
-
31
- ## The Solution
20
+ ## The Fix
32
21
 
33
- PromptScript lets you **build prompts like code** with inheritance, composition, parameterization, and compilation to any target format:
22
+ PromptScript lets you **build prompts like code** - with inheritance, composition, parameterization, and compilation to any target format.
34
23
 
35
- ```
36
- .promptscript/project.prs --> prs compile --> CLAUDE.md
37
- --> .github/copilot-instructions.md
38
- --> .cursor/rules/project.mdc
39
- --> .agent/rules/project.md
40
- ```
41
-
42
- Update once, propagate everywhere. Version-controlled, validated, vendor-independent.
24
+ - ✅ Write once in `.prs`, compile to **all 37 agents**
25
+ - ✅ Update the source, propagates everywhere automatically
26
+ - ✅ Hierarchical inheritance like code, not copy-paste
27
+ - ✅ Full validation, audit trail, and version pinning
43
28
 
44
29
  ---
45
30
 
@@ -59,7 +44,13 @@ prs compile
59
44
  ### Already have CLAUDE.md or .cursorrules?
60
45
 
61
46
  ```bash
62
- # Auto-detect and migrate existing AI instruction files
47
+ # Import existing AI instruction file to PromptScript
48
+ prs import CLAUDE.md
49
+
50
+ # Preview the conversion without writing files
51
+ prs import .cursorrules --dry-run
52
+
53
+ # Auto-detect and migrate during project init
63
54
  prs init --migrate
64
55
  ```
65
56
 
@@ -87,6 +78,14 @@ prs init --migrate
87
78
  "/review": "Security-focused code review"
88
79
  "/test": "Write unit tests with Vitest"
89
80
  }
81
+
82
+ @skills {
83
+ deploy: {
84
+ description: "Deploy service to production"
85
+ userInvocable: true
86
+ allowedTools: ["Bash", "Read"]
87
+ }
88
+ }
90
89
  ```
91
90
 
92
91
  Run `prs compile` and get correctly formatted output for every AI tool your team uses.
@@ -99,36 +98,41 @@ Run `prs compile` and get correctly formatted output for every AI tool your team
99
98
  | :---------------------- | :------------------------------------------- |
100
99
  | `prs init` | Initialize project with auto-detection |
101
100
  | `prs compile` | Compile to target AI tool formats |
102
- | `prs compile -w` | Watch mode recompile on changes |
101
+ | `prs compile -w` | Watch mode - recompile on changes |
103
102
  | `prs compile --dry-run` | Preview changes without writing files |
104
103
  | `prs validate` | Validate `.prs` files with detailed errors |
105
104
  | `prs diff` | Show diff between source and compiled output |
105
+ | `prs import` | Import existing AI instruction files to .prs |
106
106
  | `prs pull` | Pull updates from registry |
107
107
  | `prs update-check` | Check for newer CLI versions |
108
108
 
109
109
  ## Key Features
110
110
 
111
- - **Inheritance** build org-wide, team-level, and project-level configs that cascade like CSS
112
- - **Composition** reuse fragments across projects with `@use`
113
- - **Parameterized templates** `@inherit @stacks/node(port: 8080, db: "postgres")`
114
- - **Multi-target compilation** one source, any number of AI tools
115
- - **Watch mode** instant recompilation on file changes
116
- - **Overwrite protection** never accidentally clobbers hand-written files
117
- - **Validation** catch errors before they reach your AI tools
118
- - **Registry support** share configs via Git registries (private or public)
119
- - **AI-assisted migration** convert existing `CLAUDE.md`, `.cursorrules`, etc.
111
+ - **Inheritance** - build org-wide, team-level, and project-level configs that cascade like CSS
112
+ - **Composition** - reuse fragments across projects with `@use`
113
+ - **Parameterized templates** - `@inherit @stacks/node(port: 8080, db: "postgres")`
114
+ - **Skills** - define reusable AI skills with `SKILL.md` files, resource bundles, and tool permissions
115
+ - **Multi-target compilation** - one source, any number of AI tools
116
+ - **Watch mode** - instant recompilation on file changes
117
+ - **Overwrite protection** - never accidentally clobbers hand-written files
118
+ - **Validation** - catch errors before they reach your AI tools
119
+ - **Registry support** - share configs via Git registries (private or public)
120
+ - **AI-assisted migration** - convert existing `CLAUDE.md`, `.cursorrules`, etc.
121
+ - **Bundled language skill** - AI agents learn PromptScript syntax via injected SKILL.md
120
122
 
121
123
  ## Supported Targets
122
124
 
123
125
  | AI Tool | Output |
124
126
  | :--------------------- | :---------------------------------------------------- |
125
127
  | **GitHub Copilot** | `.github/copilot-instructions.md`, agents, prompts |
126
- | **Claude Code** | `CLAUDE.md`, skills, local memory |
128
+ | **Claude Code** | `CLAUDE.md`, `.claude/skills/*.md` |
127
129
  | **Cursor** | `.cursor/rules/*.mdc` |
128
130
  | **Google Antigravity** | `.agent/rules/*.md` |
129
131
  | **Factory AI** | `AGENTS.md`, `.factory/skills/`, `.factory/commands/` |
130
- | **OpenCode** | `agents.yaml` |
131
- | **Gemini CLI** | `GEMINI.md` |
132
+ | **OpenCode** | `OPENCODE.md`, `.opencode/commands/*.md` |
133
+ | **Gemini CLI** | `GEMINI.md`, `.gemini/commands/*.toml` |
134
+
135
+ Plus **30 more** agents (Windsurf, Cline, Roo Code, Codex, Continue, Augment, and others). See the [full list](https://getpromptscript.dev/formatters/).
132
136
 
133
137
  ## Configuration
134
138
 
@@ -202,6 +206,20 @@ Options:
202
206
 
203
207
  Use `--force` to skip all prompts and overwrite everything. Use `--dry-run` to preview conflicts before writing.
204
208
 
209
+ ### Import
210
+
211
+ ```bash
212
+ prs import <file> [options]
213
+
214
+ Options:
215
+ -f, --format <format> Source format (claude, github, cursor, generic)
216
+ -o, --output <dir> Output directory (default: .promptscript)
217
+ --dry-run Preview output without writing files
218
+ --validate Run roundtrip validation after import
219
+ ```
220
+
221
+ Imports existing AI instruction files (CLAUDE.md, .cursorrules, copilot-instructions.md) into PromptScript format. Uses heuristic classification to map sections to appropriate `@identity`, `@standards`, `@restrictions`, and `@knowledge` blocks with confidence scoring.
222
+
205
223
  ### Validate
206
224
 
207
225
  ```bash
@@ -281,11 +299,10 @@ docker run --rm -v $(pwd):/workspace ghcr.io/mrwogu/promptscript:latest validate
281
299
 
282
300
  ## Documentation
283
301
 
284
- - [Getting Started](https://getpromptscript.dev/getting-started/) 5-minute quickstart
285
- - [Language Reference](https://getpromptscript.dev/reference/syntax/) full syntax docs
286
- - [Inheritance Guide](https://getpromptscript.dev/guides/inheritance/) composition patterns
287
- - [Migration Guide](https://getpromptscript.dev/guides/migration/) converting existing files
288
- - [Enterprise Guide](https://getpromptscript.dev/guides/enterprise/) — scaling across organizations
302
+ - [Getting Started](https://getpromptscript.dev/getting-started/) - 5-minute quickstart
303
+ - [Language Reference](https://getpromptscript.dev/reference/syntax/) - full syntax docs
304
+ - [Guides](https://getpromptscript.dev/guides/) - inheritance, registry, migration, and more
305
+ - [Enterprise](https://getpromptscript.dev/guides/enterprise/) - scaling across organizations
289
306
 
290
307
  ## License
291
308