3cdc10a73b
- 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.
22 lines
693 B
TypeScript
22 lines
693 B
TypeScript
/**
|
|
* Check for and install updates.
|
|
*/
|
|
import { Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
import { runUpdateCommand } from "../cli/update-cli";
|
|
import { initTheme } from "../modes/theme/theme";
|
|
|
|
export default class Update extends Command {
|
|
static description = "Check for and install updates";
|
|
|
|
static flags = {
|
|
force: Flags.boolean({ char: "f", description: "Force update", default: false }),
|
|
check: Flags.boolean({ char: "c", description: "Check for updates without installing", default: false }),
|
|
};
|
|
|
|
async run(): Promise<void> {
|
|
const { flags } = await this.parse(Update);
|
|
await initTheme();
|
|
await runUpdateCommand({ force: flags.force, check: flags.check });
|
|
}
|
|
}
|