← 返回命令列表

Linux command

gova 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Install

go install github.com/nv404/gova/cmd/gova@latest

Start the dev loop

gova dev

Build and run

gova run

Compile a release binary

gova build

Build a stripped, smaller release binary

gova build -ldflags "-s -w"

Build with a custom output name

gova build -o [myapp]

Run dev loop against a specific entry package

gova dev [./cmd/myapp]

说明

Gova is a declarative GUI framework for Go that emits a single static binary for macOS, Windows, and Linux. The gova CLI wraps go build and go run with file-watching, cgo setup, and platform-specific native toolkit plumbing so developers can iterate quickly on a Gova application without hand-writing build tooling. Components are written in pure Go with a reactive state model and typed props. Typed platform dialogs (file pickers, alerts, notifications) are exposed through the framework and linked against native system libraries via cgo. During gova dev, saving any watched .go file triggers an incremental rebuild and relaunches the window, preserving development flow. gova build produces a release-ready binary that can be distributed without a runtime dependency on Go.

参数

dev
Watch the working directory, rebuild on file save, and relaunch the window. Ignores .git, node_modules, vendor, and _test.go files.
run
Build and launch the application once without starting a file watcher. Useful for CI pipelines or one-shot verifications.
build
Compile a single static binary for the host platform. Accepts Go build flags such as -ldflags and -o.
-ldflags _flags_
Pass linker flags through to the underlying go build call (e.g. "-s -w" to strip symbols).
-o _name_
Set the output binary name produced by gova build.

FAQ

What is the gova command used for?

Gova is a declarative GUI framework for Go that emits a single static binary for macOS, Windows, and Linux. The gova CLI wraps go build and go run with file-watching, cgo setup, and platform-specific native toolkit plumbing so developers can iterate quickly on a Gova application without hand-writing build tooling. Components are written in pure Go with a reactive state model and typed props. Typed platform dialogs (file pickers, alerts, notifications) are exposed through the framework and linked against native system libraries via cgo. During gova dev, saving any watched .go file triggers an incremental rebuild and relaunches the window, preserving development flow. gova build produces a release-ready binary that can be distributed without a runtime dependency on Go.

How do I run a basic gova example?

Run `go install github.com/nv404/gova/cmd/gova@latest` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does dev do in gova?

Watch the working directory, rebuild on file save, and relaunch the window. Ignores .git, node_modules, vendor, and _test.go files.