Getting Started
Nubo runs scripts, serves HTTP routes, renders HTML, and embeds in Go applications. Choose either installation method below.
Install a release binary
Section titled “Install a release binary”- Open Nubo releases.
- Under a release’s Assets, download the binary for your operating system and CPU. Download the executable asset, not GitHub’s source-code archive.
- Rename it to
nubo(nubo.exeon Windows) and place it in a directory on yourPATH.
The repository builds these binary names; use the assets actually attached to your chosen release:
| Platform | Intel / AMD 64-bit | ARM 64-bit |
|---|---|---|
| macOS | nubo-darwin-amd64 | nubo-darwin-arm64 |
| Linux | nubo-linux-amd64 | nubo-linux-arm64 |
| Windows | nubo-windows-amd64.exe | nubo-windows-arm64.exe |
A release binary does not require installing Go. On macOS or Linux, make the downloaded file executable. For example, after downloading the Apple Silicon binary into your current directory:
mkdir -p "$HOME/.local/bin"cp ./nubo-darwin-arm64 "$HOME/.local/bin/nubo"chmod +x "$HOME/.local/bin/nubo"export PATH="$HOME/.local/bin:$PATH"Add that PATH setting to your shell startup file to keep it for future sessions. On Windows, put nubo.exe in a folder on your user Path, then open a new terminal.
Install with Go
Section titled “Install with Go”With Go installed, run:
go install github.com/nubolang/nubo/cmd/nubo@latestUse a Go toolchain meeting the selected version’s go.mod requirement; the current checkout declares Go 1.23.7. Go can select a newer toolchain when automatic toolchain downloads are enabled.
Go places the executable in GOBIN, or in $(go env GOPATH)/bin when GOBIN is unset. Add that directory to your PATH. For the default Unix layout:
export PATH="$(go env GOPATH)/bin:$PATH"Verify installation
Section titled “Verify installation”nubo --versionRun a script
Section titled “Run a script”Create main.nubo:
fn greet(name: string = "World") string { return "Hello, " + name}
println(greet(name: "Nubo"))nubo main.nuboThis prints Hello, Nubo. A standalone script does not require nubo init; use that command when you want package-manager project files.
Serve a JSON endpoint
Section titled “Serve a JSON endpoint”Create an app directory with this route:
import request from "@server/request"import response from "@server/response"
let name: string? = request.query("name")
if isNil(name) { name = "World"}
response.json(dict[string, any] { message: "Hello, " + name, ok: true})nubo serve app --addr :3000Visit http://localhost:3000/?name=Nubo. For route parameters, uploads, and custom error pages, continue to the server guide.
Use Nubo from Go
Section titled “Use Nubo from Go”Add Nubo to a Go module:
go get github.com/nubolang/nubo@latestUse nubo.New(), AddFunc, and ExecString to expose Go functionality to scripts. See Embedding in Go and Hybrid packages.