Quickstart
This page installs the forj CLI, creates a generated GoForj App, builds it, and runs the local runtime.
Prerequisites
- Go 1.25 or newer installed for your platform.
- Docker and the
docker-composecommand available if you select Docker-backed components in the project wizard. On macOS, OrbStack is a recommended Docker-compatible option that is fast and lightweight.
Install the CLI
Install forj with Go:
go install github.com/goforj/goforj/cmd/forj@latestMake sure your Go binary directory is on your PATH. For most local Go installs, that means:
export PATH="$(go env GOPATH)/bin:$PATH"Verify the CLI:
forj --helpCreate An App
Run the project wizard:
forj newFor a deterministic first App, choose a small HTTP shape:
- select
cli - select
web_api - leave
web_uidisabled unless you want a frontend starter kit - leave database, jobs, scheduler, and distributed infrastructure disabled for the first run
If you keep the wizard defaults instead, the same commands below still apply as long as HTTP is enabled.
The wizard asks for:
- project name
- Go module path
- components to render
- optional starter kit
- project path
The project name becomes APP_NAME. The module path becomes the Go module path used by imports in generated code.
After the wizard completes, move into the generated App:
cd path/to/your-appBuild The App
Run the framework build pipeline:
forj buildforj build runs the generated-code pipeline, runs Wire, builds API index artifacts, and then runs go build. With no extra arguments, the app binary is written to:
./bin/appYou should now have a generated Go project with files such as:
.goforj.yml
.env
main.go
wire/
internal/
bin/appRun The App
Run the combined local runtime:
forj appapp is the generated App command alias for the combined runtime. It starts the enabled runtimes together in one local process.
Depending on the components you selected, the combined runtime can include:
- HTTP server
- queue workers
- scheduler
- metrics endpoint
- Lighthouse agent/runtime integration
Inspect The App Commands
Generated Apps expose their own command surface. Inside the App directory, run those commands through forj:
forj route:listCommon generated commands include:
appstarts enabled App runtimes together.apistarts only the HTTP server.route:listlists HTTP routes.workerstarts queue workers.schedulerstarts the scheduler.migrateruns database migrations when database support is enabled.
The available commands depend on the components selected in .goforj.yml.
Use Dev Mode
For day-to-day local work, use:
forj devforj dev reads .goforj.yml, runs configured pre-tasks, watches files, rebuilds the app, and restarts the generated binary when needed.
If the generated project starts Docker resources, shut them down with:
forj downVerify
After starting the runtime, verify the HTTP surface if HTTP is enabled:
curl http://localhost:3000/-/healthExpected response:
{"status":"ok"}You can also list routes:
forj route:listFor an HTTP App, the route list should include framework routes such as /-/health and /-/ready. If the sample controller is enabled, it should also include a generated application route under /api/v1.
Next Steps
- Project Structure explains where generated App code lives.
- Configuration explains
.goforj.yml,.env, and driver selection. - Core Concepts explains the App, runtime lifecycle, providers, and generated components.
