Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmbedFS embed.FS
View Source
var Registry = []Template{ { ID: "go-api", Name: "Go REST API", Description: "Production-ready Go HTTP API — Chi router, PostgreSQL, migrations, Docker, CI", Language: "go", HasDatabase: true, DBEngine: "postgres", }, { ID: "go-cli", Name: "Go CLI Tool", Description: "Go CLI tool — Cobra, GoReleaser, cross-platform CI pipeline", Language: "go", HasDatabase: false, }, { ID: "node-api", Name: "Node.js REST API", Description: "TypeScript Express API — Prisma ORM, PostgreSQL, Jest, Docker, CI", Language: "node", HasDatabase: true, DBEngine: "postgres", }, { ID: "next-app", Name: "Next.js Full-Stack App", Description: "Next.js 14 App Router — TypeScript, Prisma, PostgreSQL, Tailwind, CI", Language: "node", HasDatabase: true, DBEngine: "postgres", }, { ID: "python-api", Name: "Python FastAPI", Description: "FastAPI — SQLAlchemy, Alembic migrations, PostgreSQL, Docker, CI", Language: "python", HasDatabase: true, DBEngine: "postgres", }, { ID: "empty", Name: "Empty (devx-only)", Description: "Bare-minimum devx.yaml + .gitignore + README — bring your own stack", Language: "", HasDatabase: false, }, }
Registry contains all built-in templates.
Functions ¶
func GitAuthor ¶
func GitAuthor() string
GitAuthor returns the user's configured git name, falling back to the OS user.
func PostScaffold ¶
PostScaffold runs git init and language-specific setup in targetDir.
Types ¶
type Result ¶
type Result struct {
Written []string // files that were created or updated
Skipped []string // files that already existed and were preserved
}
Result contains a per-file breakdown of the scaffold operation.
type Template ¶
type Template struct {
ID string // matches the directory name under templates/
Name string // human-readable display name
Description string // shown in the interactive picker
Language string // "go", "node", "python", ""
HasDatabase bool // whether this template provisions a DB
DBEngine string // default DB engine for this template
}
Template describes a single embedded scaffold template.
type Vars ¶
type Vars struct {
ProjectName string // e.g. "my-service"
ProjectSlug string // snake_case version, e.g. "my_service"
ModulePath string // Go module path, e.g. "github.com/acme/go-my-service"
Author string // e.g. "James Nguyen"
Year string // e.g. "2026"
Domain string // e.g. "ipv1337.dev"
GoVersion string // e.g. "1.22"
Description string // one-line project description
HasDatabase bool // whether the template provisions a database
DBEngine string // e.g. "postgres"
}
Vars holds all substitution variables available inside every .tmpl file.
Click to show internal directories.
Click to hide internal directories.