Twig

Getting started

Install Twig on Android. Build from source. Bring your own keys.

Twig is a Bun + Turborepo monorepo. The product surface is Expo React Native on Android only. For downloads, package id, and legal terms see the distribution page.

You need

  • Bun 1.3+
  • Android device or the browser emulator (Docker + noVNC)
  • Dev build of the app (Expo Go is dead here — see below)
  • adb on your PATH (brew install --cask android-platform-tools on macOS)

Install

bun install

Browser emulator (optional)

Pop an Android phone into your browser, then adb it from the host or from a coding agent:

bun run emu:doctor
bun run emu:up          # Linux + KVM; on Mac use a remote host — see emulator docs
bun run emu:wait && bun run emu:adb
bun run emu:open        # http://localhost:6080

Details, Apple Silicon notes, and companion pairing: Browser Android emulator.

Run Android app

bun run dev:native

Twig needs expo-sqlite with sqlite-vec. That is a build-time flag. Expo Go cannot do it. You make a real development build:

cd apps/native
bunx expo prebuild --platform android
bunx expo run:android

Skip this and you get pain.

Run docs site

bun run dev:web
# → http://localhost:4000

Laptop companion

Companion TUI in apps/cli. Lends compute over USB / adb reverse. Does not steal agent homes:

bun run companion

With the Docker emulator, start it first (emu:adb), then the companion — same reverse tunnel as a real cable. See Laptop companion.

Scripts

ScriptWhat
bun run devEverything
bun run dev:nativeExpo only
bun run dev:webDocs on port 4000
bun run companionLaptop companion TUI
bun run emu:upStart Docker Android + noVNC
bun run emu:adbadb connect the emulator
bun run emu:openOpen noVNC in the browser
bun run buildBuild all
bun run check-typesTypecheck
bun run testTests

API keys

Twig does not ship models. Put key in app. OpenRouter = default easy path. Also OpenAI, Anthropic, Google. Keys live in secure storage on device. No key still means you can open files and reindex. Key only needed when you want the model to talk.