Getting started
This page takes you from nothing to a running TanGo app: install the tan command, create a project from a template, run it in development mode, and make a release build — once for desktop and once for mobile.
Current status
TanGo is an early 0.x release. The desktop backends are verified on macOS hardware; the Windows and Linux backends are implemented and pass cross-compilation and CI smoke tests, but have not been verified systematically on real machines. Mobile (iOS, Android) is experimental: iOS has been tested in simulators and on one iPhone 12 Pro. Android has been tested in emulators.
Requirements
| Needed | |
|---|---|
| All platforms | Go 1.27 or newer |
| macOS | Xcode command line tools (signing, lipo, hdiutil); WKWebView ships with the OS |
| Windows | WebView2 runtime (usually present on Windows 10 1803+ / 11); NSIS (makensis) for installers |
| Linux | GTK 3, WebKitGTK 4.1, libayatana-appindicator3 (tray); appimagetool for AppImages |
| Front-end templates (optional) | Node.js and npm, only for the Vite-based templates; the default vanilla and ui templates need neither |
| iOS (optional) | macOS with Xcode (and its simulators) |
| Android (optional) | JDK 17, Android SDK and NDK |
Desktop builds need no cgo: the backends call the system libraries through purego / syscall, so one machine can cross-compile all three desktop platforms. Mobile builds use cgo (c-archive / c-shared), which tan build sets up.
Install tan
go install github.com/tangoui/tango/cmd/tan@latest
tan version
tan doctor # checks the toolchain and platform dependenciesPrebuilt tan binaries are attached to each release.
Install from source to use new features on main
git clone https://github.com/tangoui/tango
cd tango/cmd/tan && go install .@latest installs the most recent release. Install from source if the release predates features you need. For example, v0.1.0 predates tan mcp and desktopBuildTags.
Create projects against your checkout with -local: tan init -local ~/src/tango hello.
Create a project
tan init hello # create with defaults
tan init # in a terminal: answer a few questions
tan init -yes # no questions, all defaults (directory tango-app)
cd hello| Flag | Default | Meaning |
|---|---|---|
-template | vanilla | project template (below) |
-name | directory name | display name |
-id | com.example.<name> | reverse-DNS app id (bundle id / applicationId) |
-module | directory name | Go module path |
-mobile | true | write the ios and android sections of tan.json |
-local | use a local TanGo checkout (replace directive) |
| Template | Contents |
|---|---|
vanilla | plain HTML/CSS/JS, no npm |
vanilla-ts / react-ts / vue-ts | TypeScript, React or Vue with Vite |
shadcn | React + Vite with Tailwind CSS and shadcn/ui |
ui | self-drawn Go UI (package ui), no WebView, no npm (experimental) |
hybrid | a WebView page with a self-drawn tool panel on top (experimental) |
The heart of the generated main.go:
app := tango.New(tango.Options{
Name: "hello",
ID: "com.example.hello",
Assets: asset.FromEnv(files, asset.Options{SPA: true}), // proxies to the dev server under tan dev
})
r := ipc.NewRouter()
bind.Register(r, "Greeter", &Greeter{}) // page: tango.call("Greeter.Hello", "Tom")
app.AddBridgeScript(runtimejs.Script) // injects window.tango
app.OnMessage(func(s *tango.Surface, msg string) { r.HandleMessage(s, msg) })
app.OnReady(func() {
app.NewSurface(tango.SurfaceOptions{Title: "hello", Width: 960, Height: 640, Resizable: true})
})
app.Run()Project AI skill
tan init installs .agents/skills/tango/ from the project's Tango module. Codex, Cursor, and Gemini CLI discover it automatically. In Claude Code, ask the assistant to read .agents/skills/tango/SKILL.md before working on the app. Run tan skills update after upgrading Tango or to install the skill in an existing project. CLI reference
Development: tan dev
tan devtan dev starts the front-end dev server when frontend.dev is set (Vite templates: npm run dev) and hands its URL to the app through TANGO_DEV_URL (read only by development builds: tan dev builds with -tags tango_dev); builds and runs the Go program; rebuilds and restarts it when Go sources change, restoring window positions; and hot-reloads self-drawn (uihost) windows without closing them. -url uses a dev server that is already running; -C <dir> picks the project; arguments after -- go to the app.
Release build: tan build
tan build # this machine
tan build -platform darwin/universal # universal macOS binary (needs lipo)
tan build -platform windows/amd64,linux/arm64 # cross-compiletan build runs frontend.build, then compiles a production build (without tango_dev, so no hot-reload host, automation channel or dev proxy; a plain go build / go run . is a production build too) into build/<os>-<arch>/: a signed-ad-hoc .app on macOS, an .exe with icon, manifest and version info on Windows, an executable on Linux. Installers come from tan package, signing from tan sign.
Mobile (experimental)
The same project builds for mobile without code changes. name, id, version and icon from tan.json are shared; declare camera, location and similar capabilities in permissions.
tan run -platform ios-simulator # build, install, launch; Go logs in the terminal
tan build -platform ios # device .app + .ipa (needs signing identity and profile)
tan run -platform android # debug APK for the device's ABI, install, launch, logcat
tan build -platform android/arm64,android/amd64 # release: signed APK and AABProject and UI tools over MCP
tan mcp -root . lets an MCP client work with the project or drive an app's UI. The UI tools launch a separate tango_dev build. Configuration and tools
Next
- How
App,Surface, the main thread and IPC fit together: Core concepts - The command reference: tan CLI
- A complete demo:
examples/showcasein the repository (go run ./examples/showcase) - A complete product built with TanGo: MinCode (an open-source desktop developer workspace; Vue front end on the system WebView, with packaging and auto-update)