How gitkumi/snowflake works
Project type and purpose
• Snowflake is a Go‑based command‑line interface (CLI) application generator.
• It scaffolds new web‐service projects (Gin router, sqlc/goose for databases, templating for HTML, etc.), and can also run or inspect existing projects via subcommands.
File structure
• Top‐level entrypoint: main.go + cmd/cli/main.go (bootstraps the CLI).
• internal/commands: each subcommand (generate, run, tui, version) lives in its own package under internal/commands.
• internal/initialize: the scaffolding engine (file/directory creation, template management) and a rich directory of “base” + “fragments” templates.
• grammar & internal/parser: ANTLR grammar for SQLite + parser code to read SQL schemas/queries (used by generate).
• testdata: sample SQL + sqlc config used in parser tests.
• CI pipeline: .github/workflows (push, release).
• Configs: go.mod, Makefile, PUBLISH.md, LICENSE.
README for additional insights
• Snowflake supports sqlite3/postgres/mysql via sqlc + goose migrations.
• Uses third‐party libs: Gin router, air (dev watcher), templ (HTML templates), gotestsum.
• Two UX modes: TUI (“snowflake new”) and direct CLI (“snowflake run …”).
Essential details
• Template directory structure (base vs. fragments) under the Scaffold Engine.