A Go backend you’d write yourself — scaffolded.

Gofasta is a CLI and library for Go backend services. It scaffolds a project in one command — standard Go, compile-time DI, every package swappable — with first-class tooling for AI coding agents.

go install github.com/gofastadev/cli/cmd/gofasta@latest
Terminal
$ gofasta new myapp🚀 Creating new gofasta project: myapp📁 Creating directory myapp/📦 Initializing Go module: myapp🏗  Creating project structure...📦 Installing gofasta library...🔌 Generating Wire DI code...🔧 Initializing git repository...✓ Project myapp created successfully!
$ cd myapp && gofasta devStarting gofasta development server...🗄  Running migrations...🚀 Starting air (hot reload)...   REST API:  http://localhost:8080 
Who it's for

Who uses Gofasta

One toolkit, six kinds of teams. Gofasta generates standard Go so the code fits every workflow — solo founder to regulated enterprise.

Solo Engineers

Skip the first two weeks of plumbing. Scaffold auth, database, jobs, and deploys in minutes — then focus on what only you can build.

Indie Hackers

Launch your SaaS in an afternoon, not a month. One command ships a production backend that's ready for paying customers on day one.

Startup CTOs

Move at seed-stage speed on a foundation that holds at Series B. Standard Go, compile-time DI, every package independently swappable.

Senior Engineers

No custom runtime, no annotations, no lock-in. Read every line end-to-end. Google Wire for DI, standard net/http for transport, plain Go everywhere.

Agencies & Consultancies

Ship client projects in days, hand off in standard Go. No proprietary runtime to document — the code stands entirely on its own.

Enterprise Teams

JWT + RBAC, structured errors, security headers, Prometheus, OpenTelemetry, and audit-ready logging — wired on day one. Deploy to any VPS or CI/CD.

Three promises

What Gofasta is

Three design commitments shape every pkg/* package and every generated file. If any one of them doesn't fit your project, Gofasta probably isn't the right toolkit.

01

Standard Go. Zero lock-in.

Every file is idiomatic Go. No custom compiler, no annotations, no runtime wrapper. Every project builds with go build, tests with go test, deploys with any CI/CD. Every pkg/* package is deletable — keep what fits, replace what doesn't.

02

Agent-native by default.

Every command accepts --json. Every error carries a stable code. A scaffolded AGENTS.md briefs any AI coding agent on your project's conventions. One command — gofasta ai claude — configures Claude Code, Cursor, Codex, Aider, or Windsurf. Humans and agents work the same way.

03

Production from minute one.

JWT + RBAC, rate limiting, CORS, security headers, Prometheus metrics, OpenTelemetry tracing, email, file storage, background jobs, and deploy-to-VPS — scaffolded as importable packages. No stubs. No TODOs. Real production code on day one.

Agent-Native

A Go toolkit built for humans and AI agents.

AI coding agents aren't afterthoughts — they're first-class users. Every surface of Gofasta is machine-readable so agents can scaffold, verify, inspect, and ship alongside you without losing context.

  • Universal --json flag

    Every command emits structured output. Pipe it into jq, into an agent, into CI.

  • Stable error codes

    ROUTES_DIR_MISSING, WIRE_MISSING_PROVIDER, GO_BUILD_FAILED — not opaque strings.

  • Scaffolded AGENTS.md

    A ready-to-read briefing that teaches any AI coding agent how your project is laid out.

  • One-command agent setup

    gofasta ai claude — or cursor, codex, aider, windsurf. Editor rules in seconds.

  • High-level commands

    verify, status, inspect, do — multi-step workflows collapsed into a single call with structured output.

gofasta status --jsonjson
Local dev dashboard

Debug visually, not through log greps.

`gofasta dev --dashboard` stands up a self-contained HTML debug panel on :9090 — live metrics, request log, SQL, trace waterfall. Zero runtime agent, zero cloud service.

Trace waterfall

Per-request spans — controller, service, repository, SQL — with call-stack snapshots so you see exactly where each span was opened.

N+1 detection

Duplicate SQL templates firing inside one trace get flagged automatically — with a link to the offending request.

Edit & replay

Click replay on any captured request, tweak the JSON body inline, fire it again against the live app, and watch the trace update.

Per-request logs

Every slog record is tagged with its trace ID. Expand a request, switch to the Logs tab, and see only that request's log lines.

Profiles + goroutines

One-click links to CPU, heap, mutex, and block profiles from net/http/pprof. Goroutines grouped by top-of-stack so leaks jump out.

Zero production cost

Every surface above is gated by the `devtools` build tag. `go build` without it compiles the stub — pass-through middleware, no-op plugins.

Plus panic history, cache hit/miss, EXPLAIN plans, HAR export, and more. Read the debugging guide →

What you get

What's in Gofasta

A CLI that scaffolds your project, and a curated library of composable Go packages that handle the rest — every one of them independently swappable.

One-command scaffolding

gofasta g scaffold spins up a full CRUD resource — model, repository, service, controller, routes, DTOs, and Wire provider — in one call.

Agent-native tooling

Scaffolded AGENTS.md, llms.txt for the docs, editor rules for Claude / Cursor / Codex / Aider / Windsurf, and --json on every command.

Auth & RBAC

JWT (access + refresh), role-based access control via Casbin, and drop-in middleware. Ready the moment your project boots.

Multi-database

PostgreSQL, MySQL, SQLite, SQL Server, and ClickHouse through a single GORM interface. Switch drivers with one config change.

REST + optional GraphQL

REST out of the box; add --graphql and gqlgen wires GraphQL alongside REST sharing the same service layer. No duplicate logic.

Background jobs & tasks

Cron scheduling via robfig/cron and async task queues powered by Redis + Asynq. Generate jobs and tasks from the CLI.

Observability

Prometheus metrics at /metrics, OpenTelemetry distributed tracing, structured slog logging — all composable HTTP middleware.

Security & resilience

Rate limiting, CORS, CSP, HSTS, panic recovery, request IDs, retry policies, and circuit breakers — all composable middleware.

Deploy to any VPS

Scaffold Docker, systemd, GitHub Actions, and gofasta deploy to ship to any VPS. No proprietary cloud, no vendor lock-in.

Architectural guarantees

Four things Gofasta will never do to your code.

Every decision is one you can read, change, or remove. These four invariants hold across the CLI and the library — and they're the line in the sand between a toolkit and a framework.

Compile-time DI

Google Wire generates dependency wiring at build time. No reflection, no service locator, no runtime surprises.

Zero init-time side effects

Every pkg/* package has no side effects on import. Nothing starts until you start it. Nothing writes, listens, or connects without an explicit call.

Every package swappable

pkg/cache, pkg/mailer, pkg/auth — each is a standard Go import on an interface. Delete any one, plug in an alternative, move on.

Full eject anytime

Remove github.com/gofastadev/gofasta from go.mod entirely and your project still builds. No runtime tether. No proprietary contract.

Quick start

Install and run

Three commands. No cloud service, no signup, no configuration wizard. The CLI does the rest.

1

Install the CLI

go install github.com/gofastadev/cli/cmd/gofasta@latest
2

Create a project

gofasta new myapp
3

Start developing

cd myapp && gofasta dev

Try Gofasta

Install with go install. Scaffold with gofasta new. Run with gofasta dev.

go install github.com/gofastadev/cli/cmd/gofasta@latest