prompts-gpt 0.2.8

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/LICENSE ADDED
@@ -0,0 +1,75 @@
1
+ Prompts-GPT Source Available License
2
+ Version 1.0 — Effective 2026
3
+
4
+ Copyright (c) 2026 Prompts-GPT. All rights reserved.
5
+
6
+ Permission is hereby granted, free of charge, to any person or organization
7
+ ("Licensee") obtaining a copy of this software and associated documentation
8
+ files (the "Software"), to use the Software for personal and commercial
9
+ purposes, subject to the following conditions:
10
+
11
+ 1. GRANT OF LICENSE
12
+
13
+ Licensee may:
14
+
15
+ a) Use the Software without restriction for personal projects,
16
+ commercial products, internal development, CI/CD pipelines,
17
+ and production deployments.
18
+
19
+ b) Install the Software in any number of environments.
20
+
21
+ 2. RESTRICTIONS
22
+
23
+ Licensee shall NOT:
24
+
25
+ a) Redistribute the Software, in whole or in part, as a standalone
26
+ package, download, or bundled component of another software
27
+ distribution system.
28
+
29
+ b) Modify, adapt, translate, reverse engineer, decompile, or
30
+ create derivative works of the Software's source code or
31
+ compiled artifacts.
32
+
33
+ c) Sublicense, rent, lease, sell, or otherwise transfer the
34
+ Software or rights to it to any third party.
35
+
36
+ d) Remove, alter, or obscure any proprietary notices, attribution
37
+ markers, or license text embedded in the Software.
38
+
39
+ e) Use the Software to build a competing prompt management
40
+ platform, agent orchestration service, or equivalent product.
41
+
42
+ 3. ATTRIBUTION
43
+
44
+ Build artifacts and runtime telemetry may contain account attribution
45
+ metadata. Tampering with or removing attribution data is prohibited.
46
+
47
+ 4. INTELLECTUAL PROPERTY
48
+
49
+ The Software is and remains the exclusive property of Prompts-GPT.
50
+ No title or ownership is transferred to Licensee.
51
+
52
+ 5. WARRANTY DISCLAIMER
53
+
54
+ THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
55
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
56
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
57
+ NONINFRINGEMENT.
58
+
59
+ 6. LIMITATION OF LIABILITY
60
+
61
+ IN NO EVENT SHALL PROMPTS-GPT BE LIABLE FOR ANY INDIRECT,
62
+ INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING
63
+ OUT OF THE USE OR INABILITY TO USE THE SOFTWARE.
64
+
65
+ 7. TERMINATION
66
+
67
+ This license terminates automatically if Licensee breaches any
68
+ term. Upon termination, Licensee must stop using the Software.
69
+
70
+ 8. GOVERNING LAW
71
+
72
+ This agreement is governed by the laws of the State of Delaware,
73
+ USA, without regard to conflict of laws principles.
74
+
75
+ For licensing inquiries: licensing@prompts-gpt.com
package/README.md ADDED
@@ -0,0 +1,202 @@
1
+ # prompts-gpt
2
+
3
+ CLI and SDK for syncing [Prompts-GPT](https://prompts-gpt.com) prompt packs into any project — with integrations for **Codex**, **Claude Code**, **Cursor**, **VS Code**, **GitHub Copilot**, **Continue**, **Gemini CLI**, **Windsurf**, **Cline**, **Junie**, and **Amp**.
4
+
5
+ ---
6
+
7
+ ## Get Started
8
+
9
+ ```bash
10
+ # Install
11
+ npm install -D prompts-gpt
12
+
13
+ # Interactive setup — handles credentials, config, and shows runnable commands
14
+ npx prompts-gpt quickstart
15
+ ```
16
+
17
+ On Windows PowerShell, prefer `npm exec` because it resolves the local workspace bin more reliably than `npx`:
18
+
19
+ ```powershell
20
+ npm exec prompts-gpt -- quickstart
21
+ npm exec prompts-gpt -- init
22
+ npm exec prompts-gpt -- sweep
23
+ ```
24
+
25
+ Or step by step:
26
+
27
+ ```bash
28
+ npx prompts-gpt init # save your project token (prompts interactively)
29
+ npx prompts-gpt sync # pull prompts and write agent files
30
+ npx prompts-gpt list # see what's available
31
+ npx prompts-gpt run # execute a single prompt
32
+ npx prompts-gpt sweep # run a multi-iteration sweep
33
+ ```
34
+
35
+ **Requires** Node.js 18.18+.
36
+
37
+ ---
38
+
39
+ ## What It Does
40
+
41
+ Bridges the Prompts-GPT cloud library with the agent instruction files each tool reads:
42
+
43
+ | Agent | Written files |
44
+ |-------|--------------|
45
+ | Codex | `AGENTS.md` |
46
+ | Claude Code | `CLAUDE.md` |
47
+ | Cursor | `.cursor/rules/*.mdc` + `.cursor/commands/*.md` |
48
+ | VS Code | `.github/copilot-instructions.md` + `.vscode/*.code-snippets` |
49
+ | Copilot | `.github/prompts/*.prompt.md` |
50
+ | Continue | `.continue/rules/*.md` |
51
+ | Gemini CLI | `GEMINI.md` |
52
+ | Windsurf | `.windsurf/rules/*.md` |
53
+ | Cline | `.clinerules/*.md` |
54
+ | Junie | `.junie/guidelines.md` |
55
+ | Amp | `AGENT.md` |
56
+
57
+ ---
58
+
59
+ ## Important Use Notes
60
+
61
+ - `prompts-gpt` is the published npm package. If you see examples that reference internal app modules such as `lib/sdk`, those are app-internal examples, not the public package import path.
62
+ - If Windows shows `Unknown command: quickstart` or `Unknown command: sweep` while `prompts-gpt` is installed, run `npm exec prompts-gpt -- help` or `node .\\node_modules\\prompts-gpt\\dist\\cli.js help` to confirm the local bin is being used instead of a stale shell shim.
63
+ - Local orchestration can send prompt text, code context, and repository files to third-party model providers and agent CLIs. Review each provider's terms, privacy settings, and permitted automation paths before using private or regulated data.
64
+ - Run artifacts are written locally and can include prompts, model output, logs, and worktree snapshots. Treat `.scripts/runs` as sensitive and do not commit or share it casually.
65
+
66
+ ---
67
+
68
+ ## CLI Commands
69
+
70
+ | Command | Description |
71
+ |---------|-------------|
72
+ | `quickstart` | Interactive setup — credentials, config, and first run |
73
+ | `init` | Save project token (prompts interactively if no flags given) |
74
+ | `setup` | Scaffold local orchestration config |
75
+ | `sync` | Pull + generate + write agent files |
76
+ | `pull` | Download prompt packs as Markdown files |
77
+ | `generate` | Generate a prompt pack from a goal |
78
+ | `load-config` | Pull full config from Prompts Studio |
79
+ | `run` | Execute one prompt with a local agent (`-f <file>`) |
80
+ | `run-batch` | Execute multiple prompts |
81
+ | `sweep` | Multi-iteration execution (`-f <file> -n <count>`) |
82
+ | `list` | Show prompts, sweeps, agents |
83
+ | `status` | Show workspace readiness |
84
+ | `providers` | Show detected CLIs |
85
+ | `doctor` | Validate prerequisites |
86
+ | `validate` | Check config for errors |
87
+ | `models` | List known models per provider |
88
+ | `sync-models` | Fetch latest model registry from prompts-gpt.com |
89
+ | `project` | Show the current project linked to the token |
90
+
91
+ Run `prompts-gpt help <command>` for detailed options.
92
+
93
+ ---
94
+
95
+ ## Examples
96
+
97
+ ```bash
98
+ # Run a single prompt (auto-selects if only one exists)
99
+ prompts-gpt run -f .prompts-gpt/review.md --agent cursor
100
+
101
+ # Run a sweep (auto-detects local sweeps, reads iterations from frontmatter)
102
+ prompts-gpt sweep
103
+ prompts-gpt sweep -f .prompts-gpt/sweeps/design.md -n 5
104
+
105
+ # Preview what a sweep would do
106
+ prompts-gpt sweep --dry-run
107
+
108
+ # Run a sweep with reduced output
109
+ prompts-gpt sweep --quiet
110
+
111
+ # List available models for a provider
112
+ prompts-gpt models --provider codex
113
+
114
+ # Sync model registry from cloud
115
+ prompts-gpt sync-models
116
+
117
+ # Use model aliases for shorter commands
118
+ prompts-gpt run --model opus # resolves to claude-4.6-opus-high
119
+ prompts-gpt run --model mini # resolves to gpt-5.4-mini
120
+
121
+ # Sync from cloud
122
+ prompts-gpt sync --agent all
123
+
124
+ # Generate a prompt pack from a goal
125
+ prompts-gpt generate --goal "Review PRs for security issues" --sync-agents
126
+
127
+ # CI/CD — pipe token from secret
128
+ printf '%s' "$PROMPTS_GPT_TOKEN" | prompts-gpt sync --token-stdin --agent all
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Configuration
134
+
135
+ Create `.prompts-gpt/config.json` via `prompts-gpt setup`, or manually:
136
+
137
+ ```json
138
+ {
139
+ "providerOrder": ["codex", "cursor", "claude", "copilot"],
140
+ "defaultAgent": "router",
141
+ "timeoutSeconds": 900,
142
+ "artifactsDir": ".scripts/runs"
143
+ }
144
+ ```
145
+
146
+ All options can be overridden via environment variables. See `prompts-gpt help setup`.
147
+
148
+ ---
149
+
150
+ ## SDK
151
+
152
+ ```typescript
153
+ import { PromptsGptClient, syncPrompts } from "prompts-gpt";
154
+
155
+ const client = new PromptsGptClient({
156
+ token: "pgpt_your_token",
157
+ apiUrl: "https://prompts-gpt.com",
158
+ fetch,
159
+ });
160
+
161
+ const prompts = await client.pullPrompts();
162
+ await syncPrompts(prompts, { agent: "all" });
163
+
164
+ // Fetch available models per provider
165
+ const models = await client.fetchModels();
166
+ // Filter by provider
167
+ const codexModels = await client.fetchModels({ provider: "codex" });
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Data Privacy
173
+
174
+ **What stays local:**
175
+ - `.prompts-gpt/*.md` prompt files are written locally
176
+ - Agent files (`AGENTS.md`, `.cursor/rules/`, etc.) are updated locally
177
+ - Run artifacts (`.scripts/runs/`) including logs, diffs, and summaries stay local
178
+ - No local files, repo content, or uncommitted changes are uploaded
179
+
180
+ **What is sent to prompts-gpt.com:**
181
+ - `prompts-gpt generate --goal ...` — the text you explicitly pass via `--goal`, `--context`, and `--constraints` flags is sent to the API for AI-powered prompt generation
182
+ - `prompts-gpt sync --goal ...` — same as above when `--goal` is used
183
+ - `prompts-gpt pull` / `sync` / `load-config` — your project token is sent to authenticate and download prompts from your library
184
+
185
+ **Do not include PII, secrets, or confidential data** in `--goal`, `--context`, or `--constraints` flags. Use `--dry-run` with `sync` to preview what would be sent.
186
+
187
+ ## Security
188
+
189
+ - Credentials stored with `0600` permissions
190
+ - Credentials added to `.gitignore`
191
+ - Token prefix (`pgpt_`) validated before requests
192
+ - HTTPS enforced for non-localhost
193
+ - Path traversal blocked for all file writes
194
+ - Secret patterns (`pgpt_`, `sk-`, `ghp_`) are redacted from API-bound input, command previews, and error output
195
+ - SIGINT/SIGTERM cleanup releases locks
196
+ - Run artifact directories are intended to stay local and may contain sensitive prompt, output, and diff data
197
+
198
+ ---
199
+
200
+ ## License
201
+
202
+ [Prompts-GPT Source Available License](./LICENSE) — free for personal and commercial use. Redistribution and modification of the package are not permitted.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}