Files
oh-my-pi/packages/coding-agent/src/commands/setup.ts
T
can1357 412ab9ea00 fix(coding-agent,ai): resolve issues #33, #34, #35, #37
- show help instead of crashing on `omp setup` with no args
- show runtime-discovered MCP servers in `/mcp list`
- remove deprecated Anthropic model entries from models.json
- sort models by recency in model selector
2026-02-12 20:29:06 +01:00

43 lines
1.1 KiB
TypeScript

/**
* Install dependencies for optional features.
*/
import { Args, Command, Flags, renderCommandHelp } from "@oh-my-pi/pi-utils/cli";
import { runSetupCommand, type SetupCommandArgs, type SetupComponent } from "../cli/setup-cli";
import { initTheme } from "../modes/theme/theme";
const COMPONENTS: SetupComponent[] = ["python"];
export default class Setup extends Command {
static description = "Install dependencies for optional features";
static args = {
component: Args.string({
description: "Component to install",
required: false,
options: COMPONENTS,
}),
};
static flags = {
check: Flags.boolean({ char: "c", description: "Check if dependencies are installed" }),
json: Flags.boolean({ description: "Output status as JSON" }),
};
async run(): Promise<void> {
const { args, flags } = await this.parse(Setup);
if (!args.component) {
renderCommandHelp("omp", "setup", Setup);
return;
}
const cmd: SetupCommandArgs = {
component: args.component as SetupComponent,
flags: {
json: flags.json,
check: flags.check,
},
};
await initTheme();
await runSetupCommand(cmd);
}
}