gova-declarative-gui
БесплатноБез исполняемых скриптовНе проверенBuild native desktop apps in Go using Gova's declarative, component-based GUI framework with reactive state and platform-native integrations.
от reason-machines★ 99 звёзд на GitHubОб этом скилле
Gova Declarative GUI Framework
Skill by ara.so — Daily 2026 Skills collection.
Gova is a declarative GUI framework for Go that builds native desktop apps for macOS, Windows, and Linux from a single codebase. Views are plain Go structs, state is explicit via a Scope, and go build produces one static binary. Internally powered by Fyne (BSD-3), but the public API is stable and renderer-independent.
Install
go get github.com/nv404/gova@latest
Optional CLI:
go install github.com/nv404/gova/cmd/gova@latest
Prerequisites:
- Go 1.26+
- C toolchain: Xcode CLT (macOS),
build-essential+libgl1-mesa-dev(Linux), MinGW (Windows)
Key CLI Commands
| Command | Purpose |
|---|---|
gova dev ./path/to/app |
Hot reload — watch .go files, rebuild and relaunch on save |
gova build ./path/to/app |
Compile to ./bin/<name> static binary |
gova run ./path/to/app |
Build and launch once, no file watching |
go build -ldflags "-s -w" |
Stripped binary (~23 MB for simple apps) |
Core Concepts
1. Components as Structs
A component is a Go struct implementing Body(s *g.Scope) g.View. Fields on the struct are typed props; zero values are defaults.
package main
import g "github.com/nv404/gova"
type Greeting struct {
Name string // prop with zero-value default ""
}
func (c Greeting) Body(s *g.Scope) g.View {
name := c.Name
if name == "" {
name = "World"
}
return g.Text("Hello, " + name + "!").Font(g.Title)
}
2. Reactive State with Scope
State lives on the *g.Scope passed to Body. No hidden scheduler, no hook-ordering rules.
func (Counter) Body(s *g.Scope) g.View {
count := g.State(s, 0) // typed signal, initial value 0
return g.VStack(
g.Text(count.Format("Count: %d")).Font(g.Title),
g.HStack(
g.Button("-", func() { count.Set(count.Get() - 1) }),
g.Button("+", func() { count.Set(count.Get() + 1) }),
).Spacing(g.SpaceMD),
).Padding(g.SpaceLG)
}
3. Entry Point
func main() {
g.Run("My App", g.Component(MyComponent{}))
}
Layout Primitives
// Vertical stack
g.VStack(child1, child2, child3).Spacing(g.SpaceMD).Padding(g.SpaceLG)
// Horizontal stack
g.HStack(child1, child2).Spacing(g.SpaceSM)
// Layered/overlapping stack
g.ZStack(background, foreground)
// Scaffold (app shell with nav, toolbar, etc.)
g.Scaffold(
g.NavBar("Title"),
content,
)
Spacing Constants
| Constant | Use |
|---|---|
g.SpaceSM |
Small gaps |
g.SpaceMD |
Medium gaps |
g.SpaceLG |
Large padding |
Built-in Views
g.Text("Hello").Font(g.Title) // styled text
g.Text("body text").Font(g.Body)
g.Button("Click me", func() { /* handler */ })
g.TextField(value.Get(), func(s string) { value.Set(s) })
g.Toggle(enabled.Get(), func(b bool) { enabled.Set(b) })
g.Image("path/to/image.png")
g.Spacer() // flexible space
g.Divider()
Font Constants
g.Title, g.Headline, g.Body, g.Caption, g.Mono
State Patterns
Basic State
count := g.State(s, 0)
count.Get() // read
count.Set(42) // write, triggers re-render
count.Format("Value: %d") // returns formatted string signal
Derived / Computed State
doubled := g.Derived(s, func() int {
return count.Get() * 2
})
Effects (side effects on state change)
g.Effect(s, func() {
fmt.Println("count changed to", count.Get())
}, count) // dependencies
Persisted State (survives hot reload)
name := g.PersistedState(s, "user-name", "")
Full Example: Todo App
package main
import g "github.com/nv404/gova"
type Todo struct {
Text string
Done bool
}
type TodoApp struct{}
func (TodoApp) Body(s *g.Scope) g.View {
todos := g.State(s, []Todo{})
input := g.State(s, "")
addTodo := func() {
if input.Get() == "" {
return
}
todos.Set(append(todos.Get(), Todo{Text: input.Get()}))
input.Set("")
}
rows := make([]g.View, 0, len(todos.Get()))
for i, todo := range todos.Get() {
i, todo := i, todo // capture loop vars
rows = append(rows, g.HStack(
g.Toggle(todo.Done, func(v bool) {
list := todos.Get()
list[i].Done = v
todos.Set(list)
}),
g.Text(todo.Text),
).Spacing(g.SpaceSM))
}
return g.VStack(
g.Text("Todos").Font(g.Title),
g.VStack(rows...).Spacing(g.SpaceSM),
g.HStack(
g.TextField(input.Get(), func(v string) { input.Set(v) }),
g.Button("Add", addTodo),
).Spacing(g.SpaceSM),
).Padding(g.SpaceLG)
}
func main() {
g.Run("Todo", g.Component(TodoApp{}))
}
Native Dialogs (macOS: NSAlert / NSOpenPanel; other platforms: Fyne fallback)
// Alert dialog
g.Butto
Установить gova-declarative-gui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл gova-declarative-gui?
Build native desktop apps in Go using Gova's declarative, component-based GUI framework with reactive state and platform-native integrations.
Как установить скилл gova-declarative-gui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gova-declarative-gui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic