@@ -141,6 +141,10 @@ struct AgentsSetupArgs {
141141 #[ arg( long = "workflow" , value_enum) ]
142142 workflows : Vec < WorkflowArg > ,
143143
144+ /// Do not fetch workflow docs during setup
145+ #[ arg( long, conflicts_with = "workflows" ) ]
146+ no_workflow : bool ,
147+
144148 #[ arg( skip) ]
145149 yes : bool ,
146150
@@ -410,6 +414,9 @@ struct SkillsAliasResult {
410414}
411415
412416pub async fn run_setup_top ( mut base : BaseArgs , mut args : SetupArgs ) -> Result < ( ) > {
417+ if base. api_key . is_some ( ) && base. prefer_profile {
418+ bail ! ( "--api-key conflicts with --prefer-profile" ) ;
419+ }
413420 if base. json && args. instrument {
414421 bail ! ( "--json conflicts with --instrument: JSON mode implies --no-instrument" ) ;
415422 }
@@ -447,6 +454,7 @@ pub async fn run_setup_top(mut base: BaseArgs, mut args: SetupArgs) -> Result<()
447454 background : args. background ,
448455 agent : args. agents . agent ,
449456 workflows : args. agents . workflows ,
457+ no_workflow : args. agents . no_workflow ,
450458 languages : args. languages ,
451459 } ;
452460 run_setup_wizard ( base, wizard_flags) . await
@@ -474,6 +482,7 @@ struct WizardFlags {
474482 background : bool ,
475483 agent : Option < AgentArg > ,
476484 workflows : Vec < WorkflowArg > ,
485+ no_workflow : bool ,
477486 languages : Vec < LanguageArg > ,
478487}
479488
@@ -493,6 +502,7 @@ async fn run_setup_wizard(mut base: BaseArgs, flags: WizardFlags) -> Result<()>
493502 background : flag_background,
494503 agent : flag_agent,
495504 workflows : flag_workflows,
505+ no_workflow : flag_no_workflow,
496506 languages : flag_languages,
497507 } = flags;
498508 const LOGO : & str = include_str ! ( "../../ascii-logo-blue-small.txt" ) ;
@@ -630,6 +640,7 @@ async fn run_setup_wizard(mut base: BaseArgs, flags: WizardFlags) -> Result<()>
630640 local : matches ! ( scope, InstallScope :: Local ) ,
631641 global : matches ! ( scope, InstallScope :: Global ) ,
632642 workflows : Vec :: new ( ) ,
643+ no_workflow : false ,
633644 yes : true ,
634645 no_fetch_docs : true ,
635646 refresh_docs : false ,
@@ -788,8 +799,10 @@ async fn run_setup_wizard(mut base: BaseArgs, flags: WizardFlags) -> Result<()>
788799 }
789800 } ;
790801
791- // Workflows: explicit flag > interactive prompt > default instrument+observe.
792- let wizard_workflows = if !flag_workflows. is_empty ( ) {
802+ // Workflows: --no-workflow > explicit flag > interactive prompt > default instrument+observe.
803+ let wizard_workflows = if flag_no_workflow {
804+ Vec :: new ( )
805+ } else if !flag_workflows. is_empty ( ) {
793806 let mut selected = resolve_workflow_selection ( & flag_workflows) ;
794807 if !selected. contains ( & WorkflowArg :: Instrument ) {
795808 selected. push ( WorkflowArg :: Instrument ) ;
@@ -1241,6 +1254,8 @@ async fn execute_skills_setup(
12411254 notes. push (
12421255 "Skipped workflow docs prefetch (no agents configured successfully)." . to_string ( ) ,
12431256 ) ;
1257+ } else if args. no_workflow {
1258+ notes. push ( "Skipped workflow docs prefetch (`--no-workflow`)." . to_string ( ) ) ;
12441259 } else if args. no_fetch_docs {
12451260 notes. push ( "Skipped workflow docs prefetch (`--no-fetch-docs`)." . to_string ( ) ) ;
12461261 } else if selected_workflows. is_empty ( ) {
@@ -1424,6 +1439,7 @@ async fn run_instrument_setup(
14241439 local : true ,
14251440 global : false ,
14261441 workflows : selected_workflows. clone ( ) ,
1442+ no_workflow : false ,
14271443 yes : true ,
14281444 no_fetch_docs : false ,
14291445 refresh_docs : args. refresh_docs ,
@@ -2436,7 +2452,8 @@ fn resolve_setup_selection(
24362452 ) ;
24372453 let interactive = ui:: is_interactive ( ) && !args. yes && !json;
24382454 let mut prompted_agents: Option < Vec < Agent > > = None ;
2439- let mut prompted_workflows: Option < Vec < WorkflowArg > > = if args. no_fetch_docs {
2455+ let mut prompted_workflows: Option < Vec < WorkflowArg > > = if args. no_fetch_docs || args. no_workflow
2456+ {
24402457 Some ( Vec :: new ( ) )
24412458 } else {
24422459 None
@@ -2457,7 +2474,7 @@ fn resolve_setup_selection(
24572474 if args. agent . is_none ( ) {
24582475 steps. push ( SetupWizardStep :: Agents ) ;
24592476 }
2460- if !args. no_fetch_docs && args. workflows . is_empty ( ) {
2477+ if !args. no_fetch_docs && !args . no_workflow && args. workflows . is_empty ( ) {
24612478 steps. push ( SetupWizardStep :: Workflows ) ;
24622479 }
24632480
0 commit comments