Install and run

This page gets a Piko project running on your machine. Expect five minutes from a clean shell to a live dev server. For what to edit first once the server is up see Your first page.

Prerequisites

Piko targets Go 1.26 or later. Check your version with go version. If you do not have Go, install it from go.dev/dl.

Install the CLI

go install piko.sh/piko/cmd/piko@latest

Confirm the install:

piko version

The binary lands in $GOPATH/bin (usually ~/go/bin). Add that to your PATH if piko version cannot find the command. For every subcommand the CLI supports see the CLI reference.

Create a project

piko new

The interactive wizard asks for a project name, location, and Go module path. Answer the prompts and step into the created directory:

cd my-project

The scaffolded tree contains the folders a typical Piko project uses (pages/, components/, actions/, partials/, pkg/, lib/icons/, dist/, e2e/, cmd/, internal/). See Project structure for a folder-by-folder map.

Install Air for live reload (optional)

Air rebuilds the binary and restarts the server when source files change. Recommended for day-to-day development:

go install github.com/air-verse/air@latest

Piko scaffolds an .air.toml configuration so Air knows which files to watch and which command to run.

Start the dev server

With Air:

air

Without Air:

go run ./cmd/generator/main.go all
go run ./cmd/main/main.go dev

Either form listens on http://localhost:8080 (or the next free port). Open that URL in a browser to confirm the server is up.

Run modes

ModeCommandPurpose
devgo run ./cmd/main/main.go devDevelopment mode with compiled templates. The scaffolded bootstrap enables the dev widget and hot-reload.
dev-igo run ./cmd/main/main.go dev-iInterpreted mode. For testing the interpreter pipeline, not the default fast-feedback dev mode. The scaffolded bootstrap enables the dev widget and hot-reload here too, and requires ssr.WithSymbols(...) registration in cmd/main/main.go. See about interpreted mode.
prodgo run ./cmd/main/main.go prodProduction mode. Dev widgets off.

If cmd/main/main.go runs without an argument it falls back to dev. The scaffolded .air.toml points at dev by default. To wire up dev-i, see about interpreted mode for the bootstrap setup and runtime symbols reference for exposing symbols.

What to do next

With the server running:

  • Read Concepts for the Piko vocabulary: PK files, PKC components, actions, partials, collections, the querier, services, i18n.
  • Start Your first page to make your first edit with narrative guidance.

For the full CLI surface (every subcommand, flag, and usage pattern) see the CLI reference.