A lightweight Go framework for building desktop applications with web frontends.
Velo provides native webview, system tray, file dialogs, and error dialogs across macOS, Windows, and Linux.
- Webview — Native webview window with JavaScript injection and message passing
- System Tray — System tray icon with menus, shortcuts, and click events
- File Dialog — Native file selection dialog
- Error Dialog — Native error dialog
go get github.com/ltaoo/veloThe velo CLI tool handles building, packaging, and signing your application.
# Install the velo CLI
go install github.com/ltaoo/velo/cmd/velo@latest
# Or build from source
go build -ldflags "-X main.version=1.0.0" ./cmd/velo# Build for current platform (in your project directory)
velo build
# Build a specific project
velo build /path/to/project
# Build for a specific platform
velo build -platform darwin
velo build -platform windows
velo build -platform linux
velo build -platform all
# Custom output directory
velo build -out build
# Override version
velo build -version 1.2.3The velo build command reads app-config.json from the project directory, generates icons, platform configs, and compiles binaries for the target platform(s).
cd _example/simple
# Run in development mode
go run .
# Build with the velo CLI (from the example directory)
velo build
# Or build with go directly
go build -o myapp .The example project uses replace directive in go.mod to reference the local velo module, so no extra setup is needed.
_example/simple/
├── app-config.json # Application configuration (name, platforms, update, etc.)
├── main.go # Application entry point
├── frontend/ # Web frontend assets
└── go.mod
The app-config.json file configures your application. Key sections:
app— Name, version, description, iconbinary— Output binary nameplatforms— Platform-specific settings (macOS, Windows, Linux)build— Build options (config files, excludes)release— Release metadataupdate— Auto-update configuration
Example update configuration:
{
"update": {
"enabled": true,
"check_frequency": "startup",
"channel": "stable",
"auto_download": false,
"timeout": 300,
"sources": [
{
"type": "github",
"priority": 1,
"enabled": true,
"need_check_checksum": true,
"github_repo": "owner/repo"
},
{
"type": "http",
"priority": 2,
"enabled": true,
"manifest_url": "https://example.com/manifest.json"
}
]
}
}package main
import "github.com/ltaoo/velo"
func main() {
box := velo.NewBox()
box.SetSize(1024, 640)
box.Get("/api/hello", func(c *velo.BoxContext) interface{} {
return c.Ok(velo.H{"message": "hello"})
})
box.Post("/api/echo", func(c *velo.BoxContext) interface{} {
return c.Ok(c.Args())
})
velo.RunApp("./frontend/dist", box)
}| Package | Description |
|---|---|
webview |
Native webview window management |
tray |
System tray icon and menu |
file |
Native file selection dialog |
error |
Native error dialog |
asset |
Embedded JS runtime assets |
updater |
Auto-update system |
buildcfg |
Build configuration and code generation |
- macOS
- Windows
- Linux