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

camoufox-browser

v0.1.0

Published

Camoufox-backed browser automation CLI for AI agents (core agent-browser compatible)

Readme

camoufox-browser

Camoufox-backed browser automation CLI for AI agents.

Status: v0.1 “core drop-in” compatibility with agent-browser (core subset). Non-core commands return Not yet implemented: <command>.

Install

npm i -g camoufox-browser

# Download Camoufox binaries (required before `open`)
camoufox-browser install

# Linux only: also install system libraries (uses sudo/root)
camoufox-browser install --with-deps

Quickstart (snapshot → refs → interact)

camoufox-browser open https://example.com
camoufox-browser snapshot -i

# Click an element from the snapshot (refs look like [ref=e1])
camoufox-browser click @e1

camoufox-browser get url
camoufox-browser screenshot page.png
camoufox-browser close

JSON mode

Use --json to get machine-friendly output:

camoufox-browser --json snapshot -i
camoufox-browser --json get title

Sessions

Each session has its own long-lived daemon (browser instance). Use this to isolate runs:

camoufox-browser --session prod open https://example.com
camoufox-browser --session prod snapshot -i
camoufox-browser --session prod close

Environment variables:

  • CAMOUFOX_BROWSER_SESSION (alias: AGENT_BROWSER_SESSION)
  • CAMOUFOX_BROWSER_SOCKET_DIR (alias: AGENT_BROWSER_SOCKET_DIR)
  • CAMOUFOX_BROWSER_IDLE_TIMEOUT_MS (alias: AGENT_BROWSER_IDLE_TIMEOUT_MS)

Common flags (core)

  • --headed / CAMOUFOX_BROWSER_HEADED=1
  • --debug / CAMOUFOX_BROWSER_DEBUG=1
  • --profile <dir>: persistent context (durable cookies/storage)
  • --state <path>: load Playwright storageState on launch (ephemeral mode)
  • --proxy <url> / --proxy-bypass <list>
  • --user-agent <ua>
  • --args "<comma-or-newline-separated args>"

Notes:

  • --headed is applied at browser launch time. If a session already has a running headless browser, open|goto|navigate with --headed will relaunch the browser to apply headed mode (this may close existing tabs/pages for that session).

Command reference (v0.1 core + high-frequency)

  • Navigation: open|goto|navigate, back, forward, reload, close
  • Tabs: tab [new [url]|list|close [n]|<n>]
  • Frame: frame <selector|main> (alias: frame mainmainframe)
  • Dialog: dialog <accept|dismiss> [text]
  • Snapshot: snapshot [-i] [-c] [-C] [--depth N] [--selector <css>]
  • Eval: eval [-b|--base64] [--stdin] <script>
  • Interact: click, dblclick, focus, fill, type, press, hover, check, uncheck, select, drag, upload, download
  • Keyboard: keydown <key>, keyup <key>, keyboard <type|inserttext> <text>
  • Scroll: scroll [direction] [amount] [--selector <css>], scrollintoview <selector>
  • Get: get url|title|text|html|value|attr|count|box|styles
  • Is: is visible|enabled|checked <selector>
  • Wait: wait <ms|selector|@ref> or wait --url <pattern> / wait --load <state> / wait --text <text>
  • Screenshot: screenshot [selector|@ref] [path] (also supports --full-page, --format, --quality)
  • Debug: console [--clear], errors [--clear], highlight <selector>
  • Storage: cookies [get|set|clear], storage <local|session> [get|set|clear] [key] [value]

Gap vs agent-browser

camoufox-browser focuses on a high-frequency drop-in subset. If you need full agent-browser functionality, use agent-browser directly.

Not yet implemented in camoufox-browser (non-exhaustive):

  • Network tooling: route, unroute, requests, responsebody
  • Locator helpers: find, getbyrole/getbytext/... and related subcommands (nth, etc.)
  • State vault: state save|load|list|show|clear|rename|clean
  • Recording / profiling: HAR/recording/profiler/screencast commands
  • Misc: pdf, clipboard, touch/mouse low-level input, permissions/geolocation/media emulation, devtools inspect/pause, diff tools

More examples

Snapshot scoped to a container:

camoufox-browser snapshot -i --selector "main"

Wait for a ref to become visible:

camoufox-browser wait @e1

Use a persistent profile directory:

camoufox-browser --profile ~/.camoufox-profile open https://example.com

Manage cookies and web storage:

camoufox-browser cookies
camoufox-browser cookies set sid abc --url https://example.com --httpOnly --secure
camoufox-browser storage local set theme dark
camoufox-browser storage local get theme
camoufox-browser storage local

Why “npm package + Rust”?

Camoufox/Playwright execution is Node-based, but the CLI is shipped as a native Rust binary for:

  • Faster cold-start per invocation (especially in agent loops)
  • Easier distribution of a single executable per platform
  • Keeping the Node daemon isolated as a long-lived process per session

If the native binary can’t be downloaded or executed, camoufox-browser falls back to a JS implementation (dist/cli.js).

Troubleshooting

  • If you see an error about missing ~/.cache/camoufox/version.json, run camoufox-browser install.
  • If you use pnpm and see better-sqlite3 “Could not locate the bindings file”, run:
    • pnpm -C camoufox-browser install
    • pnpm -C camoufox-browser rebuild better-sqlite3