MCPcopy
hub / github.com/rpamis/comet / buildSuperpowersInstallCommand

Function buildSuperpowersInstallCommand

src/core/superpowers.ts:47–75  ·  view source on GitHub ↗
(
  _projectPath: string,
  scope: InstallScope,
  platformIds: string[],
)

Source from the content-addressed store, hash-verified

45const LINGMA_STAGE_AGENT = 'claude-code';
46
47function buildSuperpowersInstallCommand(
48 _projectPath: string,
49 scope: InstallScope,
50 platformIds: string[],
51): { command: string; args: string[] } {
52 const unknownIds = platformIds.filter((id) => !VALID_PLATFORM_IDS.has(id));
53 if (unknownIds.length > 0) {
54 throw new Error(`Unknown platform IDs: ${unknownIds.join(', ')}`);
55 }
56
57 const agentNames = [
58 ...new Set(
59 platformIds.map((id) => SKILLS_AGENT_MAP[id]).filter((name): name is string => Boolean(name)),
60 ),
61 ];
62
63 if (agentNames.length === 0) {
64 throw new Error(`No skills CLI agent names resolved for platforms: ${platformIds.join(', ')}`);
65 }
66
67 const args = ['skills', 'add', 'obra/superpowers', '-y'];
68 if (scope === 'global') {
69 args.push('-g');
70 }
71 for (const name of agentNames) {
72 args.push('--agent', name);
73 }
74 return { command: getNpxExecutable(), args };
75}
76
77function buildLingmaSuperpowersStageCommand(): { command: string; args: string[] } {
78 return {

Callers 2

Calls 1

getNpxExecutableFunction · 0.85

Tested by

no test coverage detected