
pura 将研发手上的 USB 真机汇成局域网设备墙。ADB 留在本机,视频流与点击会话通过 Hub 路由。
pura is a LAN Android device mirror for product and design teams. A central Hub shows all online Android devices, while each developer runs a local Agent that talks to their own USB-connected phone through ADB.
No login, no cloud, no public tunnel. It is meant for trusted office networks.
Start the Hub with Docker Compose:
docker compose up -d
Open the Hub:
http://<hub-lan-ip>:8787
On each developer machine, connect an Agent. After this command starts, the Hub page shows every authorized Android device attached to this machine:
npx @nickname4th/pura-cli connect <hub-lan-ip>:8787 --name "Zhang San"
On macOS, keep the Agent connected after login or terminal close. Install the CLI globally first so the background service has a stable executable path, then connect with --background:
npm install -g @nickname4th/pura-cli
pura-cli connect <hub-lan-ip>:8787 --name "Zhang San" --background
Open the Hub page, find the device under devices to publish, and publish it from the web UI. Designers can then pick the published machine on the Hub homepage, open the live screen, and click on it with a mouse.
The GitHub Pages site lives in site/ and is deployed by .github/workflows/pages.yml.
After publishing the repository, enable GitHub Pages with GitHub Actions as the source. The public URL will be:
https://liutianjie.github.io/pura/
adbDevelopers can use pura without installing it permanently:
npx @nickname4th/pura-cli --help
Or install globally:
npm install -g @nickname4th/pura-cli
pura-cli --help
For repository development:
npm install
npm run build
npm link
Recommended Docker Compose deployment:
docker compose up -d
The included compose file builds the local image by default. To use a published GHCR image:
PURA_IMAGE=ghcr.io/liutianjie/pura:main docker compose up -d
Equivalent Node.js deployment:
pura-cli hub --host 0.0.0.0 --port 8787
Each developer connects their local Agent to the Hub. Once connected, the Hub web UI lists all authorized local Android devices, including devices that are not published yet:
pura-cli connect 192.168.100.128:8787 --name "Zhang San"
The Agent listens on 8788 by default and continuously reports local ADB devices to the Hub. Use the web UI to publish, rename, unpublish, and manage devices.
If the Hub cannot reach the auto-detected Agent URL, specify it:
pura-cli connect 192.168.100.128:8787 --name "Zhang San" --public-url http://192.168.100.45:8788
The Agent heartbeat automatically recovers after Wi-Fi or Hub restarts as long as the Agent process is still running. On macOS, install the saved Agent connection as a LaunchAgent so it starts at login and restarts if the terminal is closed:
pura-cli connect 192.168.100.128:8787 --name "Zhang San" --background
Check or remove the background service:
pura-cli auto-connect --status
pura-cli auto-connect --uninstall
Connect a phone over USB and confirm it is authorized:
adb devices -l
Then run or install the Agent:
pura-cli connect 192.168.100.128:8787 --name "Zhang San" --background
Open the Hub page and publish the device from the web UI.
The CLI also has a shortcut for scripts:
pura-cli connect device --name "Zhang San Pixel 8" --owner "Zhang San" --note "login branch"
If multiple Android devices are connected:
pura-cli connect device --serial RFCY10DHQ3P --name "Samsung S25" --owner "Li Si"
pura-cli hubpura-cli connect <hub>pura-cli auto-connectpura-cli connect devicepura-cli devicesHub:
POST /api/agents/heartbeatGET /api/devicesPOST /api/devices/:deviceId/sessionPOST /api/devices/:deviceId/tapPUT /api/devices/:deviceId/publicationDELETE /api/devices/:deviceId/publicationDELETE /api/sessions/:idWS /ws/sessions/:id/videoAgent:
GET /api/devicesPOST /api/devices/:serial/sessionPOST /api/devices/:serial/tapPUT /api/devices/:serial/publicationDELETE /api/devices/:serial/publicationDELETE /api/sessions/:idWS /ws/sessions/:id/videoROLE=hub|agent|standaloneHOST=0.0.0.0PORT=8787HUB_URL=http://<hub-ip>:8787AGENT_IDAGENT_NAMEPUBLIC_URL=http://<agent-ip>:8788ADB_PATH=adbSTREAM_SIZE optional; unset uses native device resolutionSTREAM_BITRATE=8000000STREAM_TIME_LIMIT_SECONDS=180INCLUDE_TCP_DEVICES=trueDATA_DIR=data-agentThe npm package is @nickname4th/pura-cli and installs the pura-cli binary.
Release flow:
version in package.json.npm run check, npm run build, and npm pack --dry-run.v0.1.0.@nickname4th/pura-cli to npm and ghcr.io/liutianjie/pura to GHCR.The release workflow requires an NPM_TOKEN repository secret.
screenrecord H.264 output. No Android app or root is required.pura-cli.screenrecord time limits; the Agent restarts the stream automatically when it exits.