promptgraph-mcp 2.9.59 → 2.9.61
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 +13 -11
- package/commands/marketplace.js +45 -4
- package/commands/setup.js +13 -3
- package/package.json +1 -1
- package/platform.js +15 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PromptGraph
|
|
2
2
|
|
|
3
|
-
**Semantic skill router and marketplace for Claude Code,
|
|
3
|
+
**Semantic skill router and marketplace for Claude Code, Claude Desktop, and OpenCode.**
|
|
4
4
|
|
|
5
5
|
Instead of loading every `.md` skill into context, Claude calls `pg_search` and loads only the skill it needs — saving 20k+ tokens per session.
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ Instead of loading every `.md` skill into context, Claude calls `pg_search` and
|
|
|
18
18
|
- **Any local folder** — `pg add-dir <path>` indexes a folder that isn't a default source
|
|
19
19
|
- **Marketplace** — browse and install community skill bundles via TUI or MCP tools
|
|
20
20
|
- **Publishing** — publish skills/bundles to the registry hands-off via GitHub CLI
|
|
21
|
-
- **Multi-platform** — Claude Code,
|
|
21
|
+
- **Multi-platform** — verified on Claude Code, Claude Desktop & OpenCode; best-effort config for Cursor, Windsurf, Cline, Codex
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -48,15 +48,17 @@ Then restart your editor — the `promptgraph` MCP server will be available.
|
|
|
48
48
|
|
|
49
49
|
## Supported platforms
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
|
54
|
-
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
51
|
+
**Claude Code**, **Claude Desktop**, and **OpenCode** are verified end-to-end. The others are best-effort — the MCP config path/format is implemented but untested, so `pg setup` warns before writing. If you run one, please [report results](https://github.com/NeiP4n/promptgraph/issues).
|
|
52
|
+
|
|
53
|
+
| Platform | Status | Config written | Skills directory |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| `claude-code` | ✅ verified | `~/.claude/settings.json` | `~/.claude/skills-store` |
|
|
56
|
+
| `claude-desktop` | ✅ verified | `claude_desktop_config.json` (OS-specific) | `~/.claude/skills-store` |
|
|
57
|
+
| `opencode` | ✅ verified | `~/.config/opencode/opencode.json` | `~/.config/opencode/skills` |
|
|
58
|
+
| `cursor` | ⚠️ untested | `~/.cursor/mcp.json` | `~/.cursor/skills` |
|
|
59
|
+
| `windsurf` | ⚠️ untested | `~/.codeium/windsurf/mcp_config.json` | `~/.codeium/windsurf/skills` |
|
|
60
|
+
| `cline` | ⚠️ untested | `~/.vscode/mcp.json` | `~/.vscode/skills` |
|
|
61
|
+
| `codex` | ⚠️ untested | `~/.codex/config.json` | `~/.codex/skills` |
|
|
60
62
|
|
|
61
63
|
---
|
|
62
64
|
|
package/commands/marketplace.js
CHANGED
|
@@ -21,10 +21,10 @@ export default async function handler(args, bin) {
|
|
|
21
21
|
process.exit(result.errors.length > 0 ? 1 : 0);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
// Interactive TUI needs a real terminal. Non-tty hosts (opencode, pipes, CI)
|
|
25
|
+
// get a plain text listing instead of a broken escape-sequence dump.
|
|
26
|
+
const interactive = process.stdout.isTTY && process.stdin.isTTY;
|
|
27
|
+
|
|
28
28
|
const { browseMarketplace, browseBundles, installSkill, installBundle, installBundleBg, validateAndPruneMarketplace } = await import('../marketplace.js');
|
|
29
29
|
const { loadConfig: _lcMkt } = await import('../config.js');
|
|
30
30
|
const { getDb: _getDbMkt } = await import('../db.js');
|
|
@@ -88,6 +88,12 @@ export default async function handler(args, bin) {
|
|
|
88
88
|
}
|
|
89
89
|
} catch {}
|
|
90
90
|
|
|
91
|
+
// Non-interactive host (opencode, pipe, CI): print a plain list, no escape codes.
|
|
92
|
+
if (!interactive) {
|
|
93
|
+
printPlainList(Array.isArray(skills) ? skills : [], bundlesWithCounts, installedSet);
|
|
94
|
+
process.exit(0);
|
|
95
|
+
}
|
|
96
|
+
|
|
91
97
|
const { runTUI } = await import('../tui.js');
|
|
92
98
|
const { loadConfig: _lcR, saveConfig: _scR, SKILLS_STORE_DIR: _ssR } = await import('../config.js');
|
|
93
99
|
const { getDb: _getDbR } = await import('../db.js');
|
|
@@ -155,3 +161,38 @@ export default async function handler(args, bin) {
|
|
|
155
161
|
);
|
|
156
162
|
process.exit(0);
|
|
157
163
|
}
|
|
164
|
+
|
|
165
|
+
// Plain, escape-code-free listing for non-interactive hosts (opencode, pipes, CI).
|
|
166
|
+
function printPlainList(skills, bundles, installedSet) {
|
|
167
|
+
const tools = process.stdout.isTTY ? chalk : new Proxy({}, { get: () => (s) => s });
|
|
168
|
+
const c = tools;
|
|
169
|
+
|
|
170
|
+
console.log(c.bold(`\nPromptGraph marketplace — ${skills.length} skills · ${bundles.length} bundles\n`));
|
|
171
|
+
|
|
172
|
+
if (bundles.length) {
|
|
173
|
+
console.log(c.bold('Bundles'));
|
|
174
|
+
for (const b of bundles) {
|
|
175
|
+
const installed = installedSet.has(b.id) ? '✓ ' : ' ';
|
|
176
|
+
const count = b.skillCount != null ? `${b.skillCount} sk` : '';
|
|
177
|
+
const wrench = b.has_tools ? ' 🔧' : '';
|
|
178
|
+
const desc = (b.description || '').replace(/\s+/g, ' ').slice(0, 60);
|
|
179
|
+
console.log(`${installed}${c.cyan((b.name || b.id).padEnd(28))} ${count.padEnd(8)}${wrench} ${c.gray(desc)}`);
|
|
180
|
+
console.log(` ${c.gray(`pg bundle install ${b.id}`)}${b.repo_url ? c.gray(` ↗ github.com/${b.repo_url}`) : ''}`);
|
|
181
|
+
}
|
|
182
|
+
console.log();
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (skills.length) {
|
|
186
|
+
console.log(c.bold('Skills'));
|
|
187
|
+
for (const s of skills) {
|
|
188
|
+
const installed = installedSet.has(s.id) || (s.code && installedSet.has(s.code)) ? '✓ ' : ' ';
|
|
189
|
+
const desc = (s.description || '').replace(/\s+/g, ' ').slice(0, 60);
|
|
190
|
+
console.log(`${installed}${c.cyan((s.name || s.id).padEnd(28))} ${(s.code || '').padEnd(10)} ${c.gray(desc)}`);
|
|
191
|
+
console.log(` ${c.gray(`pg install ${s.code || s.id}`)}`);
|
|
192
|
+
}
|
|
193
|
+
console.log();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
console.log(c.gray('Tip: this plain list appears because the terminal is non-interactive (e.g. opencode).'));
|
|
197
|
+
console.log(c.gray(' Run `pg marketplace` in a native terminal for the interactive browser.\n'));
|
|
198
|
+
}
|
package/commands/setup.js
CHANGED
|
@@ -9,15 +9,25 @@ export default async function handler(args, bin) {
|
|
|
9
9
|
|
|
10
10
|
if (!platformId) {
|
|
11
11
|
section('Detected platforms');
|
|
12
|
-
detectPlatforms().forEach(p =>
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
detectPlatforms().forEach(p => {
|
|
13
|
+
const tag = p.verified ? chalk.green('verified') : chalk.yellow('untested');
|
|
14
|
+
info(`${chalk.white(p.id.padEnd(16))} ${chalk.gray(p.name.padEnd(20))} ${tag}`);
|
|
15
|
+
});
|
|
16
|
+
console.log(chalk.gray('\n Usage: pg setup <platform>'));
|
|
17
|
+
console.log(chalk.green(' Verified: ') + chalk.gray('claude-code, claude-desktop, opencode'));
|
|
18
|
+
console.log(chalk.yellow(' Untested: ') + chalk.gray('cursor, windsurf, cline, codex') + chalk.gray(' (best-effort — please report results)\n'));
|
|
15
19
|
process.exit(0);
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
const platform = PLATFORMS[platformId];
|
|
19
23
|
if (!platform) { error(`Unknown platform: ${platformId}`); process.exit(1); }
|
|
20
24
|
|
|
25
|
+
if (!platform.verified) {
|
|
26
|
+
console.log(chalk.yellow(` ⚠ ${platform.name} is untested.`) + chalk.gray(' Verified: claude-code, claude-desktop, opencode.'));
|
|
27
|
+
console.log(chalk.gray(` The MCP config format/path below is best-effort and may need manual fixing.`));
|
|
28
|
+
console.log(chalk.gray(` If it works (or doesn't), please report: https://github.com/NeiP4n/promptgraph/issues\n`));
|
|
29
|
+
}
|
|
30
|
+
|
|
21
31
|
// 1. Write MCP config
|
|
22
32
|
try {
|
|
23
33
|
platform.addMcp(platform);
|
package/package.json
CHANGED
package/platform.js
CHANGED
|
@@ -39,41 +39,51 @@ function addOpenCodeMcp(configPath) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
// `verified: true` means the MCP config format + skills dir were actually tested
|
|
43
|
+
// on that platform. Unverified entries are best-effort (config path/format may be
|
|
44
|
+
// wrong) — `pg setup` warns before writing so we never imply false support.
|
|
42
45
|
export const PLATFORMS = {
|
|
43
46
|
'claude-code': {
|
|
44
47
|
name: 'Claude Code',
|
|
45
48
|
configPath: path.join(HOME, '.claude', 'settings.json'),
|
|
46
49
|
addMcp: (config) => addStdMcp(config.configPath),
|
|
50
|
+
verified: true,
|
|
51
|
+
},
|
|
52
|
+
'opencode': {
|
|
53
|
+
name: 'OpenCode',
|
|
54
|
+
configPath: getOpenCodeConfig(),
|
|
55
|
+
addMcp: (config) => addOpenCodeMcp(config.configPath),
|
|
56
|
+
verified: true,
|
|
47
57
|
},
|
|
48
58
|
'claude-desktop': {
|
|
49
59
|
name: 'Claude Desktop',
|
|
50
60
|
configPath: getClaudeDesktopConfig(),
|
|
51
61
|
addMcp: (config) => addStdMcp(config.configPath),
|
|
62
|
+
verified: true,
|
|
52
63
|
},
|
|
53
64
|
'cline': {
|
|
54
65
|
name: 'Cline (VS Code)',
|
|
55
66
|
configPath: path.join(HOME, '.vscode', 'mcp.json'),
|
|
56
67
|
addMcp: (config) => addClineMcp(config.configPath),
|
|
68
|
+
verified: false,
|
|
57
69
|
},
|
|
58
70
|
'codex': {
|
|
59
71
|
name: 'OpenAI Codex CLI',
|
|
60
72
|
configPath: path.join(HOME, '.codex', 'config.json'),
|
|
61
73
|
addMcp: (config) => addStdMcp(config.configPath),
|
|
74
|
+
verified: false,
|
|
62
75
|
},
|
|
63
76
|
'cursor': {
|
|
64
77
|
name: 'Cursor',
|
|
65
78
|
configPath: path.join(HOME, '.cursor', 'mcp.json'),
|
|
66
79
|
addMcp: (config) => addStdMcp(config.configPath),
|
|
80
|
+
verified: false,
|
|
67
81
|
},
|
|
68
82
|
'windsurf': {
|
|
69
83
|
name: 'Windsurf',
|
|
70
84
|
configPath: path.join(HOME, '.codeium', 'windsurf', 'mcp_config.json'),
|
|
71
85
|
addMcp: (config) => addStdMcp(config.configPath),
|
|
72
|
-
|
|
73
|
-
'opencode': {
|
|
74
|
-
name: 'OpenCode',
|
|
75
|
-
configPath: getOpenCodeConfig(),
|
|
76
|
-
addMcp: (config) => addOpenCodeMcp(config.configPath),
|
|
86
|
+
verified: false,
|
|
77
87
|
},
|
|
78
88
|
};
|
|
79
89
|
|