| 21 | import { registerWebAliasCommand } from './web-alias'; |
| 22 | |
| 23 | export function registerServerCommand(program: Command): void { |
| 24 | const server = program |
| 25 | .command('server') |
| 26 | .description('Run the local Kimi server (REST + WebSocket + web UI).'); |
| 27 | |
| 28 | buildRunCommand( |
| 29 | server.command('run').description('Start the Kimi server (background daemon; use --foreground to attach).'), |
| 30 | { defaultOpen: false }, |
| 31 | ); |
| 32 | |
| 33 | registerPsCommand(server); |
| 34 | |
| 35 | registerKillCommand(server); |
| 36 | |
| 37 | registerRotateTokenCommand(server); |
| 38 | |
| 39 | // OS service-manager commands (`install/uninstall/start/stop/restart/status`) |
| 40 | // are temporarily hidden — the product now favors the on-demand background |
| 41 | // daemon (`kimi web`) over service-ization. The implementation still lives in |
| 42 | // `./lifecycle.ts` + `packages/server/src/svc/*`; re-import |
| 43 | // `addLifecycleCommands` and call it here to re-expose. |
| 44 | // addLifecycleCommands(server); |
| 45 | |
| 46 | registerWebAliasCommand(program); |
| 47 | } |
| 48 | |
| 49 | export { registerWebAliasCommand }; |