PreparedstockforGoAPIs

_

_

apistock is a Go library and a CLI that write a complete, working API into your repository

Plain Go: net/http, log/slog and constructors instead of a DI container. The generated app owns its flows, tables and SQL. The library holds the parts that need security fixes, so they reach you with go get.

Tools we built around apistock: watch an app that is running, and inspect the one on your bench.

Open Observe

Requests and traces(1/3)

Every request with its trace, SQL and logs, grouped by request ID. No agent to install.

Errors, grouped(2/3)

Problems grouped by cause with the request that raised them, so you fix the cause once.

Jobs and mail(3/3)

Job runs, retries and sent mail beside the requests that queued them.

Open Devtools

Route explorer(1/3)

Every endpoint from openapi.json, with a request builder that uses your signed-in session.

Module graph(2/3)

The wiring in internal/app drawn as a graph, read from the source, not from reflection.

Jobs, mail and settings(3/3)

Run a job now, read the last email, change a runtime setting, reset the seed data.

_

It makes the calls, and says what each one costs.

You are not picking a router, a migration tool and an auth library on day one. Each choice below has a written record you can read before you commit.

_

Read every line you ship.

Four layers, one SQL file per query, and a wiring file with a named anchor where generators add a line instead of rewriting yours.

aps new acme-api

Cut the stock

preset, tenancy, email provider
under a minute

aps dev

Start it locally

Postgres, Mailpit, migrations, seed
API ready in about 10 s

aps gen resource Invoice

Add what you sell

four layers, SQL, tests
one line at a named anchor

go build ./cmd/api

Ship one binary

migrations under an advisory lock
release tracking per instance

Side Left

Side Right

_

From an empty folder to a running API

Four commands. Each one ends by naming the next, refuses to run on a dirty tree, and leaves git checkout as the undo button.

_

_

Build apistock with us

Apache 2.0, built in the open, with every decision on record. Star the repository, open an issue when something is wrong, or send a pull request; the contribution guide says how.