$ show Melkeydev/go-blueprint
Go Blueprint is a CLI tool for scaffolding Go project structures with optional integration of popular web frameworks (Chi, Gin, Fiber, Echo, Gorilla, HttpRouter, standard library), database drivers (MySQL, Postgres, SQLite, Mongo, Redis, Scylla), and advanced features (HTMX/Templ, Tailwind CSS, React/Vite, WebSocket, Docker, CI/CD workflows). The tool operates both interactively (via a TUI built with Bubble Tea) and non-interactively via command-line flags. It generates a complete project skeleton including `go.mod`, `Makefile`, `.air.toml`, `.env`, server code, routes, tests, and Docker configuration. The architecture is a standard CLI application using Cobra, with a clear separation of concerns: flags parsing, UI components, template generation, and project file creation. The codebase is well-structured, modular, and includes comprehensive CI/CD pipelines (linting, integration tests via Testcontainers, release automation). It is a practical, production-ready tool for Go developers.
The LLM identified 4 files worth highlighting for reuse:
Provides a reusable Bubble Tea model for single-selection lists. It implements the tea.Model interface with keyboard navigation (up/down, enter, 'y' to confirm), cursor highlighting, and styled output. The package defines a Selection struct and a model that can be instantiated with a list of choices, a selection pointer, and a header. This component is isolated (only imports Bubble Tea and lipgloss) and can be extracted to build TUI selection prompts in other Go CLIs.
Similar to multiInput but for multi-select functionality. Allows users to toggle multiple options with space/enter and confirm with 'y'. Uses a map to track selections and provides a Selection struct with an Update method. Demonstrates clean separation of model/view/update and can be reused in any TUI project requiring multiple choices.
A lightweight Bubble Tea spinner component that displays an animated loading indicator. It uses the bubbles/spinner package and triggers a tick command. The model handles quitting via 'q'/'esc'/'ctrl+c' and displays errors. This is a self-contained, reusable component for indicating progress in TUI applications.
A text input component using Bubble Tea's textinput model. It includes input sanitization via regex (only allows alphanumeric, underscores, slashes, dots, hyphens), a title header, and error handling. The Output struct captures the final value. This component is isolated and reusable for any CLI that needs a validated text input field.