mygo
AGENTS.md5.3k starsChanged 5 days agoMITView on GitHub
MyGo is a desktop application framework in Go. Windows show web pages in the system webview (WKWebView on macOS, WebKitGTK on Linux, WebView2 on Windows), with typed Go ↔ TypeScript IPC, or native UI that MyGo draws itself (package ui). Read docs/architecture.md before changing code. It describes the layers, the threading model, native interop without cgo, the IPC wire protocol, TypeScript generation, and the checklist for adding features. - No cgo. Everything must build with CGO_ENABLED=0. Call native code through…
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about egoist/mygo
- Alex Hitt“MyGo GitHub Overview: CGO-Free Desktop Apps with Native and Web UIs”YouTube · Oct 25, 2026 · 438 views
- GitHub很棒“MyGo 是一个用 Go 开发跨平台桌面应用的框架,可以用网页前端写界面,也能完全用 Go 构建原生 UI,两种方式还能混用”YouTube · Oct 11, 2026 · 228 views
- さつきのOSS研究室“MyGoを試してみた|Goのデスクトップ枠組みでネイティブUIは0.06秒・18MB、READMEの1行目はLinuxのBunで止まった”YouTube · Oct 11, 2026 · 96 views
- Repo Rush“Desktop Apps in Go, a Few Megabytes Each #shorts”YouTube · Oct 19, 2026 · 26 views
- godwit-email/godwit“build(deps): bump mygo and mygo-runtime to 0.8.3”GitHub · Nov 9, 2026 · 1 reactions
The biggest 5 of 55 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 55
Talked about on GitHub, YouTube and Bluesky (55 times).
On GitHub · 50
- Nov 9, 2026build(deps): bump mygo and mygo-runtime to 0.8.3 — godwit-email/godwit1 reaction · 1 comment
- Oct 29, 2026fix(security): mark distribution builds as MyGo production — OldPanda/bamboo1 reaction · 5 comments
- Oct 25, 2026ci(dependabot): leave MyGo to the weekly Claude dependency review — godwit-email/godwit1 reaction · 2 comments
- Oct 25, 2026ci(dependabot): exempt mygo from the gomod cooldown — godwit-email/godwit1 reaction · 1 comment
- Oct 25, 2026ci: configure Dependabot for Go, bun and GitHub Actions — godwit-email/godwit1 reaction · 1 comment
45 more on GitHub
- Oct 11, 2026docs: add MyGo to the framework list — zoubingwu/awesome-gui1 reaction · 1 comment
- Nov 10, 2026Add RightConvert (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 10, 2026Add Moli TuTu (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 10, 2026Add Lintel (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 10, 2026Add EasyLPAC (app) — yldm-tech/awesome-mygo0 reactions
- Nov 9, 2026build: Bump github.com/egoist/mygo from 0.7.3 to 0.8.1 — yangflow/idset0 reactions
- Nov 9, 2026Upgrade MyGo to v0.8.3 — contursofran/contr0 reactions
- Nov 9, 2026build: bump github.com/egoist/mygo from 0.5.5 to 0.7.4 — ydongy/template-mygo-app0 reactions
- Nov 9, 2026chore(deps): bump github.com/egoist/mygo from 0.6.4 to 0.7.4 — thedavidweng/rainforest0 reactions · 1 comment
- Nov 9, 2026[Desktop 0.4.532] 内嵌浏览器 WebView 不可见但仍拦截点击:切回前台后侧边栏/聊天区无法点击 — yetone/alma-releases0 reactions · 1 comment
- Nov 9, 2026build(deps): bump github.com/egoist/mygo from 0.6.2 to 0.7.4 — L92-Labs/myclip0 reactions
- Nov 9, 2026Add GOSpeak (app) — yldm-tech/awesome-mygo0 reactions
- Nov 9, 2026Add Crypto Panel (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 9, 2026Add 书桌 (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 9, 2026Add Hand (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 9, 2026Add OpenBee (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 9, 2026Add bowel (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 9, 2026Add Finallyshell (app) — yldm-tech/awesome-mygo0 reactions · 1 comment
- Nov 9, 2026build(deps): bump the bun-minor-patch group across 1 directory with 4 updates — iamwent/collate0 reactions
- Nov 9, 2026deps: bump the go-dependencies group across 1 directory with 2 updates — renyijiu/lan-share0 reactions
- Nov 8, 2026perf(app): draw with the GPU on Intel Macs again once MyGo fixes Metal frame timeouts — TooonyChen/finallyshell0 reactions
- Nov 8, 2026[更新失败] v2.2.3 → v2.2.4:This command cannot be run due to the error: An Application Control policy has blocked this file. — Achordchan/tolk0 reactions
- Nov 8, 2026Dependency Dashboard — keiko233/waylauncher0 reactions
- Nov 8, 2026Upgrade MyGo to include the follow-up Chinese font consistency fix — egoist/mygo-music0 reactions
- Nov 8, 2026chore(deps): bump mygo-runtime from 0.6.3 to 0.7.4 — yinxianwei/mymail0 reactions
- Nov 8, 2026Bump mygo-cli from 0.6.3 to 0.7.4 — yinxianwei/mymail0 reactions
- Nov 8, 2026chore(deps): bump github.com/egoist/mygo from 0.6.3 to 0.7.4 — yinxianwei/mymail0 reactions
- Nov 7, 2026[自动] 下载更新失败:无法自动更新:Tolk 没有用安装包安装(所在文件夹里没有卸载程序),不能自动更新。请用安装包安装一次,之后就能自动更新 — Achordchan/tolk0 reactions
- Nov 7, 2026Bump the go-modules group in /mygo with 2 updates — version-fox/vfox-plus0 reactions · 1 comment
- Nov 7, 2026feat: 升级 MyGo v0.8.3 并验证附件整块点击 — ji233-Sun/mujicagent0 reactions
- Nov 7, 2026Bump github.com/egoist/mygo from 0.7.1 to 0.7.4 — psd-coder/agentdiff0 reactions
- Nov 7, 2026fix(terminal): ctrl+[, ctrl+i and ctrl+m send nothing in legacy keyboard mode — TooonyChen/finallyshell0 reactions · 3 comments
- Nov 6, 2026Add to alternativeTo and FMHY — fzn0x/mixmusic0 reactions
- Nov 6, 2026Linux: plugin sign-in window (webSignIn) crashes the whole app — WebKitGTK session store created off the main GTK thread — egoist/mygo-music0 reactions
- Nov 6, 2026fix: clarify paper relevance decisions and make reasons optional — xuzhougeng/BiblioCell0 reactions
- Nov 5, 2026build(deps): Bump the npm group with 35 updates — fzn0x/Nether0 reactions
- Nov 5, 2026mygo 平台能力盘点 — transmit-bug/remit0 reactions · 3 comments
- Nov 5, 2026chore(deps): bump github.com/egoist/mygo from 0.6.4 to 0.7.4 in the mygo group — DiiKhanh/burrow0 reactions
- Nov 5, 2026chore(deps): bump the mygo group with 2 updates — DiiKhanh/burrow0 reactions
- Nov 5, 2026chore: bump mygo-cli from 0.7.3 to 0.7.4 in /windows — Stdq123/planet-windows0 reactions · 1 comment
- Nov 5, 2026chore: bump mygo-runtime from 0.7.3 to 0.7.4 in /windows — Stdq123/planet-windows0 reactions
- Nov 4, 2026chore(deps): bump github.com/egoist/mygo from 0.4.9-0.20261014114409-f2eca9f74533 to 0.7.4 — ixxxxoooo/ai-usage0 reactions
- Nov 4, 2026widget: bind MultilineTextBox, RangeSpin and CheckBoxGroup; RangeSpin.SideButtons — lang315/mygo0 reactions · 1 comment
- Nov 4, 2026build(deps): bump github.com/egoist/mygo from 0.7.2 to 0.7.4 in the go-dependencies group — Cyenoch/mygoui0 reactions
- Nov 4, 2026[崩溃] fatal error: slice bounds out of range — Achordchan/tolk0 reactions
On YouTube · 4
- Oct 25, 2026MyGo GitHub Overview: CGO-Free Desktop Apps with Native and Web UIs — Alex Hitt438 views
- Oct 11, 2026MyGo 是一个用 Go 开发跨平台桌面应用的框架,可以用网页前端写界面,也能完全用 Go 构建原生 UI,两种方式还能混用 — GitHub很棒228 views
- Oct 11, 2026MyGoを試してみた|Goのデスクトップ枠組みでネイティブUIは0.06秒・18MB、READMEの1行目はLinuxのBunで止まった — さつきのOSS研究室96 views · 1 comment
- Oct 19, 2026Desktop Apps in Go, a Few Megabytes Each #shorts — Repo Rush26 views
On Bluesky · 1
- Oct 4, 2026Go言語でデスクトップアプリを簡単に作れるツールっぽい ウェブフロントエンドやネイティブUIが使えて便利そう yug1224 starred egoist/mygo https://github.com/egoist/mygo — @yug1224.com1 likes and repost
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Great DX over Electron parity: Keep the familiar feel (app lifecycle, windows, menus) but design Go-first APIs: typed IPC via mygo.Bind and …
- Distinctive: line 35
purego callbacks are a scarce, never-freed resource: Create them once per signature at startup and route by user data, never per window or …
- Very specific: line 97
Never write [skip ci] (or [ci skip], [no ci]) in a commit message, not even quoted in its body: GitHub skips the push's workflows, CI and …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
MyGo is a desktop application framework in Go. Windows show web pages in the
system webview (WKWebView on macOS, WebKitGTK on Linux, WebView2 on Windows),
with typed Go ↔ TypeScript IPC, or native UI that MyGo draws itself (package
ui).
Read docs/architecture.md before changing code. It describes the layers, the threading model, native interop without cgo, the IPC wire protocol, TypeScript generation, and the checklist for adding features.
Hard rules
- No cgo. Everything must build with
CGO_ENABLED=0. Call native code through purego (internal/darwin,internal/linux) orsyscall(internal/windows), neverimport "C". - Bun is dev tooling only. The repository is a Bun workspace
(
packages/bridge,packages/runtime,packages/cliwith its platform packages, the plugins' packages inplugins/, and examples with a frontend, which keep it at their root like the project template, andwebsite); Bun also installs and runs the template's scripts (Vite, the mygo-cli package). Nothing in an app may need Bun at run time. - Scope: system webview on macOS, Linux and Windows (WebView2), and
native UI that MyGo draws itself (
WindowOptions.Content, packageui; see "Native UI" in the architecture guide), which also runs in browsers (GOOS=js GOARCH=wasm,internal/web, drawn with WebGL 2 by the GL renderer; see "Browsers"). The bundled CEF option is out of scope until asked. Other platforms must keep compiling throughinternal/unsupported. - Great DX over Electron parity. Keep the familiar feel (app lifecycle,
windows, menus) but design Go-first APIs: typed IPC via
mygo.Bindandmygo.NewEvent[T]with the generated client, not string channels. - Threading. Backend methods and handler callbacks run on the main thread.
Public methods must be safe from any goroutine (
onMain/postMain/awaitinloop.go). Never block the main thread waiting on work that needs it. - purego callbacks are a scarce, never-freed resource. Create them once per signature at startup and route by user data, never per window or call.
- Apps pay only for what they use. A feature must not grow apps that
don't use it:
examples/counter-native(native UI) andexamples/hello(webview) are measured on every push. What every app reaches (App.Run, windows, the default menus,initfunctions, the backends' methods) must not call into opt-in features: reach them through functions their constructor registers (aslinkedDocuments), and keep heavy dependencies and data out of those paths. Never callreflect.Type.Method,Value.MethodorMethodByNamethere: it makes the linker keep every exported method of the program (2.5 MB). Measure both apps before and after a change tomygo,ui, a backend or the dependencies; explain any growth of an app that doesn't use the feature in the PR, and find its cause with-dumpdep("Binary size" in the architecture guide).
Commands
go build ./... && GOOS=linux go build ./... && GOOS=windows go build ./... # all must pass
go vet ./... && GOOS=linux go vet ./... && GOOS=windows go vet ./...
go vet -tags mygo_noinspector ./... # production builds, without the inspector of native UI
GOOS=js GOARCH=wasm go vet $(GOOS=js GOARCH=wasm go list ./... | grep -v /cmd/mygo) # browsers, all but the CLI
go test ./... # core (fake backend), tsgen, CLI, accelerator
go build -trimpath -tags mygo_noinspector -ldflags "-s -w -X github.com/egoist/mygo.production=1" -o /tmp/counter-native ./examples/counter-native # an app's release size, as the benchmarks build it
MYGO_E2E=1 go test ./internal/e2e # real GUI tests (macOS desktop session)
bun install && bun run test && bun run typecheck # the workspace, from the root
bun run build # build internal/bridge/bridge.js and the npm packages' dist/
bun run --cwd packages/cli binaries # cross-compile the CLI into the mygo-cli platform packages
go run ./cmd/mygo generate examples/todo # regenerate an example's TypeScript client
go run ./cmd/mygo dev examples/todo # live reload (dev bundle in examples/todo/.mygo)
go run ./cmd/mygo dev -web examples/counter-native # native UI in the browser, with live reload
go run ./cmd/mygo build examples/todo # .app + .dmg in examples/todo/build
go run ./cmd/mygo build -platform web examples/counter-native # a static site in examples/counter-native/dist/web
go run ./examples/gallery # the native UI toolkit's tour
go run ./examples/code-editor # the code editor and the diff viewer (ui/editor)
go run ./examples/markdown-chat # Markdown replies streaming in (ui/markdown)
go run ./examples/notes # the rich text editor (ui/richtext), in a notes app
go run ./examples/terminal # a terminal (downloads libghostty-vt once)
go run ./examples/loading # loading.dev's 29 indicators (plugins/loading)
go run ./examples/permissionflow # the system's permissions, asked for and guided to (plugins/permissionflow)
go run ./plugins/automation/cmd/mygo-automation skills # the automation CLI's guide, for agents driving an app
go run ./examples/sf-symbols # the system's SF Symbols on macOS (plugins/sfsymbols)
go generate ./plugins/terminal # build libghostty-vt for every platform (with Zig), write Ghostty's themes
go generate ./internal/gpu/d3d11 # recompile the Direct3D shader (on Windows)
go generate ./internal/gpu/metal # recompile the Metal shader (on macOS, with Xcode)
go generate ./cmd/mygo # the Mandarin readings of slugs (cmd/mygo/pinyin.bin), from Unicode's Unihan
go generate ./internal/l10n # MyGo's own strings: their functions, and the packages of translations in locales/
go generate ./plugins/glass # recompile the glass plugin's shaders (on macOS, and on Windows)
bun run --cwd website dev # the website, with docs/ at /docs (see website/README.md)
bun scripts/bench.ts run [--e2e] # benchmarks and app sizes, medians of 6 runs (CI: bench.yml, /measures)
go run ./benchmarks/run -out benchmarks/results.json # MyGo, GPUI, GPUI Fast and egui on the same apps, for /benchmarks (opens windows, on a real Mac)
go run ./internal/idlemem app... # apps' memory once idle, with their webviews' processes
go run ./internal/inputlatency # native UI's input-to-screen latency on macOS (opens windows)Linux GUI tests cross-compile and run in a container with WebKitGTK and Xvfb;
Windows GUI tests need Windows with the WebView2 Runtime (a GitHub Actions
windows-latest runner has it). See "Testing" in the architecture guide.
Conventions
- Never write
[skip ci](or[ci skip],[no ci]) in a commit message, not even quoted in its body: GitHub skips the push's workflows, CI and benchmarks included, and Cloudflare the website's deploy. Only the benchmarks branch's commits say it. - New behavior goes into
package mygofirst; backends only translateinternal/platformcalls to native ones. Implement every platform method indarwin,linux,windows,web,fakeandunsupported. - Objective-C:
alloc/initobjects are owned and must be released; wrap temporary objects inwithPool; copy blocks you call later. - Official plugins live in
plugins/<name>: the Go package and its npm package (@mygo-plugins/<name>) side by side, released with mygo-runtime's version. The updater plugin is Go only; itsnativepackage draws the update window in native UI. The terminal plugin is Go only too, for native UI, with libghostty-vt loaded through purego: itsmygo-plugin.jsonpins the builds the CLI puts into apps, published as release assets (libghostty-vt-<commit>); change it withgo generate. The glass plugin is Go only too, an effect of the renderers (scene.Effect): its shader in Metal, HLSL and GLSL with a CPU twin that must draw the same pixels, compiled ahead of time bygo generateon macOS and Windows. The game plugin is Go only too, what games need beyond what apps do, opt-in, kept out of coreui: a game loop and a camera for native UI, andplugins/game/gamepad, which reads controllers. The loading plugin is Go only too, loading.dev's indicators drawn withui.Painteron ui's public API: keep them as loading-dev draws them in a browser. The sfsymbols plugin is Go only too: on macOS it rasterizes the system's SF Symbols through purego, and elsewhere it has none (Imagesays so). The automation plugin is Go only too, gated with the inspector (mygo_noinspector): a socket (MYGO_AUTOMATION) through which other processes drive the app, reaching native UI only throughsurface.Automate, which it sets. Its command line client for agents,mygo-automation(plugins/automation/cmd/mygo-automation, the code ininternal/automationcli), uses the socket alone and Go's standard library; keep its embeddedSKILL.mdtrue to its commands. The permissionflow plugin is Go only too, after PermissionFlow: TCC's permissions through purego on macOS, with a panel of AppKit under System Settings to drag the app from, the consent store on Windows, and errors.ErrUnsupported elsewhere. - The
dist/of npm packages is not committed: runbun run buildafterbun install(CI and releases do). Commitinternal/bridge/bridge.jswhenever its sources change, and keep the generated clients of examples (examples/*/src/mygo.ts) up to date. Built frontends are not committed:mygo buildembeds them. mygo-runtime(packages/runtime) andmygo-cli(packages/cli, with its per-platform packages inpackages/cli/npm) are released to npm with the same version as the Go module (mygo.Version, also the CLI'sversion), whichbun scripts/version.ts <version>sets everywhere; the template depends on both. Pushing av<version>tag releases everything (.github/workflows/release.yml, see "Releasing" in the architecture guide); never commit the CLI's binaries.- The configuration types of
packages/cli/index.d.ts(formygo.config.ts) mirrorConfigincmd/mygo/config.go;TestConfigTypeschecks them. - Tests: unit tests through
internal/fake; GUI behavior ininternal/e2e. - Tests never pass or fail on wall-clock time ("Waiting in tests" in the
architecture guide): wait for the condition or event with
internal/wait, whose one-minute guard only turns a hang into a failure and is never tuned; advance aui.Tester's clock instead of sleeping; measure work by counts, not durations. A test that can time out while the code is right has a race to fix, in the test or the product, not a timeout to raise or a rerun to hide behind. GUI tests share a process and, on Linux, an X server: what one leaves behind ("What tests leave behind" in the architecture guide) fails it, not the tests after it. Before calling a failure older than a pull request, reproduce it on a new X server, without running the branch's binary on it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

