Skip to content

Project Scaffolding Engine

The gosec Scaffolding Engine (gosec init / pkg/scaffold) generates production-grade Go starter projects with selective modular components.


Scaffolding Archetypes

When generating a new project, developers choose one of five foundational archetypes:

  1. cli: Robust command-line tool with subcommands, tabwriters, flags, and help menus.
  2. api: Fast, lightweight HTTP/REST API with structured JSON logging, routing, health endpoints, and graceful shutdown.
  3. mcp-server: Dedicated Model Context Protocol server exposing custom tools over stdio JSON-RPC 2.0 to Antigravity and AI agents.
  4. library: Minimal, modular Go package with zero dependencies, clean unit tests, and GitHub Actions CI.
  5. astro: Full-stack Go API backend paired with a modern Astro + Tailwind v4 web frontend optimized for Cloudflare Pages edge hosting.

Modular Add-ons & Feature Toggles

Each archetype can selectively include:

Module Description Included Assets
antigravity Native AI tooling .agents/, AGENTS.md, GEMINI.md, mcp_config.json
backlog SQLite task DAG ledger pkg/backlog, local/backlog.sqlite, CLI commands
ollama Local LLM tiering ($0.00) pkg/ollama, graceful cloud fallback
devcontainer Hermetic container .devcontainer/Dockerfile, .devcontainer/devcontainer.json
docs Documentation platform mkdocs.yml, docs/, GitHub Pages workflow
ci GitHub Actions CI/CD .github/workflows/ci.yml, Gemini triage workflow
triage Autonomous failure triage pkg/triage, automated error parsing & commenting
astro Astro + Cloudflare Pages web/ (astro.config.mjs, wrangler.toml, public/_headers, Tailwind v4)

Command Usage

Interactive terminal wizard:

./bin/gosec init

Flag-driven non-interactive invocation:

./bin/gosec init myapp --archetype=api --with-astro --with-antigravity --with-ci

Scaffolding an Astro fullstack application:

./bin/gosec init myapp --archetype=astro --module=github.com/myorg/myapp
cd myapp/web && npm install && npm run build