58d3c12c25
Co-authored-by: Danny Kim <temeddix@gmail.com> Co-committed-by: Danny Kim <temeddix@gmail.com>
43 lines
879 B
TypeScript
43 lines
879 B
TypeScript
export type BotType = "claude" | "codex";
|
|
|
|
export type InstallCommand = {
|
|
command: string;
|
|
args: string[];
|
|
};
|
|
|
|
export function parseBotType(value: string): BotType {
|
|
if (value === "claude" || value === "codex") return value;
|
|
throw new Error(`unsupported bot type: ${value}`);
|
|
}
|
|
|
|
export function superpowersInstallCommands(
|
|
bot: BotType,
|
|
): InstallCommand[] {
|
|
if (bot === "claude") {
|
|
return [
|
|
{
|
|
command: "claude",
|
|
args: [
|
|
"plugin",
|
|
"marketplace",
|
|
"add",
|
|
"obra/superpowers-marketplace",
|
|
],
|
|
},
|
|
{
|
|
command: "claude",
|
|
args: [
|
|
"plugin",
|
|
"install",
|
|
"-y",
|
|
"superpowers@superpowers-marketplace",
|
|
],
|
|
},
|
|
];
|
|
}
|
|
return [{
|
|
command: "codex",
|
|
args: ["plugin", "add", "superpowers@openai-curated-remote"],
|
|
}];
|
|
}
|