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

mobitru-playwright-cli

v1.0.0

Published

Mobitru Playwright CLI — command-line tool for AI agents to automate browser testing on Mobitru cloud

Readme

mobitru-playwright-cli

CLI for AI agents to automate browser testing through the Mobitru cloud platform.

Thin wrapper over @playwright/cli with Mobitru-specific session plumbing. Drives a remote browser on Mobitru cloud — Chromium, Chrome, Firefox, or WebKit. No local browser required.

Installation

npm install -g mobitru-playwright-cli

⚠️ npm only. The package uses a postinstall script to patch @playwright/cli in node_modules/. Alternative managers — pnpm, yarn (PnP), bun — use symlink farms or virtual filesystems and the patch silently fails.

Quick start

# 1. Configure once
mobitru-playwright-cli config --set baseUrl=app.mobitru.com
mobitru-playwright-cli config --set apiKey=mobitru_ak_...
mobitru-playwright-cli config --set slug=your-slug
mobitru-playwright-cli config --set browserHubBaseUrl=browserhub.mobitru.com

# 2. Automate
mobitru-playwright-cli start https://example.com
mobitru-playwright-cli snapshot             
mobitru-playwright-cli fill e1 "[email protected]"
mobitru-playwright-cli click e3
mobitru-playwright-cli screenshot
mobitru-playwright-cli close

Configuration

Credentials are resolved in order: env vars → ~/.mobitru-cli/config.json.

| Field | Env var | Description | |---|---|---| | baseUrl | DEVICE_FARM_BASE_URL | Mobitru REST API host | | browserHubBaseUrl | DEVICE_FARM_BROWSER_HUB_BASE_URL | Browser Hub endpoint | | apiKey | DEVICE_FARM_API_KEY | API key (mobitru_ak_...) | | slug | DEVICE_FARM_SLUG | Billing/workspace slug |

mobitru-playwright-cli config          # inspect resolved credentials

Session lifecycle

mobitru-playwright-cli start                          # allocate Chromium (default)
mobitru-playwright-cli start https://example.com      # allocate and navigate
mobitru-playwright-cli start --browser=firefox        # chromium | chrome | firefox | webkit
mobitru-playwright-cli start --no-video               # disable cloud-side recording

mobitru-playwright-cli close                          # release cloud slot (always do this)
mobitru-playwright-cli close-all                      # sweep all sessions
mobitru-playwright-cli kill-all                       # force-kill stale daemons

start prints JSON to stdout — save sessionId for download-recording:

{ "sessionName": "mobitru", "sessionId": "abc-123", "artifactDir": "/path/to/.mobitru-playwright-cli" }

Parallel sessions

The default session name is mobitru. Use -s <name> (root-level flag) to run multiple independent cloud browsers simultaneously. Each session has its own daemon, cloud slot, and browser context.

# Terminal 1
mobitru-playwright-cli -s run-1 start https://site-a.com

# Terminal 2
mobitru-playwright-cli -s run-2 start https://site-b.com

# Commands are session-scoped
mobitru-playwright-cli -s run-1 snapshot
mobitru-playwright-cli -s run-2 snapshot

mobitru-playwright-cli -s run-1 close
mobitru-playwright-cli -s run-2 close

Different -s names are sufficient — each session gets its own daemon socket (<workspaceHash>-<sessionName>.sock), so run-1 and run-2 never collide regardless of working directory.

Commands

Navigation

goto <url> | go-back | go-forward | reload

Inspection

snapshot [ref] [--filename=out.yml] [--depth=4]
screenshot [ref] [--full-page] [--filename=out.png]
pdf [--filename=out.pdf]
console [level] [--clear]
network [--filter=<pattern>] [--request-body] [--clear]
eval "() => document.title"

Interaction

click <ref> [button] [--modifiers=Shift,Control]
dblclick <ref> | hover <ref>
fill <ref> <text> [--submit]
type <text> [--submit]
drag <ref> <ref>
select <ref> <value>
check <ref> | uncheck <ref>
press <key> | keydown <key> | keyup <key>
upload <path>
resize <width> <height>

Tabs

tab-list | tab-new | tab-select <index> | tab-close [index]

Storage & state

state-save [file] | state-load <file>
cookie-list | cookie-get <name> | cookie-set <name> <value> | cookie-delete <name> | cookie-clear
localstorage-list | localstorage-get <key> | localstorage-set <key> <value>
sessionstorage-list | sessionstorage-get <key> | sessionstorage-set <key> <value>

Network

route <pattern> [--status=404] [--body=...] [--content-type=...]
route-list | unroute [pattern]
network-state-set offline | network-state-set online

Tracing & video

tracing-start | tracing-stop
video-start [file] [--size=1280x720] | video-stop

Cloud diagnostics

stats                                             # hub capacity (total / free / used)
download-recording <sessionId> [--output=dir]     # download cloud MP4 (run after close)

Artifacts

Auto-generated files land in the artifact directory — stamped at start, not affected by later CWD changes.

| Setting | Path | |---|---| | Default | <CWD>/.mobitru-playwright-cli/ | | Override | PLAYWRIGHT_MCP_OUTPUT_DIR=/your/path mobitru-playwright-cli start |

Files named with --filename=<path> are resolved relative to CWD at command time, not the artifact dir.

Agent skill

Install the bundled skill so your agent knows how to use the CLI:

mobitru-playwright-cli install --skills=claude   # → .claude/skills/mobitru-playwright-cli/
mobitru-playwright-cli install --skills=agents   # → .agents/skills/mobitru-playwright-cli/