MCPcopy Create free account
hub / github.com/thesysdev/openui / shouldInstallSkill

Function shouldInstallSkill

packages/openui-cli/src/lib/install-skill.ts:3–23  ·  view source on GitHub ↗
(
  option: boolean | undefined,
  interactive: boolean,
)

Source from the content-addressed store, hash-verified

1import { execSync } from "child_process";
2
3export async function shouldInstallSkill(
4 option: boolean | undefined,
5 interactive: boolean,
6): Promise<boolean> {
7 if (option !== undefined) return option;
8 if (!interactive) return false;
9
10 try {
11 const { confirm } = await import("@inquirer/prompts");
12 return await confirm({
13 message: "Install the OpenUI agent skill for AI coding assistants?",
14 default: true,
15 });
16 } catch (err) {
17 const { ExitPromptError } = await import("@inquirer/core");
18 if (err instanceof ExitPromptError) {
19 process.exit(0);
20 }
21 throw err;
22 }
23}
24
25export function runSkillInstall(targetDir: string): void {
26 console.info("\nInstalling OpenUI agent skill...\n");

Callers 1

runCreateAppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected