feat(init): implement interactive wizard for agk init -i#18
Open
kunalkushwaha wants to merge 1 commit into
Open
feat(init): implement interactive wizard for agk init -i#18kunalkushwaha wants to merge 1 commit into
agk init -i#18kunalkushwaha wants to merge 1 commit into
Conversation
The `-i/--interactive` flag was parsed but never did anything. This wires it to a guided setup flow that prompts for project name, template, LLM provider, and description, then scaffolds the chosen project. - stdin/stdout-driven prompter (decoupled for testing) with number-or-name choice selection and safe defaults (EOF falls back to defaults, no hang). - `agk init -i` may be run with no project-name arg; the wizard asks for it. - Unit tests cover the wizard flow, name prompting, EOF defaults, and invalid-then-valid choice handling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Implements the interactive init wizard. The
-i/--interactiveflag was already parsed and passed intoGenerateOptions.Interactive, but no generator ever read it — soagk init -ibehaved exactly like a non-interactive init. This wires it to a real guided setup flow.This is feature A1 from the
FEATURES.mdroadmap (and the long-standing "Interactive Init Wizard" roadmap item).Behavior
agk init -ican be run with no project-name arg — the wizard asks for it (args validation relaxed for interactive mode).Design for testability
The prompt flow is a small
prompterdecoupled fromos.Stdin/os.Stdout(io.Reader/io.Writer), so the wizard is unit-tested with piped input.Testing
go build,go vet,go test ./...,gofmtall green.agk init -i: scaffolds theworkflowtemplate with theollamaprovider correctly wired into the generatedmain.go(plugins/llm/ollama,Provider: "ollama").🤖 Generated with Claude Code