fmgo: call Apple's on-device Foundation Models from Go with no CGO and no Swift

Super_Run_8466 · reddit · 2026-09-23

fmgo is a new Go package that wraps Apple's fm CLI, letting Go projects use Apple's on-device Foundation Models without CGO, Swift compilation, or a native bridge — everything runs on Apple's shipped on-device model with no external LLM API. It differentiates from existing projects (go-apple-intelligence via C API/CGO, go-foundationmodels via Swift bindings, fundament with an embedded Swift shim) by staying maximally lightweight. Born from the author's real need invoking fm CLI in another Go project, it's intentionally v0.x and narrow in scope, with an FM Chat app (Wails + Svelte + Go) as a working demo.

Original post →

More from Infra

Infra channel →