feat(init): support fully non-interactive setup via flags#561
Open
I-bangash wants to merge 1 commit into
Open
Conversation
Adds --sandbox-provider, --backlog-manager, --create-label, and --build-image flags to sandcastle init. When all four are provided, init runs end-to-end without any interactive prompts — required for CI/non-TTY environments. All new flags follow the same Options.text + optional pattern as the existing --template/--agent/--model flags: omit to be prompted, pass a value to skip the prompt. --create-label and --build-image accept true or false; any other value errors with a list of valid choices. --sandbox-provider and --backlog-manager reject unknown values the same way. Closes mattpocock#510. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@I-bangash is attempting to deploy a commit to the Matt Pocock's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #510.
sandcastle initpreviously had four prompts with no flag overrides, which made it impossible to run in a non-TTY environment (CI, scripts, container builds). This PR adds an override flag for every remaining prompt so init runs end-to-end with stdin closed.New flags
--sandbox-providerdocker,podman--backlog-managergithub-issues,beads--create-labeltrue,false--build-imagetrue,falseAll four flags follow the same
Options.text + optionalpattern as the existing--template,--agent, and--modelflags: omit to be prompted, pass a value to skip the prompt.When all flags are provided,
initskips every clack prompt and runs to completion. Existing interactive behavior is unchanged when flags are omitted.Validation
--sandbox-providerand--backlog-managerreject unknown values with an error listing valid choices.--create-labeland--build-imagereject values other thantrue/falsewith an error listing valid choices.Non-interactive example
Exits 0, scaffolds
.sandcastle/, no prompts.Tests
8 new cases in
src/cli.test.ts:init --help; removed flag names do not--sandbox-provider/--backlog-managervalues error with the available list--create-label/--build-imagewith a non-boolean value error withtrue, false--sandbox-provider podmanwrites aContainerfile(noDockerfile)--backlog-manager beadsskips the GitHub label step regardless of label flagVerification
npm run typecheckpassesnpm run buildpassesnpx vitest run src/cli.test.ts— 22/22 passpatch, perCLAUDE.md's pre-1.0 policy)sandcastle initoptions table updated