@promptscript/cli 1.0.0-alpha.4 → 1.0.0-alpha.6

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/package.json CHANGED
@@ -1,50 +1,51 @@
1
1
  {
2
2
  "name": "@promptscript/cli",
3
- "version": "1.0.0-alpha.4",
3
+ "version": "1.0.0-alpha.6",
4
4
  "description": "CLI for PromptScript - standardize AI instructions across GitHub Copilot, Claude, Cursor and other AI tools",
5
+ "keywords": [
6
+ "cli",
7
+ "enterprise",
8
+ "typescript",
9
+ "devtools",
10
+ "infrastructure-as-code",
11
+ "cursor",
12
+ "developer-experience",
13
+ "governance",
14
+ "claude",
15
+ "ai-tools",
16
+ "github-copilot",
17
+ "llm",
18
+ "prompt-engineering",
19
+ "promptscript",
20
+ "antigravity",
21
+ "promptops"
22
+ ],
5
23
  "repository": {
6
24
  "type": "git",
7
25
  "url": "https://github.com/mrwogu/promptscript.git",
8
26
  "directory": "packages/cli"
9
27
  },
28
+ "license": "MIT",
10
29
  "publishConfig": {
11
30
  "access": "public"
12
31
  },
13
32
  "type": "module",
14
33
  "main": "./index.js",
34
+ "types": "./src/index.d.ts",
15
35
  "bin": {
16
36
  "prs": "./bin/prs.js",
17
37
  "promptscript": "./bin/prs.js"
18
38
  },
39
+ "engines": {
40
+ "node": ">=18"
41
+ },
19
42
  "dependencies": {
20
43
  "@inquirer/prompts": "^8.2.0",
21
44
  "chalk": "^5.6.2",
22
45
  "chokidar": "^5.0.0",
23
46
  "commander": "^14.0.2",
24
47
  "ora": "^9.0.0",
25
- "simple-git": "^3.22.0",
26
- "yaml": "^2.8.2"
27
- },
28
- "engines": {
29
- "node": ">=18"
30
- },
31
- "keywords": [
32
- "cli",
33
- "enterprise",
34
- "typescript",
35
- "devtools",
36
- "infrastructure-as-code",
37
- "cursor",
38
- "developer-experience",
39
- "governance",
40
- "claude",
41
- "ai-tools",
42
- "github-copilot",
43
- "llm",
44
- "prompt-engineering",
45
- "promptscript",
46
- "antigravity",
47
- "promptops"
48
- ],
49
- "license": "MIT"
48
+ "yaml": "^2.8.2",
49
+ "simple-git": "^3.22.0"
50
+ }
50
51
  }
package/src/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/cli.ts"],"names":[],"mappings":";AAwGA;;;GAGG;AACH,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,IAAI,CAEvD"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/cli.ts"],"names":[],"mappings":";AA8GA;;;GAGG;AACH,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,IAAI,CAEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/compile.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQlD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAkOzE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CA4Ef"}
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/compile.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQlD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AA6RzE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAqFf"}
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAKzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyB/C;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CA+Ef"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAKzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiC/C;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CA0Jf"}
@@ -8,7 +8,9 @@ export declare enum LogLevel {
8
8
  /** Normal output (default) */
9
9
  Normal = 1,
10
10
  /** Verbose output with additional details */
11
- Verbose = 2
11
+ Verbose = 2,
12
+ /** Debug output with maximum details */
13
+ Debug = 3
12
14
  }
13
15
  /**
14
16
  * Global CLI context for sharing state across commands.
@@ -35,6 +37,10 @@ export declare function isVerbose(): boolean;
35
37
  * Check if quiet mode is enabled.
36
38
  */
37
39
  export declare function isQuiet(): boolean;
40
+ /**
41
+ * Check if debug logging is enabled.
42
+ */
43
+ export declare function isDebug(): boolean;
38
44
  /**
39
45
  * Creates a spinner for async operations.
40
46
  * Returns a no-op spinner in quiet mode.
@@ -68,6 +74,10 @@ export declare const ConsoleOutput: {
68
74
  * Print a skipped file message.
69
75
  */
70
76
  skipped(message: string): void;
77
+ /**
78
+ * Print an unchanged file message.
79
+ */
80
+ unchanged(message: string): void;
71
81
  /**
72
82
  * Print an info message.
73
83
  */
@@ -1 +1 @@
1
- {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/output/console.ts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;OAEG;yBACkB,MAAM,SAAS,MAAM,WAAW,MAAM,GAAG,MAAM;CAUrE,CAAC"}
1
+ {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/output/console.ts"],"names":[],"mappings":"AACA,OAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEpC;;GAEG;AACH,oBAAY,QAAQ;IAClB,wCAAwC;IACxC,KAAK,IAAI;IACT,8BAA8B;IAC9B,MAAM,IAAI;IACV,6CAA6C;IAC7C,OAAO,IAAI;IACX,wCAAwC;IACxC,KAAK,IAAI;CACV;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,wBAAwB;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;CACjB;AAUD;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAE7D;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,UAAU,CAEvC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAEjC;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAEjC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAQ/C;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa;IACxB;;OAEG;qBACc,MAAM,GAAG,IAAI;IAK9B;;;OAGG;mBACY,MAAM,GAAG,IAAI;IAI5B;;OAEG;qBACc,MAAM,GAAG,IAAI;IAK9B;;OAEG;kBACW,MAAM,GAAG,IAAI;IAK3B;;OAEG;qBACc,MAAM,GAAG,IAAI;IAK9B;;OAEG;uBACgB,MAAM,GAAG,IAAI;IAKhC;;OAEG;kBACW,MAAM,GAAG,IAAI;IAK3B;;OAEG;mBACY,MAAM,GAAG,IAAI;IAK5B;;OAEG;qBACc,MAAM,GAAG,IAAI;IAK9B;;OAEG;mBACY,MAAM,GAAG,IAAI;IAK5B;;OAEG;oBACa,MAAM,GAAG,IAAI;IAK7B;;OAEG;eACQ,IAAI;IAKf;;OAEG;oBACa,MAAM,GAAG,IAAI;IAK7B;;OAEG;mBACY,MAAM,GAAG,IAAI;IAK5B;;OAEG;qBACc,MAAM,GAAG,MAAM;IAIhC;;OAEG;yBACkB,MAAM,SAAS,MAAM,WAAW,MAAM,GAAG,MAAM;CAUrE,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Migration skill template for AI-assisted migration.
3
+ * This skill is installed when using `prs init --migrate`.
4
+ */
5
+ export declare const MIGRATE_SKILL_CLAUDE = "---\nname: 'migrate-to-promptscript'\ndescription: 'Migrate existing AI instruction files to PromptScript format'\nallowed-tools:\n - Read\n - Write\n - Glob\n - Grep\n - Bash\nuser-invocable: true\n---\n\n# Migrate to PromptScript\n\n## Overview\n\nThis skill guides you through migrating existing AI instruction files\nto PromptScript format, creating a unified source of truth for all\nAI coding assistants.\n\n## Step 1: Discovery\n\nSearch for existing instruction files using these patterns:\n\nClaude Code:\n\n- CLAUDE.md, claude.md, CLAUDE.local.md\n\nCursor:\n\n- .cursorrules\n- .cursor/rules/\\*.md\n- .cursor/rules/\\*.mdc\n\nGitHub Copilot:\n\n- .github/copilot-instructions.md\n- .github/instructions/\\*.md\n\nOther:\n\n- AGENTS.md\n- AI_INSTRUCTIONS.md\n- AI.md\n- .ai/instructions.md\n\nUse Glob tool to find these files.\n\n## Step 2: Read and Analyze\n\nFor each discovered file:\n\n1. Read the full content using the Read tool\n2. Identify sections by headers (##, ###) and patterns\n3. Classify content type using the mapping table below\n4. Note any tool-specific content that may need special handling\n\n## Step 3: Content Mapping\n\nMap source content to PromptScript blocks:\n\n| Source Pattern | PromptScript Block |\n| ------------------------------------ | ------------------ |\n| You are, persona, identity, role | @identity |\n| Tech stack, languages, frameworks | @context |\n| Coding standards, conventions, rules | @standards |\n| Don't, Never, restrictions | @restrictions |\n| Commands, shortcuts | @shortcuts |\n| API docs, references, knowledge base | @knowledge |\n| Parameters, config values | @params |\n| File patterns, globs, applyTo | @guards |\n| Skills, capabilities | @skills |\n| Agents, subagents | @agents |\n| Local-only settings | @local |\n\n## Step 4: Generate PromptScript\n\n### Required: @meta block\n\nEvery PromptScript file needs metadata with id and syntax fields.\n\n### Identity (persona)\n\nConvert persona descriptions to @identity block with triple-quote string.\n\n### Context (project info)\n\nConvert tech stack to @context block with structured properties\nlike project, languages, frameworks.\n\n### Standards (conventions)\n\nConvert coding standards to @standards block organized by category:\ncode, naming, commits, etc.\n\n### Restrictions (don'ts)\n\nConvert restrictions to @restrictions block using dash prefix for each item.\n\n### Shortcuts (commands)\n\nConvert custom commands to @shortcuts block. Simple shortcuts use\nkey-value format. Complex shortcuts use object format with\nprompt, description, and content fields.\n\n### Knowledge (references)\n\nConvert API docs and reference material to @knowledge block\nusing triple-quote string for rich content.\n\n### Guards (file patterns)\n\nConvert file-specific rules to @guards block with globs array\nspecifying file patterns.\n\n### Params (configuration)\n\nConvert configuration parameters to @params block with type annotations:\nrange(), enum(), boolean.\n\n### Skills (capabilities)\n\nConvert skill definitions to @skills block with description,\ntrigger, and content fields.\n\n### Agents (subagents)\n\nConvert agent definitions to @agents block with description,\ntools, model, and content fields.\n\n## Step 5: File Organization\n\nSimple Projects - single file structure:\n\n- .promptscript/project.prs\n- promptscript.yaml\n\nComplex Projects - modular file structure:\n\n- .promptscript/project.prs (main with @use imports)\n- .promptscript/context.prs\n- .promptscript/standards.prs\n- .promptscript/restrictions.prs\n- .promptscript/commands.prs\n- promptscript.yaml\n\n## Step 6: Configuration\n\nCreate promptscript.yaml with:\n\n- version: '1'\n- project.id\n- input.entry pointing to main .prs file\n- targets for github, claude, cursor\n\n## Step 7: Validation\n\nAfter generating PromptScript files:\n\n1. Validate syntax: prs validate\n2. Test compilation: prs compile --dry-run\n3. Compare output with original files\n4. Iterate if content is missing or incorrect\n\n## Common Patterns\n\n### Merging Multiple Sources\n\nWhen instructions exist in multiple files:\n\n1. Identity: Take from most detailed source\n2. Standards: Merge all, deduplicate\n3. Restrictions: Combine all (union)\n4. Commands: Merge, resolve conflicts\n\n### Tool-Specific Content\n\nHandle tool-specific content:\n\n- GitHub prompts: Use @shortcuts with prompt: true\n- Claude agents: Use @agents block\n- Cursor rules: Map to @standards\n- Local content: Use @local block\n\n### Preserving Formatting\n\nUse triple-quote multiline strings for:\n\n- Rich markdown content\n- Code examples\n- Complex instructions\n\n## Syntax Rules\n\nQuick reference for PromptScript syntax:\n\n- Strings: quoted or identifier\n- Multi-line: triple quotes\n- Arrays: [item1, item2] or - item prefix\n- Objects: { key: value }\n- Comments: # comment\n- Required @meta fields: id, syntax\n\n## Quality Checklist\n\nBefore completing migration:\n\n- @meta block has id and syntax\n- Identity is clear and specific\n- Standards are organized by category\n- Restrictions use dash prefix (-)\n- Shortcuts work in target tools\n- prs validate passes\n- prs compile produces correct output\n- No duplicate content across blocks\n\n## Troubleshooting\n\n### Missing @meta Error\nAdd required metadata block at the start.\n\n### Multiline String in Object Error\nAssign multiline strings to named keys, don't leave them loose\ninside objects.\n\n### Content Not Appearing in Output\nCheck block names match expected patterns and\nverify syntax with prs validate --verbose.\n";
6
+ export declare const MIGRATE_SKILL_CURSOR = "# Migrate to PromptScript\n\nUse this command to migrate existing AI instruction files to PromptScript format.\n\n## Step 1: Discovery\n\nSearch for existing instruction files:\n\n- CLAUDE.md, claude.md, CLAUDE.local.md\n- .cursorrules, .cursor/rules/*.mdc\n- .github/copilot-instructions.md\n- AGENTS.md, AI_INSTRUCTIONS.md\n\n## Step 2: Content Mapping\n\nMap source content to PromptScript blocks:\n\n| Source Pattern | PromptScript Block |\n| ------------------------------------ | ------------------ |\n| You are, persona, identity, role | @identity |\n| Tech stack, languages, frameworks | @context |\n| Coding standards, conventions, rules | @standards |\n| Don't, Never, restrictions | @restrictions |\n| Commands, shortcuts | @shortcuts |\n| API docs, references | @knowledge |\n\n## Step 3: Generate PromptScript\n\nCreate `.promptscript/project.prs` with:\n\n1. **@meta** block with id and syntax fields (required)\n2. **@identity** for persona/role descriptions\n3. **@context** for tech stack info\n4. **@standards** organized by category\n5. **@restrictions** with dash prefix for each item\n6. **@shortcuts** for commands\n\n## Step 4: Validation\n\nAfter generating:\n\n1. Run `prs validate`\n2. Run `prs compile --dry-run`\n3. Compare output with original files\n\n## Syntax Quick Reference\n\n- Strings: quoted or identifier\n- Multi-line: triple quotes (`\"\"\"`)\n- Arrays: `[item1, item2]`\n- Objects: `{ key: value }`\n- Comments: `# comment`\n\n## Quality Checklist\n\n- @meta block has id and syntax\n- Standards organized by category\n- Restrictions use dash prefix (-)\n- prs validate passes\n";
7
+ export declare const MIGRATE_SKILL_ANTIGRAVITY = "# Migrate to PromptScript\n\nThis rule provides guidance for migrating existing AI instruction files to PromptScript format.\n\n## Overview\n\nPromptScript creates a unified source of truth for all AI coding assistants,\ncompiling to native formats for Claude, GitHub Copilot, Cursor, and Antigravity.\n\n## Step 1: Discovery\n\nSearch for existing instruction files:\n\n- CLAUDE.md, claude.md, CLAUDE.local.md\n- .cursorrules, .cursor/rules/*.mdc\n- .github/copilot-instructions.md\n- .agent/rules/*.md\n- AGENTS.md, AI_INSTRUCTIONS.md\n\n## Step 2: Content Mapping\n\nMap source content to PromptScript blocks:\n\n| Source Pattern | PromptScript Block |\n| ------------------------------------ | ------------------ |\n| You are, persona, identity, role | @identity |\n| Tech stack, languages, frameworks | @context |\n| Coding standards, conventions, rules | @standards |\n| Don't, Never, restrictions | @restrictions |\n| Commands, shortcuts | @shortcuts |\n| API docs, references | @knowledge |\n\n## Step 3: Generate PromptScript\n\nCreate `.promptscript/project.prs` with required blocks:\n\n1. **@meta** - id and syntax fields (required)\n2. **@identity** - persona/role descriptions\n3. **@context** - tech stack info\n4. **@standards** - coding rules organized by category\n5. **@restrictions** - things to avoid (dash prefix)\n6. **@shortcuts** - commands\n\n## Step 4: Validation\n\nAfter generating PromptScript files:\n\n1. Run `prs validate` to check syntax\n2. Run `prs compile --dry-run` to preview output\n3. Compare compiled output with original files\n\n## Syntax Reference\n\n- Strings: quoted or identifier\n- Multi-line: triple quotes\n- Arrays: [item1, item2]\n- Objects: { key: value }\n- Comments: # comment\n";
8
+ export declare const MIGRATE_SKILL_GITHUB = "---\nname: 'migrate-to-promptscript'\ndescription: 'Migrate existing AI instruction files to PromptScript format'\nallowed-tools:\n - read\n - write\n - glob\n - grep\n - execute\nuser-invocable: true\n---\n\n# Migrate to PromptScript\n\n## Overview\n\nThis skill guides you through migrating existing AI instruction files\nto PromptScript format, creating a unified source of truth for all\nAI coding assistants.\n\n## Step 1: Discovery\n\nSearch for existing instruction files using these patterns:\n\nClaude Code:\n\n- CLAUDE.md, claude.md, CLAUDE.local.md\n\nCursor:\n\n- .cursorrules\n- .cursor/rules/\\*.md\n- .cursor/rules/\\*.mdc\n\nGitHub Copilot:\n\n- .github/copilot-instructions.md\n- .github/instructions/\\*.md\n\nOther:\n\n- AGENTS.md\n- AI_INSTRUCTIONS.md\n- AI.md\n- .ai/instructions.md\n\n## Step 2: Read and Analyze\n\nFor each discovered file:\n\n1. Read the full content\n2. Identify sections by headers (##, ###) and patterns\n3. Classify content type using the mapping table below\n4. Note any tool-specific content that may need special handling\n\n## Step 3: Content Mapping\n\nMap source content to PromptScript blocks:\n\n| Source Pattern | PromptScript Block |\n| ------------------------------------ | ------------------ |\n| You are, persona, identity, role | @identity |\n| Tech stack, languages, frameworks | @context |\n| Coding standards, conventions, rules | @standards |\n| Don't, Never, restrictions | @restrictions |\n| Commands, shortcuts | @shortcuts |\n| API docs, references, knowledge base | @knowledge |\n| Parameters, config values | @params |\n| File patterns, globs, applyTo | @guards |\n| Skills, capabilities | @skills |\n| Agents, subagents | @agents |\n| Local-only settings | @local |\n\n## Step 4: Generate PromptScript\n\n### Required: @meta block\n\nEvery PromptScript file needs metadata with id and syntax fields.\n\n### Identity (persona)\n\nConvert persona descriptions to @identity block with triple-quote string.\n\n### Context (project info)\n\nConvert tech stack to @context block with structured properties\nlike project, languages, frameworks.\n\n### Standards (conventions)\n\nConvert coding standards to @standards block organized by category:\ncode, naming, commits, etc.\n\n### Restrictions (don'ts)\n\nConvert restrictions to @restrictions block using dash prefix for each item.\n\n### Shortcuts (commands)\n\nConvert custom commands to @shortcuts block. Simple shortcuts use\nkey-value format. Complex shortcuts use object format with\nprompt, description, and content fields.\n\n## Step 5: File Organization\n\nSimple Projects - single file structure:\n\n- .promptscript/project.prs\n- promptscript.yaml\n\nComplex Projects - modular file structure:\n\n- .promptscript/project.prs (main with @use imports)\n- .promptscript/context.prs\n- .promptscript/standards.prs\n- .promptscript/restrictions.prs\n- .promptscript/commands.prs\n- promptscript.yaml\n\n## Step 6: Configuration\n\nCreate promptscript.yaml with:\n\n- version: '1'\n- project.id\n- input.entry pointing to main .prs file\n- targets for github, claude, cursor\n\n## Step 7: Validation\n\nAfter generating PromptScript files:\n\n1. Validate syntax: prs validate\n2. Test compilation: prs compile --dry-run\n3. Compare output with original files\n4. Iterate if content is missing or incorrect\n\n## Quality Checklist\n\nBefore completing migration:\n\n- @meta block has id and syntax\n- Identity is clear and specific\n- Standards are organized by category\n- Restrictions use dash prefix (-)\n- Shortcuts work in target tools\n- prs validate passes\n- prs compile produces correct output\n- No duplicate content across blocks\n";
9
+ //# sourceMappingURL=migrate-skill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-skill.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/templates/migrate-skill.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,oBAAoB,+rLAoOhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,gtDA2DhC,CAAC;AAEF,eAAO,MAAM,yBAAyB,m0DA0DrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,+zHAqJhC,CAAC"}
package/src/types.d.ts CHANGED
@@ -18,6 +18,8 @@ export interface InitOptions {
18
18
  yes?: boolean;
19
19
  /** Force reinitialize even if already initialized */
20
20
  force?: boolean;
21
+ /** Install migration skill for AI-assisted migration */
22
+ migrate?: boolean;
21
23
  }
22
24
  /**
23
25
  * Options for the compile command.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,iDAAiD;IACjD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iCAAiC;IACjC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,4CAA4C;IAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,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,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,0CAA0C;IAC1C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf"}
@@ -11,6 +11,8 @@ export interface AIToolsDetection {
11
11
  detected: AIToolTarget[];
12
12
  /** Details about detected files */
13
13
  details: Record<AIToolTarget, string[]>;
14
+ /** Files that exist but were NOT generated by PromptScript (candidates for migration) */
15
+ migrationCandidates: string[];
14
16
  }
15
17
  /**
16
18
  * Detect existing AI tool configurations.
@@ -29,4 +31,12 @@ export declare function getSuggestedTargets(detection: AIToolsDetection): AITool
29
31
  * Format detection results for display.
30
32
  */
31
33
  export declare function formatDetectionResults(detection: AIToolsDetection): string[];
34
+ /**
35
+ * Check if there are migration candidates (non-PromptScript instruction files).
36
+ */
37
+ export declare function hasMigrationCandidates(detection: AIToolsDetection): boolean;
38
+ /**
39
+ * Format migration hint for display.
40
+ */
41
+ export declare function formatMigrationHint(detection: AIToolsDetection): string[];
32
42
  //# sourceMappingURL=ai-tools-detector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-tools-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/ai-tools-detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,m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ED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAE3E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAiBzE"}
@@ -1,50 +0,0 @@
1
- {
2
- "name": "@promptscript/cli",
3
- "version": "0.0.1",
4
- "description": "CLI for PromptScript - standardize AI instructions across GitHub Copilot, Claude, Cursor and other AI tools",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/mrwogu/promptscript.git",
8
- "directory": "packages/cli"
9
- },
10
- "publishConfig": {
11
- "access": "public"
12
- },
13
- "type": "module",
14
- "main": "./index.js",
15
- "bin": {
16
- "prs": "./bin/prs.js",
17
- "promptscript": "./bin/prs.js"
18
- },
19
- "dependencies": {
20
- "@inquirer/prompts": "^8.2.0",
21
- "chalk": "^5.6.2",
22
- "chokidar": "^5.0.0",
23
- "commander": "^14.0.2",
24
- "ora": "^9.0.0",
25
- "simple-git": "^3.22.0",
26
- "yaml": "^2.8.2"
27
- },
28
- "engines": {
29
- "node": ">=18"
30
- },
31
- "keywords": [
32
- "cli",
33
- "enterprise",
34
- "typescript",
35
- "devtools",
36
- "infrastructure-as-code",
37
- "cursor",
38
- "developer-experience",
39
- "governance",
40
- "claude",
41
- "ai-tools",
42
- "github-copilot",
43
- "llm",
44
- "prompt-engineering",
45
- "promptscript",
46
- "antigravity",
47
- "promptops"
48
- ],
49
- "license": "MIT"
50
- }