tan CLI
tan creates, runs, builds and ships TanGo apps. dev, build, run, package, release-manifest and applinks read the project configuration from the current directory. Commands that accept -C <dir> can use it to select the project directory. sign, generate bindings and doctor can also run outside a project. tan.json
go install github.com/tangoui/tango/cmd/tan@latest
tan help # list of commands
tan <command> -h # flags of one commandThis page describes the CLI on the main branch. Install from source for features that have yet to appear in a tagged release. Install tan
Commands
| Command | What it does |
|---|---|
tan init [dir] | create a project from a template; asks a few questions in a terminal when no directory is given, -yes takes the defaults |
tan dev | development mode: starts the front-end dev server (if any), builds and runs the app, rebuilds on Go changes, hot-reloads self-drawn windows |
tan build | release build for one or more platforms: desktop, iOS, Android |
tan run | build, install and run on the iOS Simulator or an Android device/emulator, with logs in the terminal |
tan package | build, then make installers and archives: macOS .dmg, Windows NSIS or MSIX, Linux .tar.gz, AppImage, deb, rpm or Flatpak |
tan sign | macOS code signing and notarization; Authenticode for Windows exe / msi / msix |
tan keygen | create an Ed25519 key pair for update signing |
tan release-manifest | make a release's update files, binary patches and signed latest.json |
tan sign-update | sign an update manifest with the Ed25519 private key |
tan applinks | generate iOS Universal Links and Android App Links verification files to publish under /.well-known/ |
tan generate bindings | TypeScript clients for services registered with bind.Register |
tan skills update | install or update the AI skill from the project’s Tango module |
tan doctor | check the toolchain and platform dependencies |
tan mcp | provide project tools and UI automation for development builds to AI agents |
tan version | print the version |
Project AI skill
Run tan skills update in the app directory, or use tan skills update -C <dir> to select it. The command uses Go's module resolution, including go.work and replace. If the module has yet to be downloaded, run go mod download from the project directory. If the module has no skills/tango/ directory, upgrade github.com/tangoui/tango.
The command lists the files it will add, modify, or remove in .agents/skills/tango/ before updating it. Tan manages that directory. Put custom skills in other directories under .agents/skills/.
Platform targets
tan build -platform takes the comma-separated targets below. tan package accepts desktop targets only.
| Form | Meaning |
|---|---|
| (empty) | this machine |
darwin/arm64, windows/amd64, linux/arm64 | desktop OS/arch; an OS alone means this machine's architecture |
darwin/universal | both Mac architectures joined with lipo |
ios-simulator / ios | iOS simulator .app / device .app + .ipa |
android, android/arm64,android/amd64 | Android; android alone means arm64 + amd64 |
Desktop output goes to build/<os>-<arch>/ (-o changes the root); -debug keeps symbols and allows the web inspector (a debug APK on Android). tan build (-debug included) makes production builds: any -tags already in GOFLAGS are kept, minus tango_dev (plus tango_release, a compatibility tag that no longer does anything). tan dev builds (desktop and mobile) add -tags tango_dev, which links the development features: hot reload, automation, the front-end dev proxy.
tan build and tan package accept -features to override the project's desktop backend profile. See the scope of desktopBuildTags and cgo in tan.json.
MCP server
tan mcp -root . serves MCP over stdio by default. -root defaults to the current directory and bounds project paths passed to the tools. For HTTP, pass -http. Use -addr to set a loopback address (default 127.0.0.1:0) and -token to set the Bearer token (by default tan generates a random token and prints it to stderr). -addr and -token require -http. -stdio and -http are mutually exclusive. UI tools require the app's tango_dev control channel. Tools and client configuration
A typical session
tan init -template react-ts notes && cd notes
tan dev
tan generate bindings
tan build -platform darwin/universal
tan package -platform darwin/universal
tan sign -notarize build/darwin-universal/Notes.app
tan run -platform ios-simulator
tan build -platform android/arm64,android/amd64Environment variables
| Variable | Used by |
|---|---|
TANGO_DEV_URL | set by tan dev for the app (read by asset.FromEnv only in -tags tango_dev builds, loopback addresses only) |
TANGO_HOTRELOAD=0 | turn off hot reload of self-drawn windows |
TANGO_LAUNCH_BACKGROUND=1 | on macOS, launch without activating the app and place its windows behind other apps. tan mcp sets this when it launches an app |
TANGO_SIGN_IDENTITY, TANGO_NOTARY_PROFILE, TANGO_APPLE_ID, TANGO_APPLE_TEAM_ID, TANGO_APPLE_PASSWORD | macOS signing and notarization |
TANGO_WINDOWS_CERT, TANGO_WINDOWS_CERT_PASSWORD | Windows signing certificate and password |
TANGO_UPDATE_KEY_FILE, TANGO_UPDATE_KEY | private key for tan release-manifest and tan sign-update |
TANGO_IOS_SIGN_IDENTITY | iOS device signing identity |
TANGO_ANDROID_KEYSTORE_PASSWORD, TANGO_ANDROID_KEY_PASSWORD | Android release signing |
JAVA_HOME, ANDROID_HOME, ANDROID_NDK_HOME | Android builds |
All flags
Generated from tan <command> -h when the site is built.
$ tan help
Usage: tan <command> [flags] [args]
Commands:
init create a project from a template
dev run the app in development mode
build build the app for one or more platforms
run build and run the app on the iOS Simulator or Android
package build, then make installers and archives
sign sign a macOS app or disk image (and notarize), or a Windows exe/msi/msix
keygen create an Ed25519 key pair for update signing
release-manifest make the signed update manifest and patches for a release
sign-update sign an update manifest with an Ed25519 key
applinks write the Universal Links / App Links files for /.well-known/
generate generate code (bindings)
skills install or update the project's AI skill
doctor check the toolchain and platform dependencies
mcp run an MCP server for AI agents (project and UI tools)
version print the version
Run "tan <command> -h" for a command's flags.tan init
Usage: tan init [flags] [dir]
Creates a Tango project in dir (which must not exist or be empty). Without
dir, in a terminal, tan init asks for the directory, app name, id, template
and mobile support; -yes skips the questions.
Templates:
vanilla plain HTML/CSS/JS, no npm needed
vanilla-ts TypeScript + Vite
react-ts React + TypeScript + Vite
vue-ts Vue + TypeScript + Vite
shadcn React + TypeScript + Vite with Tailwind CSS and shadcn/ui components
ui self-drawn UI in Go (package ui): no WebView, no npm
hybrid WebView page (TypeScript + Vite) with a self-drawn tool panel on top
tan.json gets "permissions": [] and, unless -mobile=false, "ios" and
"android" sections with only minimum OS versions; signing settings are left
for you to add (docs/mobile.md).
Flags:
-id id
app id, reverse-DNS (default: com.example.<name>)
-local dir
use the Tango checkout in dir through a replace directive
-mobile
write the "ios" and "android" sections of tan.json (safe defaults, no signing) (default true)
-module path
Go module path (default: the directory name)
-name name
app display name (default: the directory name)
-template template
project template: vanilla, vanilla-ts, react-ts, vue-ts, shadcn, ui, hybrid (default "vanilla")
-yes
do not ask questions; use the flags and defaults (directory tango-app when none is given)tan dev
Usage: tan dev [flags] [-- app args]
-C dir
project dir (where tan.json is) (default ".")
-device string
with -platform: the adb serial or the Simulator UDID or name (default: the only/first one running)
-hot
hot-reload self-drawn UI (uihost) windows instead of restarting the app; TANGO_HOTRELOAD=0 turns it off (default true)
-no-restore
do not restore window positions and sizes when the app restarts
-platform string
run on a phone instead of the desktop: android (a connected device or a running emulator; android/<arch> to force the ABI) or ios-simulator
-url url
use the dev server already running at url instead of starting frontend.dev
-watch-framework
restart the dev host when the Tango sources it links change (local checkouts only) (default true)tan build
Usage: tan build [flags]
-C dir
project dir (where tan.json is) (default ".")
-debug
keep symbols and the console window; let the page open the inspector; android: debug APK instead of the signed release
-features value
backend profile: all, webview, canvas or webview,canvas
-o dir
output dir (default "build")
-platform targets
comma-separated targets such as darwin/arm64,windows/amd64,linux/amd64 (default: this machine; darwin/universal joins both Mac architectures); mobile: ios, ios-simulator, android, android/arm64,android/amd64
-xcode
ios: also generate an Xcode project in <out>/xcode for debuggingtan run
Usage: tan run -platform ios-simulator|android [flags]
-C dir
project dir (where tan.json is) (default ".")
-avd string
android: start this emulator (AVD name) when no device is connected (default: the first AVD)
-device string
Simulator name or UDID (ios-simulator), or adb serial (android); default: the booted one
-o dir
output dir (default "build")
-platform platform
platform to run on: ios-simulator or androidtan package
Usage: tan package [flags]
-C dir
project dir (where tan.json is) (default ".")
-features value
backend profile: all, webview, canvas or webview,canvas
-format format
package format: empty for each platform's default (disk image, tarball and AppImage, NSIS installer); msix (Windows targets only); or, for Linux targets, a comma-separated list of tar, appimage, deb, rpm, flatpak
-o dir
output dir (default "build")
-platform targets
comma-separated targets, as for tan buildtan sign
Usage: tan sign [flags] <App.app|image.dmg> [-- notarytool args]
tan sign [flags] <app.exe|setup.msi|app.msix|app.appx>...
-C dir
project dir (where tan.json is) (default ".")
-cert file
Windows: PKCS#12 certificate file (default $TANGO_WINDOWS_CERT, else windows.certificate in tan.json)
-entitlements plist
entitlements plist (default macos.entitlements from tan.json)
-identity identity
macOS: codesign identity, e.g. "Developer ID Application: Name (TEAMID)" (default $TANGO_SIGN_IDENTITY)
-notarize
submit to Apple's notary service and staple the ticket
-password password
Windows: certificate password (prefer $TANGO_WINDOWS_CERT_PASSWORD: flags show up in process lists)
-profile profile
notarytool keychain profile (default $TANGO_NOTARY_PROFILE; else $TANGO_APPLE_ID, $TANGO_APPLE_TEAM_ID, $TANGO_APPLE_PASSWORD)
-timestamp url
Windows: RFC 3161 timestamp url (default windows.timestampURL, else http://timestamp.digicert.com)tan keygen
Usage: tan keygen [flags]
-f overwrite existing key files
-o name
write name.key (private) and name.pub (public) (default "update")tan release-manifest
Usage: tan release-manifest [flags]
-C dir
project dir (where tan.json is) (default ".")
-build dir
dir holding the tan build / tan package output (default "build")
-expires duration
how long the manifest stays valid (its "expires"), e.g. 720h; 0 writes none (default 720h0m0s)
-key file
private update key file from tan keygen (default $TANGO_UPDATE_KEY_FILE, or the key itself in $TANGO_UPDATE_KEY)
-linux format
Linux update format: appimage or dir (default appimage when an AppImage was built, else dir)
-notes notes
release notes, or @file to read them from a file
-o dir
output dir for the update files, patches and latest.json (default "release")
-prev dir
dir of an earlier release (its latest.json and files) to make patches from; repeatable
-url URL
base URL the files are served from (default: next to latest.json, as relative URLs)
-windows format
Windows update format: exe (replace the executable) or nsis (run the installer from tan package) (default "exe")tan sign-update
Usage: tan sign-update [flags] <manifest.json>
-expires duration
set the manifest's "expires" this long from now, e.g. 720h; 0 keeps the manifest's own (default 720h0m0s)
-key file
private key file from tan keygen (default $TANGO_UPDATE_KEY_FILE, or the key itself in $TANGO_UPDATE_KEY)
-o file
write the signed manifest to file (default: replace the input)tan applinks
Usage: tan applinks [flags]
-C dir
project dir (where tan.json is) (default ".")
-debug
android: use the debug keystore's fingerprint (for debug builds only)
-fingerprint fingerprint
SHA-256 signing certificate fingerprint for assetlinks.json; repeat for several keys (Play App Signing: the app signing key from Play Console). Default: android.keystore's key
-o dir
output dir; the files go in <dir>/.well-known (default "build/applinks")
-platform string
which files: ios (apple-app-site-association), android (assetlinks.json) or both (default "ios,android")
-team ID
Apple team ID (default: from ios.provisioningProfile or ios.signIdentity)tan generate bindings
Usage: tan generate bindings [flags]
-C dir
project dir (where tan.json is) (default ".")
-o dir
output dir (default <frontend.dir>/src/bindings, or bindings without tan.json)
-pkg dir
Go package dir with the bind.Register calls, relative to the project (default ".")
-runtime module
module that exports call (default "@tangoui/runtime")tan skills update
Usage: tan skills update [-C dir]
-C dir
project dir (where tan.json is) (default ".")
Install the skill from the project's Tango module. Run go mod download first if needed.
.agents/skills/tango is managed by tan; put your own skills in another directory.tan doctor
Usage: tan doctortan mcp
Usage: tan mcp [-root dir] [-stdio | -http [-addr addr] [-token token]]
-addr address
with -http: loopback address to listen on (127.0.0.1, localhost or [::1]) (default "127.0.0.1:0")
-http
serve MCP over streamable HTTP on a loopback address instead of stdio
-root dir
project dir the tools work in; paths outside it are refused (default ".")
-stdio
serve MCP over standard input and output (the default)
-token token
with -http: bearer token clients must send (default: a random one, printed to stderr)