@@ -45,7 +45,8 @@ Show the current checkout against its default branch:
4545 diffsplain
4646
4747Commands:
48- doctor Check Git, GitHub CLI, and coding agents
48+ doctor [--json] [--deep]
49+ Check review, agent, and pull request capabilities
4950
5051Targets:
5152 --branch NAME Show a remote branch against its default branch
@@ -81,6 +82,7 @@ Cursor:
8182Examples:
8283 diffsplain
8384 diffsplain doctor
85+ diffsplain doctor --json
8486 diffsplain --repo owner/project --pr 42
8587 diffsplain owner/project --branch feature/search
8688 diffsplain --agent claude` ;
@@ -147,8 +149,16 @@ export function parseCliArgs(
147149 } = { } ,
148150) {
149151 if ( rawArgs [ 0 ] === 'doctor' ) {
150- if ( rawArgs . length > 1 ) fail ( 'doctor does not take arguments or options' ) ;
151- return { doctor : true } ;
152+ const options = new Set ( rawArgs . slice ( 1 ) ) ;
153+ for ( const option of options ) {
154+ if ( ! [ '--json' , '--deep' ] . includes ( option ) ) {
155+ fail ( 'doctor only accepts --json and --deep' ) ;
156+ }
157+ }
158+ if ( options . size !== rawArgs . length - 1 ) {
159+ fail ( 'doctor options can only be passed once' ) ;
160+ }
161+ return { doctor : { json : options . has ( '--json' ) , deep : options . has ( '--deep' ) } } ;
152162 }
153163
154164 const options = new Map ( ) ;
0 commit comments