docs / cli

gru · 0.7.0

CLI

Public packaging and scaffold tool under cmd/gru. Prefer this over ad-hoc scripts.

go run ./cmd/gru <command> …
# after install onto PATH:
gru <command> …

new

Scaffold an app directory from the hello or webviewhello templates.

go run ./cmd/gru new myapp
go run ./cmd/gru new myapp --webview
FlagTemplate
(default)Native sample based on cmd/hello
--webviewFillClient WebView shell (cmd/webviewhello)

Requires WebView2 Runtime for --webview on Windows.

build

Compile a known product into dist/.

go run ./cmd/gru build hello [-o path]
go run ./cmd/gru build webviewhello -webview2 [-o path]
go run ./cmd/gru build demo [-webview2] [-o path]
ProductWhat it builds
helloNative sample
webviewhelloWebView sample; use -webview2 for live host
demoCurated demo launcher (-tags grudemo)

Default output lands under dist/. See gru build -h for platform args.

package

Zip a built product with the fonts and assets it needs at runtime.

go run ./cmd/gru package hello windows
go run ./cmd/gru package webviewhello windows
go run ./cmd/gru package demo windows

Stages fonts/assets needed at runtime into a release zip. Prefer packaging after a successful build of the same product.

Build tags (cheat sheet)

TagWhen
grudemoCurated demo catalog
webview2Live WebView2 host (Windows)
x11Linux hello path

More smoke detail lives in the repo’s BUILD.md.

Next: Start · WebView · Composition