pmpt-cli 1.8.1 → 1.8.2
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 +6 -2
- package/dist/index.js +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,19 +98,23 @@ The generated prompt is **automatically copied to your clipboard**. Just paste i
|
|
|
98
98
|
| `pmpt plan` | 5 questions → AI prompt (auto-copied to clipboard) |
|
|
99
99
|
| `pmpt save` | Save current state as a snapshot |
|
|
100
100
|
| `pmpt watch` | Auto-detect file changes and save versions |
|
|
101
|
-
| `pmpt status` | Check project status
|
|
101
|
+
| `pmpt status` | Check project status, tracked files, and quality score |
|
|
102
102
|
| `pmpt history` | View version history |
|
|
103
|
+
| `pmpt diff v1 v2` | Compare two versions (unified diff) |
|
|
104
|
+
| `pmpt diff v3` | Compare version vs working copy |
|
|
103
105
|
| `pmpt squash v2 v5` | Merge versions v2–v5 into one |
|
|
104
106
|
| `pmpt export` | Export project as `.pmpt` file |
|
|
105
107
|
| `pmpt import <file>` | Import from `.pmpt` file |
|
|
106
108
|
| `pmpt recover` | Recover damaged pmpt.md via AI-generated prompt |
|
|
109
|
+
| `pmpt -v` | Show current CLI version |
|
|
107
110
|
|
|
108
111
|
### Platform
|
|
109
112
|
|
|
110
113
|
| Command | Description |
|
|
111
114
|
|---------|-------------|
|
|
112
115
|
| `pmpt login` | Authenticate via GitHub (one-time) |
|
|
113
|
-
| `pmpt publish` | Publish your project (requires pmpt.md) |
|
|
116
|
+
| `pmpt publish` | Publish your project (requires pmpt.md, quality ≥ 40) |
|
|
117
|
+
| `pmpt publish --force` | Publish even if quality score is below minimum |
|
|
114
118
|
| `pmpt edit` | Edit published project metadata (description, tags, category) |
|
|
115
119
|
| `pmpt unpublish` | Remove a published project from pmptwiki |
|
|
116
120
|
| `pmpt clone <slug>` | Clone and reproduce someone's project |
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// Node.js version check (must run before any imports that use modern syntax)
|
|
3
|
+
const [major] = process.versions.node.split('.').map(Number);
|
|
4
|
+
if (major < 18) {
|
|
5
|
+
console.error(`\n pmpt requires Node.js 18 or higher.\n` +
|
|
6
|
+
` Current version: ${process.version}\n\n` +
|
|
7
|
+
` Update Node.js: https://nodejs.org\n`);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
// Global error handlers — show friendly message instead of stack trace
|
|
11
|
+
process.on('uncaughtException', (err) => {
|
|
12
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
13
|
+
console.error(`\n Error: ${msg}\n`);
|
|
14
|
+
console.error(` If this keeps happening, please report at:`);
|
|
15
|
+
console.error(` https://github.com/pmptwiki/pmpt-cli/issues\n`);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
});
|
|
18
|
+
process.on('unhandledRejection', (reason) => {
|
|
19
|
+
const msg = reason instanceof Error ? reason.message : String(reason);
|
|
20
|
+
console.error(`\n Error: ${msg}\n`);
|
|
21
|
+
console.error(` If this keeps happening, please report at:`);
|
|
22
|
+
console.error(` https://github.com/pmptwiki/pmpt-cli/issues\n`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
});
|
|
2
25
|
import { Command } from 'commander';
|
|
3
26
|
import { cmdInit } from './commands/init.js';
|
|
4
27
|
import { cmdStatus } from './commands/status.js';
|