expo-tailscale-start
v0.1.2
Published
Start Expo with a Tailscale URL and terminal QR output.
Readme
expo-tailscale-start
Start Expo dev server with a Tailscale-friendly exp:// URL and terminal QR output.
Install
npm install --save-dev expo-tailscale-startpackage.json example
{
"scripts": {
"dev": "expo-tailscale-start --clear"
}
}Then run:
npm run devBehavior
- Resolves your current Tailscale IPv4 using
tailscale ip -4 - Picks an available Expo port (defaults to
8081) - Prints an
exp://<tailscale-ip>:<port>URL - Prints a terminal QR code for the same URL (if
qrcodecan be loaded) - Suppresses Expo's own terminal QR to avoid duplicate QR output
- If Expo switches to a different port at runtime, prints an updated URL and QR
- Starts local
expo startwhen available, otherwise falls back tonpx --yes expo startwith your original CLI args
Programmatic API
import { startExpoWithTailscale, waitForChildExit } from 'expo-tailscale-start';
const result = await startExpoWithTailscale({
passThroughArgs: ['--clear'],
});
const code = await waitForChildExit(result.child);
process.exit(code);Notes
- Requires
tailscaleCLI installed to print a Tailscale URL. - If Tailscale is unavailable, Expo still starts; only URL/QR output is skipped.
