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

predictarena

v0.1.3

Published

PredictArena CLI for DFlow prediction markets

Readme

PredictArena CLI

Production-ready CLI for discovering and trading DFlow prediction markets.

For agents

Requirements

  • Node.js 18+

Install (deployed CLI)

npm install -g predictarena

Or run without installing:

npx predictarena <command> [options]

Run

predictarena <command> [options]

Examples:

predictarena categories --json
predictarena series --category Economics --json
predictarena events list --limit 5 --json
predictarena markets list --limit 3 --json
predictarena trades list --limit 5 --json
predictarena search bitcoin --limit 5 --json
predictarena wallet create ./agent-wallet.json

Development (from source)

git clone <repo> && cd predictarena
npm install && npm run build
node dist/bin.mjs --help   # or: predictarena if linked via npm link

Output formats

  • Default: human-readable full JSON (no truncation)
  • --json: structured JSON with data, pagination, _hints

Wallet

Create a Solana keypair for agent signing and save it to a file:

predictarena wallet create <path>

The CLI writes a standard Solana keypair file (JSON array of 64 bytes) to <path> and prints the public key so you can fund it. The file is compatible with Keypair.fromSecretKey(new Uint8Array(JSON.parse(...))).

Agent / automation: Agents can run wallet create <path> autonomously. Use --json to get machine-readable output { data: { publicKey, path } }. Fund the returned publicKey before using the wallet.

Config (codebase only)

The CLI does not accept API URL or API key flags. The library reads them from env:

  • METADATA_API_BASE or DFLOW_METADATA_API_URL (default: https://dev-prediction-markets-api.dflow.net)
  • TRADE_API_BASE or DFLOW_TRADE_API_URL (default: https://dev-quote-api.dflow.net)
  • DFLOW_API_KEY or PREDICTARENA_API_KEY (optional for dev, rate-limited without)

Tests

Integration tests hit the live dev API.

npm test

Publishing (maintainers)

Option A – Publish from CI (recommended)
Push a version tag to trigger publish to npm:

  1. In GitHub: Settings → Secrets and variables → Actions → add secret NPM_TOKEN. Use an Automation token (not Read-only) from npmjs.com/settings/~/tokens. If you get 403, do the first publish locally once: npm login then npm run build && npm publish --access public so the package is created under your account; after that CI can publish new versions.
  2. repository.url in package.json should point to your repo.
  3. Bump version and push a tag:
    npm version patch   # or minor / major
    git push && git push --tags
    The .github/workflows/publish.yml workflow runs on tags v* and runs npm publish --provenance --access public.

Option B – Publish locally

npm run build
npm publish --access public

Log in first with npm login if needed. prepack runs the build before publish; files includes only dist.