Attach the onboarding flags shared by `setup` and the `init` alias.
( cmd: Command, validTargets: AgentTarget[], defaultAgent: AgentTarget, )
| 428 | |
| 429 | /** Attach the onboarding flags shared by `setup` and the `init` alias. */ |
| 430 | function addSetupOptions( |
| 431 | cmd: Command, |
| 432 | validTargets: AgentTarget[], |
| 433 | defaultAgent: AgentTarget, |
| 434 | ): Command { |
| 435 | return cmd |
| 436 | .option('--api-key <key>', 'API key to configure (skips the interactive prompt)') |
| 437 | .option( |
| 438 | '--from-env', |
| 439 | 'Read TESTSPRITE_API_KEY from the environment instead of prompting', |
| 440 | false, |
| 441 | ) |
| 442 | .option( |
| 443 | '--agent <target>', |
| 444 | `Coding-agent target to install: ${validTargets.join(', ')} (default: ${defaultAgent})`, |
| 445 | defaultAgent, |
| 446 | ) |
| 447 | .option('--no-agent', 'Skip the agent skill install (configure credentials only)') |
| 448 | .option('--force', 'Overwrite an existing skill file (a .bak backup is kept)') |
| 449 | .option('--dir <path>', 'Project root for the skill install (default: current directory)') |
| 450 | .option('-y, --yes', 'Non-interactive: accept all defaults, never prompt'); |
| 451 | } |
| 452 | |
| 453 | /** Build {@link InitOptions} from raw Commander opts + globals. */ |
| 454 | function buildSetupOptions( |
no outgoing calls
no test coverage detected