/** * @author jasonHzq * @description CLI 工厂函数 - 创建层级式 Pontx CLI * * 命令结构: * pontx * ├── init / check / generate / mocks / service / skill / cache:clean / add-spec * ├── completion * ├── cli (init / build) * ├── list specs * └── ← 动态注册 * ├── call * ├── show-api * ├── gen * ├── show-schema * ├── search * ├── list-cases * └── list (tags / apis / schemas) */ import { Command } from "commander"; export interface CreateCliOptions { /** * pontx.config.ts 所在的根目录 */ rootDir: string; /** * CLI 的命令名称 * @default 'pontx' */ binName?: string; } /** * 创建 CLI 程序(异步,因为需要加载 spec 信息来注册动态子命令) */ export declare function createCli(options: CreateCliOptions): Promise; /** * 运行 CLI 程序 */ export declare function runCli(program: Command): Promise;