Installation
The Gofasta CLI is a standalone Go binary. There are two ways to install it.
Option A: go install (recommended for Go developers)
Requires Go 1.25.0 or later.
go install github.com/gofastadev/cli/cmd/gofasta@latestThis compiles the CLI from source using your local Go toolchain and drops the gofasta binary into $GOBIN — or $GOPATH/bin when GOBIN is unset, which usually resolves to ~/go/bin. If gofasta runs after this, you’re done. If you see command not found: gofasta, skip to Troubleshooting below — it’s a one-time PATH fix.
Because gofasta is a tool for Go developers, this is the simplest path: you already have everything you need.
Option B: Pre-built binary (no Go toolchain needed)
If you don’t have Go installed or just want a single self-contained binary:
curl -fsSL https://raw.githubusercontent.com/gofastadev/cli/main/dist/install.sh | shThis downloads the latest pre-built binary for your platform from GitHub Releases and installs it to /usr/local/bin/gofasta. Works on macOS and Linux for both amd64 and arm64. The script detects your shell and prints exact export PATH=… instructions if the install directory isn’t already on your $PATH, so most users are done after running it.
You can also grab a binary manually from the releases page and put it on your PATH yourself.
Verify Installation
gofasta --helpYou should see a list of available commands:
The Gofasta CLI creates new projects, generates code,
and runs common development tasks.
Usage:
gofasta [command]
Available Commands:
new Create a new Gofasta project
dev Run the development server with hot reload
generate Generate code (model, service, controller, etc.)
migrate Run database migrations
seed Run database seeders
init Initialize a cloned project
serve Start the HTTP server
wire Regenerate Wire dependency injection
swagger Generate Swagger/OpenAPI docs
help Help about any commandTroubleshooting
command not found: gofasta after go install
This is the most common first-time issue with any go install-distributed CLI, not specific to gofasta. Go installed the binary into $GOPATH/bin (typically ~/go/bin), but that directory isn’t on your shell’s $PATH.
1. Confirm the binary is there:
ls -l "$(go env GOPATH)/bin/gofasta"If you see the file, the install succeeded — you just need to make its directory reachable by your shell.
2. Add the directory to your $PATH once:
# zsh (default on macOS)
echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.zshrc
source ~/.zshrc
# bash
echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.bashrc
source ~/.bashrc
# fish
fish_add_path (go env GOPATH)/bin3. Verify:
gofasta --versionThis is a one-time setup per machine — every future go install (for any Go tool) lands in the same directory, so once ~/go/bin is on your $PATH you never need to do this again.
gofasta --version reports dev (pre-v0.1.3 only)
CLI versions before v0.1.3 shipped with Version = "dev" as a hardcoded default, only overridden for pre-built binaries at release time. go install never applies release-time flags, so Option A installs always reported dev regardless of the actual tag you installed.
This was fixed in v0.1.3: the CLI now reads the installed module version via Go’s built-in runtime/debug.ReadBuildInfo() at startup, so go install users now see the correct tag automatically. If you installed before v0.1.3, re-run:
go install github.com/gofastadev/cli/cmd/gofasta@latestgo install picked up the wrong Go version
If you see something like go: github.com/gofastadev/cli@v0.1.2 requires go >= 1.25.0; switching to go1.25.1, Go’s auto-toolchain feature downloaded the required version for you automatically. This is expected — your install will succeed. If it fails, upgrade your local Go to 1.25.0 or later manually via go.dev/dl .
Which option should I use?
| Your situation | Use |
|---|---|
| You have Go installed and use it day-to-day | Option A — no extra downloads, no version drift |
| You don’t have Go installed | Option B — self-contained binary, no toolchain |
Corporate machine where go install is blocked | Option B — downloads a pre-built binary instead |
| You want reproducible pinned versions in CI | Either — both support version pinning (@v0.1.3 for Option A, GOFASTA_VERSION=v0.1.3 sh install.sh is on the roadmap) |
Both paths end up as a gofasta binary on disk, so pick whichever fits your environment. You can switch between them at any time.
Prerequisites for Generated Projects
The CLI itself only needs Go. But the projects it generates use these tools (installed automatically during gofasta new):
| Tool | Purpose | Installed via |
|---|---|---|
| Wire | Compile-time dependency injection | go get + go mod edit -tool |
| gqlgen | GraphQL code generation | go get + go mod edit -tool (only when using --graphql) |
| Air | Hot reload during development | go get + go mod edit -tool |
| swag | Swagger/OpenAPI doc generation | go get + go mod edit -tool |
| Docker | Run the app + PostgreSQL locally | Manual install |
gqlgen is only installed as a tool dependency when you create a project with gofasta new myapp --graphql. REST-only projects do not require or include gqlgen.
Docker is optional — you can run the app directly on your machine if you have a local PostgreSQL instance.