Skip to content
Packaging and distribution

Packaging and distribution

go build gives you an executable. To ship an app you usually need more: an application bundle on macOS, an icon and version information in a Windows executable, a desktop entry on Linux, an APK for Android, an app bundle for iOS, or a folder of files for the web. The bellui command builds these for you.

Install the command

The command is its own Go module, separate from the Bellui library:

go install github.com/belluikit/bellui/cmd/bellui@latest

Check that it is on your PATH:

bellui version

This prints the version of the command and, when run inside your app’s module, the version of the Bellui library your app uses.

Commands

CommandWhat it does
bellui init [module]Starts a new project in the current folder: go.mod, main.go, manifest.pxf and translations/en.json.
bellui buildBuilds the executable. In this release it does not compile your app’s metadata in; see App metadata.
bellui packageBuilds and wraps the app in the package format of the target platform.
bellui installPackages the app and installs it on this computer, or on a connected phone.
bellui releasePackages and signs the app for an app store or other public distribution.
bellui serveBuilds the web version and serves it on http://localhost:8080.
bellui bundleTurns files into Go resources compiled into your app.
bellui translateCollects the strings your code translates into a translation file.
bellui envPrints the Go, OS and Bellui versions, for bug reports.

Run bellui help <command> for every flag of a command.

In this release the main.go that bellui init writes ends with w.ShowAndRun(), which does not compile. Change that line to bellui.ShowAndRun(w).