Installation
- Server Requirements
- Installing the PrismGo Installer
- Creating an Application
- Project Creation Options
- Initial Configuration
- Upgrading from Built-in Horizon
- Next Steps
Server Requirements
PrismGo applications require:
| Tool | Requirement | Purpose |
|---|---|---|
| Go | 1.26+ | Install the installer, compile the app, run go mod tidy, and run tests |
| Git | Available | Fetch the official application skeleton from github.com/prismgo/prismgo |
| Network | GitHub access | Required while creating a new application |
Installing the PrismGo Installer
Install with the Go toolchain:
go install github.com/prismgo/installer/cmd/prismgo@latestOr use the install script:
curl -fsSL https://raw.githubusercontent.com/prismgo/installer/main/scripts/install.sh | shMake sure the bin directory under go env GOPATH, or go env GOBIN, is on your PATH. Verify the install:
prismgo --helpCreating an Application
Create an application with a short name:
prismgo new myapp
cd myappThe generated directory is myapp, and go.mod uses:
module myappCreate an application with a full Go module path:
prismgo new github.com/acme/myapp
cd myappThe generated directory is still myapp, and go.mod uses:
module github.com/acme/myappAfter creation, the installer copies .env.example to .env and runs:
go mod tidy
go test ./...Start the built-in HTTP server:
go run . serveVisit:
http://localhost:8080/api
http://localhost:8080/api/healthProject Creation Options
| Command | Description |
|---|---|
prismgo new myapp --module github.com/acme/service | Explicitly set the go.mod module |
prismgo new myapp --no-install | Skip go mod tidy and go test ./... |
prismgo new myapp --git | Initialize a local Git repository |
prismgo new myapp --git --branch develop | Initialize Git with a specific initial branch |
prismgo new myapp --force | Reuse an existing empty directory |
--no-install only skips dependency tidy and tests. It does not skip fetching the application skeleton, so Git and GitHub access are still required.
--force only works with an empty directory. It does not delete or overwrite a non-empty directory.
Initial Configuration
A new application receives its .env from .env.example. The first values to review are usually:
APP_NAME=Prismgo
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost:8080
SERVER_HOST=127.0.0.1
SERVER_PORT=8080If the application uses encryption, encrypted queue payloads, encrypted sessions, or temporary signed URLs, generate an application key first:
go run . key:generateProduction environments must disable debug mode:
APP_ENV=production
APP_DEBUG=falseUpgrading from Built-in Horizon
Horizon has moved to an independent module. For an existing application that uses Horizon:
- Run
go get github.com/prismgo/horizon@latest. - Replace
github.com/prismgo/framework/horizonandgithub.com/prismgo/framework/horizon/cmdimports withgithub.com/prismgo/horizonandgithub.com/prismgo/horizon/cmdrespectively. - Register the extension through
WithExtensionProviders(horizon.ServiceProvider{})on the Application Builder. - Run
go mod tidyand your application tests.
There is no compatibility shim for the old import paths. Command names, horizon.* configuration, Dashboard/API behavior, and the horizon.manager container key remain unchanged. See Horizon for the complete installation and provider responsibilities.
Next Steps
- Read Getting Started to build your first HTTP endpoint.
- Read Configuration to understand
config/*.goand.envloading. - Read Commands for
serve,make:*,migrate:*, andqueue:*. - Read HTTP Server for ports, timeouts, proxies, and process control.