Repo of the Day
hasenj/go-shirei
Published: Nov 16, 2026
Open repository ↗Go based GUI framework: practical, immediate mode, flexbox model
Summary
Shirei is a cross-platform GUI framework for Go that describes interfaces as functions of application state instead of requiring engineers to maintain widget objects. It combines an immediate-mode API with content-based rows, columns, wrapping, and spacing, alongside common widgets and more specialized tools for text editing, tables, testing, and mobile applications.
What it is useful for
Shirei is suited to utility applications, internal tools, forms, and document-oriented interfaces where a team wants to write UI logic in Go rather than build around HTML and JavaScript. Its state-driven model keeps application data at the center: the documented profile form binds text inputs directly to profile.Name and profile.Email, then updates profile.Saved when the Save button is pressed.
The repository includes examples that demonstrate realistic use cases:
- Git History displays commit history and unified diffs.
- Haystack provides file searching, tabbed editing, and saving.
- Process Monitor shows process CPU and RAM usage with history charts.
- Piano is a small interactive keyboard application.
It also supports virtual lists and tables, virtualized multiline editing with selection and undo/redo, modal dialogs, native auxiliary windows, and draggable desktop overlays. International text handling includes bidirectional layout, East Asian IME composition, system fonts, and Japanese furigana.
For automated work, snapshot testing can render a frame without opening a native window or requiring a GPU. The documented drive-testing system can launch an app and click elements by accessible name.
There are important boundaries. The framework does not currently provide app-owned GPU surfaces for video or custom 3D. Screen-reader coverage is limited to static text, buttons, toggles, and sliders on macOS, Linux Wayland, and 64-bit Windows. Wayland overlays require layer-shell v4, while X11 lacks background main-window restoration and always-on-top overlays. iOS builds still require cgo.
How engineers can use it
Create a new Go module, add the documented main.go example, and run it with:
go mod init main
go mod tidy
go run .
The starter application imports go.hasen.dev/shirei/app, the root Shirei package, and its widgets package. It opens a window with app.SetupWindow, runs a root view through app.Run, and builds a counter interface using Container, Label, and Button.
To study larger implementations, run any included example from its directory:
go run .
The README also documents two companion tools. Mobile development uses shirei_mobilerun, while release packaging uses shirei_bundle:
go install go.hasen.dev/shirei/cmd/shirei_mobilerun@latest
go install go.hasen.dev/shirei/cmd/shirei_bundle@latest
For layout behavior, document editing, accessibility, overlays, platform-specific packaging, and mobile deployment, the repository’s linked tutorials and command-specific READMEs provide the next steps.