Files
oh-my-pi/packages/coding-agent/src/commands/setup.ts
T
can1357 3cdc10a73b feat(cli): replaced oclif with lightweight custom CLI framework in pi-utils
- Created lightweight CLI framework in @oh-my-pi/pi-utils/cli as drop-in replacement for oclif with zero dependencies.
- Migrated coding-agent CLI from oclif framework to @oh-my-pi/pi-utils/cli with lazy command loading and simplified architecture.
- Changed default root command from 'index' to 'launch' for improved UX.
- Removed @oclif/core and @oclif/plugin-autocomplete dependencies from coding-agent package.
- Deleted custom oclif help renderer (oclif-help.ts) as help rendering is now integrated into the new CLI framework.
- Moved launch command from nested index/index.ts to top-level launch.ts for clearer command structure.
2026-02-10 19:18:12 +01:00

40 lines
1.0 KiB
TypeScript

/**
* Install dependencies for optional features.
*/
import { Args, Command, Flags } 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: true,
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);
const cmd: SetupCommandArgs = {
component: args.component as SetupComponent,
flags: {
json: flags.json,
check: flags.check,
},
};
await initTheme();
await runSetupCommand(cmd);
}
}