npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

devicerent-connect

v0.1.1

Published

Make a rented DeviceRent phone show up as a local adb device, so Appium / Espresso / Maestro / gradle just work against it.

Readme

devicerent-connect

Make a rented DeviceRent phone show up as a local adb device, so your existing Appium / Espresso / Maestro / Flutter / gradle setup works against it unchanged — locally or in CI.

It runs a tiny local adb-server emulator and tunnels everything to the device over DeviceRent's serial-pinned bridge. Your tools just point at it with ANDROID_ADB_SERVER_PORT.

How it works

appium / gradle / maestro
        │  (ANDROID_ADB_SERVER_PORT=15037, standard adb host protocol)
        ▼
devicerent-connect  ──HTTPS──▶  /api/automation/ticket   (API key → serial-scoped JWT)
        │  (one WebSocket per adb conversation, JWT in subprotocol)
        ▼
Pi bridge (Model A)  ──▶  adb-server  ──USB──▶  your rented Pixel

The connector handles adb forward itself (binding the listen port on your machine, then tunneling each connection to the device) — which is what lets Appium reach the on-device UiAutomator2 server.

Prerequisites

  • Node 18+ (for the npm usage) — or use the Docker image.
  • Recent platform-tools (adb ≥ 34 recommended; the connector reports the Pi's adb-server version, so very old clients may refuse it).
  • A DeviceRent automation API key — create one at <app>/account/automation (Pro / Rent-a-Slot / Enterprise plans).
  • An active rental — start it in the dashboard and copy its rental id.

Install

Three ways, pick what fits:

# 1. npx — no install (recommended for trying it / CI)
npx devicerent-connect --key drauto_… --rental <rental-id>

# 2. global install
npm i -g devicerent-connect && devicerent-connect --key drauto_… --rental <id>

# 3. Docker (CI-friendly, no Node on the host)
docker build -t devicerent-connect .   # from clients/devicerent-connect/

From source (this repo): node clients/devicerent-connect/bin/devicerent-connect.mjs --help.

Usage

npx devicerent-connect --key drauto_xxxxxxxx… --rental <rental-id>
# or with env vars:
export DEVICERENT_API_KEY=drauto_xxxxxxxx…
export DEVICERENT_RENTAL_ID=<rental-id>
npx devicerent-connect

It prints:

✓ Connected — rented device 33071JEHN24029 is now a local adb device.

    export ANDROID_ADB_SERVER_PORT=15037

Then, in the same shell:

export ANDROID_ADB_SERVER_PORT=15037
adb devices                       # → 33071JEHN24029   device
appium                            # caps: appium:udid=33071JEHN24029, automationName=UiAutomator2
./gradlew connectedAndroidTest    # Espresso / instrumentation
maestro test flow.yaml

Leave the connector running while you test; Ctrl-C disconnects.

Options / env

| Flag | Env | Default | |---|---|---| | --key | DEVICERENT_API_KEY | — (required) | | --rental | DEVICERENT_RENTAL_ID | — (required) | | --port | DEVICERENT_ADB_PORT | 15037 | | --api-base | DEVICERENT_API_BASE | https://devicerent.net |

CI (Docker)

docker build -t devicerent-connect .
# run the connector + your tests in the same container/network:
docker run --rm \
  -e DEVICERENT_API_KEY=$DEVICERENT_API_KEY \
  -e DEVICERENT_RENTAL_ID=$RENTAL_ID \
  devicerent-connect

Put the key in your CI secrets — never commit it. A full GitHub Actions example (start connector → wait for device → run tests) is in examples/github-actions.yml.

Limitations (v1)

  • Forward-only. adb reverse is intentionally unsupported (the bridge denies it — it would point the device back at the Pi). Frameworks that require reverse (e.g. Detox) aren't supported yet; Appium/Espresso/Maestro/Flutter use forward.
  • ~10-minute token window per operation. The connector continuously re-mints, so newly started operations always get close to a full window, but a single unbroken operation that runs longer than the token TTL may be cut. (Hosted Appium — coming — avoids this by running on the Pi.)
  • One device. A key + rental maps to exactly the one rented phone.
  • adb reverse, wireless adb tcpip, and multi-device selection are not exposed.

Security

  • The API key is only ever sent to your DeviceRent app over HTTPS to mint short-lived tokens; it never reaches the Pi.
  • Tokens are serial-scoped and expire in ~10 minutes; revoke a key any time at <app>/account/automation.
  • The local adb server binds 127.0.0.1 only.