MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / addSetupOptions

Function addSetupOptions

src/commands/init.ts:430–451  ·  view source on GitHub ↗

Attach the onboarding flags shared by `setup` and the `init` alias.

(
  cmd: Command,
  validTargets: AgentTarget[],
  defaultAgent: AgentTarget,
)

Source from the content-addressed store, hash-verified

428
429/** Attach the onboarding flags shared by `setup` and the `init` alias. */
430function 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. */
454function buildSetupOptions(

Callers 2

createSetupCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected