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

persona-test-cli

v0.1.7

Published

运维 CLI for persona-test — admin 和已审核通过的普通用户都能用;设备码浏览器授权登录,管理分享链接(campaigns)和画像(personas),普通用户只能看到/编辑自己创建的。

Readme

persona-test-cli

Ops CLI for a persona-test deployment. By default it points at https://persona.mixlab.top; pass --base-url <url> (or set PERSONA_TEST_CLI_URL) to point it at a different deployment instead. Admin and approved regular users can both use it — a regular user only ever sees/edits campaigns and personas they created themselves; admin sees and can edit everything.

Install

npm install -g persona-test-cli

Getting started

# New account: register, then wait for an admin to approve it at /admin/users
persona-test-cli register

# Log in — opens a browser to approve the CLI (device-code flow), no password typed into the terminal
persona-test-cli login

# See everything at once
persona-test-cli examples

login works for both admin (approve with the admin password login) and regular users (approve with their email/password login) — whichever session is active in the browser when the authorize page loads decides the scope of the issued token.

Commands

| Command | Who | What | |---|---|---| | register | anyone | Self-register (pending admin approval) | | login | anyone | Device-code browser login | | logout | anyone | Clear the stored token | | whoami | anyone | Show current identity + available commands | | campaigns list/create/edit/link/stats | anyone | Share links — scoped to your own unless admin | | campaigns create/edit --image <path> | anyone | Set the entry image from a local file — auto-resized/compressed to match the web dashboard's pipeline | | personas list/create/edit | anyone | Ad-copy personas — scoped to your own unless admin | | events tail | anyone | Poll new impression/click events (starts from now; --since <iso> to replay history first) | | users list/approve/reject | admin only | Registration approval queue |

Run any command with --help for its full options and copy-pasteable examples.

Scripting / agent use

  • --json (or PERSONA_TEST_CLI_JSON=1): every command prints machine-readable JSON instead of a table — success to stdout, {"error": ..., "usage": ...} to stderr on failure.
  • Exit codes: 0 ok · 1 unclassified · 2 not logged in / invalid token · 3 bad arguments · 4 not found · 5 forbidden (not yours).
  • PERSONA_TEST_CLI_TOKEN=<token>: skip login entirely — set once by a human via the normal device-code flow, then exported into an automated environment.
  • register --email <e> --password <p>: non-interactive registration (fails fast instead of hanging on a prompt when stdin isn't a TTY).
  • login --no-open: print the authorize URL instead of trying to launch a browser (headless/ sandboxed environments).
  • Update notice: once a day, checks npm for a newer version and prints a one-line reminder to stderr if you're behind. Skipped automatically under --json, in CI (CI env set), or with NO_UPDATE_NOTIFIER=1.

License

MIT