Build from source
This guide installs the priompt, promptctl, and priompt-auth binaries from source with Go. It works on Linux, macOS, and Windows. Every binary is pure Go, with no C toolchain needed, and cross-compiles with two environment variables.
Prerequisites
Before you begin, make sure you have:
- Go 1.25 or later: on Linux, use the tarball from go.dev/dl, because distribution packages are often older. On macOS, run
brew install go. On Windows, runwinget install GoLang.Go. - git: only to build from a clone.
1. Install the binaries
The Go modules are published under github.com/priompt, so go install needs no clone.
To install the binaries:
-
Install the server. The other two binaries are optional:
go install github.com/priompt/priompt/cmd/priompt@latestgo install github.com/priompt/cli/cmd/promptctl@latestgo install github.com/priompt/auth/cmd/priompt-auth@latestGo puts the binaries in
$(go env GOPATH)/bin. To pin a release, replace@latestwith a version tag such as@v0.7.4. -
Check the server's version:
priompt versionOutputpriompt v0.7.4 (commit unknown, go1.26.4) -
Create a database to check that the storage engine works:
priompt migrate -db check.dbOutputschema up to date (version 4)Delete
check.dbafterwards.promptctlandpriompt-authprint their usage when you run them without arguments.
2. Build the server from a clone
Build from a clone to run unreleased changes. The repo builds on its own and fetches the other modules from the Go module proxy at the versions in its go.mod.
To build the server from a clone:
-
Clone the repo:
git clone https://github.com/priompt/priompt.gitcd priompt -
Build the binary. On Windows, name the output
priompt.exe:go build -o priompt ./cmd/priompt -
Start it:
./priompt serveThe server listens on
:8443and stores its database in./priompt.db.
The repo's Makefile also has make build and make test. To change several repos at once, see Development setup.
Cross-compile for another platform
Set GOOS and GOARCH to build for any target from any machine:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o dist/priompt-linux-amd64 ./cmd/priompt
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o dist/priompt-linux-arm64 ./cmd/priompt
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -o dist/priompt-darwin-arm64 ./cmd/priompt
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o dist/priompt-darwin-amd64 ./cmd/priompt
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o dist/priompt-windows-amd64.exe ./cmd/priompt
In PowerShell, set the variables first: $env:GOOS = "linux"; $env:GOARCH = "arm64"; $env:CGO_ENABLED = "0", then run go build.
Next steps
- Run the server as a service: Linux, macOS, or Windows.
- Quickstart: fetch a prompt and watch a change arrive.
- Development setup: work on several Priompt repos at once.