TailCode is a terminal wizard that connects Tailscale + OpenCode and publishes OpenCode to your tailnet with a shareable URL and QR code.
Prerequisites: tailscale and opencode installed and available on your PATH.
brew tap kitlangton/tap
brew install tailcode
tailcodebunx @kitlangton/tailcodeDownload the latest binary from GitHub Releases, mark it executable, then run it:
chmod +x ./tailcode
./tailcode- TailCode checks that
tailscaleandopencodeare installed - If Tailscale is not connected, it prompts you to sign in (including QR-based flows from Tailscale)
- It starts OpenCode locally only (
127.0.0.1, default port4096) - It runs
tailscale serveso the app is reachable from devices on your tailnet - It keeps the process alive until you quit, then cleans up the local server process
- Install Tailscale
- macOS:
brew install --cask tailscale-app - Windows:
winget install --id tailscale.tailscale --exact - Linux:
curl -fsSL https://tailscale.com/install.sh | sh
Then sign in and make sure Tailscale is running on this machine.
- Install OpenCode
- macOS:
brew install anomalyco/tap/opencode - Linux:
curl -fsSL https://opencode.ai/install | bash - Alternative:
bun install -g opencode-ai
Verify both commands work:
tailscale version
opencode --versionDownload pre-built binaries from GitHub Releases:
# macOS (Apple Silicon)
curl -L -o tailcode https://github.com/kitlangton/tailcode/releases/latest/download/tailcode-darwin-arm64
chmod +x tailcode
./tailcode
# macOS (Intel)
curl -L -o tailcode https://github.com/kitlangton/tailcode/releases/latest/download/tailcode-darwin-x64
chmod +x tailcode
./tailcode
# Linux (x64)
curl -L -o tailcode https://github.com/kitlangton/tailcode/releases/latest/download/tailcode-linux-x64
chmod +x tailcode
./tailcode
# Linux (ARM64)
curl -L -o tailcode https://github.com/kitlangton/tailcode/releases/latest/download/tailcode-linux-arm64
chmod +x tailcode
./tailcodeRequires Bun (the tailcode executable is a Bun CLI):
curl -fsSL https://bun.sh/install | bashRun without installing globally:
bunx @kitlangton/tailcodeOr install globally:
bun add -g @kitlangton/tailcode
tailcodebun install
bun run startFor development (hot reload):
bun run devTAILCODE_PORT(default:4096)TAILCODE_PASSWORD(optional; passed toOPENCODE_SERVER_PASSWORD)
Example:
TAILCODE_PORT=4096 TAILCODE_PASSWORD=secret bun run start- The published URL is only reachable from devices on your Tailscale tailnet
- OpenCode is bound to localhost to avoid exposing it on your LAN
tailcodealways opens the setup wizard (usetailcode --attachfor explicit attach)- TailCode shows a local attach command after setup:
opencode attach http://127.0.0.1:4096
We provide standalone binaries for:
- macOS:
arm64(Apple Silicon),x64(Intel) - Linux:
x64,arm64 - Windows:
x64(coming soon)
Binaries are compiled with Bun and include the Bun runtime. No separate Bun installation needed.
All releases include SHA256 checksums in SHA256SUMS. Verify after download:
# macOS/Linux
sha256sum -c SHA256SUMS# Bundle for local testing
bun run build:bundle
# Compile for current platform
bun run build:compile
# Full release build (all platforms + checksums)
bun run build:releasebun run typecheck- Type check with TypeScriptbun run lint- Lint with oxlintbun run fmt- Format with oxfmtbun run check- Run all checks (typecheck + lint + fmt)
MIT