You know npm, package.json, and npm run dev. You have never installed Go.
This guide gets you from zero to a running rfw app without assuming any Go
background.
rfw requires Go 1.25 or newer.
Most distro packages lag behind. Prefer the official tarball:
curl -LO https://go.dev/dl/go1.25.0.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gzThen add Go to your PATH (in ~/.bashrc or ~/.zshrc):
export PATH=$PATH:/usr/local/go/binIf you prefer your package manager, check the version first: you need 1.25+.
On Arch pacman -S go is current; on Debian/Ubuntu the golang package is
often too old, use the tarball instead.
brew install goOr download the official .pkg installer from go.dev/dl
and run it.
Download the .msi installer from go.dev/dl and run it.
It sets up PATH for you. Alternatively:
winget install GoLang.Gogo version
# go version go1.25.0 linux/amd64This is the step that trips up almost everyone coming from Node.
go install downloads, compiles, and drops binaries into $(go env GOPATH)/bin
(usually ~/go/bin). That directory is not on your PATH by default. If you
run go install ... and then get command not found, this is why.
Fix it once, in your shell profile:
# ~/.bashrc or ~/.zshrc
export PATH="$PATH:$(go env GOPATH)/bin"On Windows, add %USERPROFILE%\go\bin to your user PATH in the environment
variables settings.
Open a new terminal (or source the profile) and you are done.
| Node world | Go world | Notes |
|---|---|---|
npm i -g <tool> |
go install <module>@latest |
Installs a binary into $(go env GOPATH)/bin |
npm create <template> |
rfw init <module-path> |
Scaffolds a new project |
npm run dev |
rfw dev |
Dev server with rebuild on change |
package.json |
go.mod |
Module name plus dependency list; managed by go mod tidy |
node_modules/ |
module cache in ~/go/pkg/mod |
Global, deduplicated, never inside your project |
| the JS bundle | the wasm binary | One compiled artifact instead of a bundling pipeline |
Two things have no npm equivalent and need no replacement: there is no
npm install step after cloning (the toolchain fetches dependencies on build),
and there is no bundler config at all.
go install github.com/rfwlab/rfw/v2/cmd/rfw@latest
rfw init github.com/yourname/hello
cd hello
rfw devNotes:
rfw inittakes a module path (like thenamefield inpackage.json, but globally unique by convention; a GitHub-style path is customary even if you never publish it). The project directory is the last segment,hello.rfw devserves on port8080by default. Override with--port, theRFW_PORTenvironment variable, or aportfield inrfw.json.
Open http://localhost:8080 and you should see the scaffolded hello page.