Skip to main content
The copper CLI scaffolds projects, builds binaries, runs your app with hot reload, and manages database migrations. Run copper help to see all commands.

copper create

Creates a new project in ./myapp (the last segment of the module path). With the default stack you get a React + Inertia + Vite frontend and a Postgres-backed data layer with migrations. -frontend=none creates a JSON API server; -storage=none skips the database entirely.

copper run

Builds and runs a target from cmd/, defaulting to app. On the first run, it also runs database migrations and starts the Vite dev server.
-migrate only exists in projects with a cmd/migrate target, and -web only in projects with a web/ frontend.
With -watch, Copper watches .go files under pkg/ (and web/wire.go), debounces changes, then rebuilds and restarts the target, sending desktop notifications on build success and failure.

copper build

Builds every binary under cmd/ into ./build/<target>.out. If the project has a frontend, it copies the static assets from web/public and embeds the frontend’s production build output (web/build) into the binary. Note that you should run the frontend build itself (npm run build in web/) beforehand. You may use --only to build specific targets:

copper migrate

Builds the migrate target and runs database migrations.

copper scaffold:pkg

Creates a new feature package:
  • pkg/rockets/wire.go — the package’s WireModule
  • pkg/rockets/models.go — a home for your models
It also registers rockets.WireModule in pkg/app/wire.go.

copper scaffold:queries

Creates pkg/rockets/queries.go with a Queries struct wrapping csql.Querier, and adds NewQueries to the package’s wire module. Run scaffold:pkg first if the package doesn’t exist yet.

copper scaffold:router

Creates pkg/rockets/router.go with an empty router, adds NewRouter to the package’s wire module, and registers the router in pkg/app/handler.go so its routes are served immediately.

copper version

Prints the CLI version.