Skip to content

Commit b88d4b8

Browse files
acmoreclaude
andcommitted
feat(cli): wire interactive prompts into init command
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7dc9ec8 commit b88d4b8

1 file changed

Lines changed: 5 additions & 17 deletions

File tree

internal/cli/init.go

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,12 @@ func newInitCmd(opts *Options) *cobra.Command {
3535
}
3636

3737
vars := config.NewTemplateVars()
38-
if nameOverride != "" {
39-
vars.Name = nameOverride
40-
}
41-
if nsOverride != "" {
42-
vars.Namespace = nsOverride
43-
}
44-
if vars.Name == "" {
45-
wd, _ := os.Getwd()
46-
if wd != "" {
47-
vars.Name = filepath.Base(wd)
48-
} else {
49-
vars.Name = "my-project"
50-
}
51-
}
38+
overrides := InitOverrides{Name: nameOverride, Namespace: nsOverride}
39+
applyOverrides(vars, overrides)
5240

53-
// TODO: interactive prompts will be added in Task 8/9
54-
// For now, non-interactive only (--yes is implicit until prompts are wired)
55-
_ = yes
41+
if err := promptInteractive(vars, yes); err != nil {
42+
return err
43+
}
5644

5745
rendered, err := config.RenderTemplate(templateRef, vars)
5846
if err != nil {

0 commit comments

Comments
 (0)