@@ -55,50 +55,54 @@ probe.addHelpSection("Examples:", [
5555// ── probe termless ──
5656
5757probe
58- . command ( "termless [selectors...]" )
58+ . command ( "termless" )
59+ . argument ( "[selectors...]" , "Backend selectors to probe" )
5960 . description ( "Headless library probes via Termless backends" )
6061 . option ( "--all" , "Probe all backends" )
6162 . option ( "-f, --force" , "Re-run even if cached" )
62- . action ( async ( selectors : string [ ] , opts : { all ?: boolean ; force ?: boolean } ) => {
63+ . action ( async ( opts : { selectors : string [ ] ; all ?: boolean ; force ?: boolean } ) => {
6364 const { runTermlessProbes } = await import ( "./termless.ts" )
64- await runTermlessProbes ( opts . all ? [ ] : selectors , opts )
65+ await runTermlessProbes ( opts . all ? [ ] : opts . selectors , opts )
6566 } )
6667
6768// ── probe server ──
6869
6970probe
70- . command ( "server [daemon]" )
71+ . command ( "server" )
72+ . argument ( "[daemon]" , "Daemon name to probe" )
7173 . description ( "Probe running daemon servers" )
7274 . option ( "--start" , "Start daemon in this terminal" )
7375 . option ( "-p, --port <port>" , "Port for --start" , parseInt )
7476 . option ( "--all" , "Probe all running daemons" )
75- . action ( async ( daemon : string | undefined , opts : { start ?: boolean ; port ?: number ; all ?: boolean } ) => {
77+ . action ( async ( opts : { daemon ?: string ; start ?: boolean ; port ?: number ; all ?: boolean } ) => {
7678 const { handleServer } = await import ( "./server.ts" )
77- await handleServer ( daemon , opts )
79+ await handleServer ( opts . daemon , opts )
7880 } )
7981
8082// ── probe app ──
8183
8284probe
83- . command ( "app [terminal]" )
85+ . command ( "app" )
86+ . argument ( "[terminal]" , "Terminal app to probe" )
8487 . description ( "Launch and probe macOS terminal apps" )
8588 . option ( "--all" , "Probe all installed terminals" )
8689 . option ( "-f, --force" , "Re-run even if cached" )
87- . action ( async ( terminal : string | undefined , opts : { all ?: boolean ; force ?: boolean } ) => {
90+ . action ( async ( opts : { terminal ?: string ; all ?: boolean ; force ?: boolean } ) => {
8891 const { handleApp } = await import ( "./app.ts" )
89- await handleApp ( terminal , opts )
92+ await handleApp ( opts . terminal , opts )
9093 } )
9194
9295// ── probe mux ──
9396
9497probe
95- . command ( "mux [multiplexer]" )
98+ . command ( "mux" )
99+ . argument ( "[multiplexer]" , "Multiplexer to probe (tmux, screen)" )
96100 . description ( "Probe through terminal multiplexers (tmux, screen)" )
97101 . option ( "--all" , "Probe through all installed multiplexers" )
98102 . option ( "-f, --force" , "Re-run even if cached" )
99- . action ( async ( multiplexer : string | undefined , opts : { all ?: boolean ; force ?: boolean } ) => {
103+ . action ( async ( opts : { multiplexer ?: string ; all ?: boolean ; force ?: boolean } ) => {
100104 const { handleMux } = await import ( "./mux.ts" )
101- await handleMux ( multiplexer , opts )
105+ await handleMux ( opts . multiplexer , opts )
102106 } )
103107
104108// ── probe here ──
0 commit comments