Documentation
¶
Overview ¶
pi: src/main.ts + src/cli.ts — the coding agent CLI entry points. cli.ts sets process.title/env and configures the undici dispatcher (no pig counterpart: os env is set in Main, and net/http needs no dispatcher installation); main.ts handles CLI argument parsing and translates them into createAgentSession() options, with the SDK doing the heavy lifting. for the coding agent CLI. Handles CLI argument parsing and translates them into createAgentSession() options; the SDK does the heavy lifting.
Batch scope (print CLI 第 7 批): the print/json runtime path, auth commands, --list-models, --help/--version, and the session resolution paths reachable without a TUI. Deferred segments, each marked inline:
- handlePackageCommand / handleConfigCommand (Phase 7 package manager)
- runMigrations (Phase 8 migrations batch)
- exportFromFile (--export, Phase 8 export-html batch)
- runRpcMode (Phase 5 RPC batch)
- InteractiveMode: the T5b shell subset is wired (regular mode, transcript/footer/submit chain); selectors, showLoadedResources, fullscreen mode, extension UI, and the session picker (--resume) remain deferred (T5b-2/T6 batches)
- first-time setup / startup TUI (codingagent/cli startup-ui) are delivered but not yet wired into main (first-run flow lands with T6)
- builtInExtensions / InlineExtension factories (Phase 7 extensions)