Skip to content

Conversation

@CGoodwin90
Copy link
Contributor

@CGoodwin90 CGoodwin90 commented Aug 7, 2025

Implements an interactive project creation wizard, allowing users to create projects through a guided step-by-step process. The wizard is utilizing https://github.com/charmbracelet/huh for form structure & prompts.

Adds a new --interactive flag to the lagoon add project command. It's currently feature flagged behind the experimental flag introduced in #462. Adds the wizard & theme-ing logic in the internal/wizard/ directory.

The wizard gathers all mandatory fields for project creation, with the option to add additional fields. Input validation occurs for projectName, gitUrl, quotas, deploytargets etc. On success, the equivalent CLI command for the project creaton is generated & output for reference and re-use.

Wizard Flow Screenshots

Step Screenshot
Project Create
Organization Selection
Mandatory Config
Additional fields selection
Additional fields input
Project Creation Output

@CGoodwin90 CGoodwin90 marked this pull request as ready for review August 14, 2025 11:40
@CGoodwin90 CGoodwin90 requested a review from bomoko September 3, 2025 11:44
@bomoko bomoko requested a review from Copilot September 8, 2025 18:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an interactive project creation wizard to the Lagoon CLI using the charmbracelet/huh library for forms and prompts. The wizard provides a guided step-by-step process for creating projects with input validation and is feature-flagged behind the experimental configuration.

  • Implements an interactive project creation wizard with step-by-step forms
  • Adds input validation for project names, Git URLs, and organization quotas
  • Generates equivalent CLI commands for reference and reuse after project creation

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/wizard/themes/ThemeLagoon.go Defines custom Lagoon-branded theme for the wizard UI
internal/wizard/project/create.go Main wizard logic with forms for project configuration and validation
internal/util/shared.go Utility functions for validation and CLI command generation
go.mod Adds charmbracelet dependencies for the wizard functionality
docs/commands/lagoon_add_project.md Documents the new --interactive flag
cmd/root.go Adds experimental flag checking
cmd/project.go Integrates wizard into the add project command

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants