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

@inferenceroom/pico-cli

v2.0.2

Published

pico developer/operator CLI: open and close channels, pay, query hubs, run dev fork.

Downloads

293

Readme

@inferenceroom/pico-cli — agent runtime

The agent runtime for pico. Open and close payment channels on Taiko, send and receive USDC payments via invoice or keysend, and run a long-lived listener that settles inbound HTLCs as they arrive.

Quickstart (encrypted key, recommended)

pnpm install
pnpm pico keys init                    # generate + passphrase-encrypt
pnpm pico hello

# Pattern A — invoice flow
INV=$(pnpm pico invoice create --amount 50000 --memo "service foo")
pnpm pico pay --invoice "$INV" --via ws://hub.example.com:9050 --json

# Pattern B — keysend
pnpm pico pay --keysend --to 0xRecipient --amount 50000 \
  --recipient-pubkey 0x… --via ws://hub.example.com:9050 --json

# Receive (long-lived)
pnpm pico listen --hub ws://hub.example.com:9050

Key management

pnpm pico keys init
pnpm pico keys show                    # print address only
pnpm pico keys import --from 0x…       # import an existing key
pnpm pico keys show --reveal-private   # passphrase-prompted

The default encrypted key path is $XDG_CONFIG_HOME/pico/key.enc (or ~/.config/pico/key.enc when XDG_CONFIG_HOME is unset). The file format is scrypt(N=2^17,r=8,p=1) + xsalsa20-poly1305 (libsodium-compatible) sealed inside a small JSON envelope.

Test/CI shortcut (raw keys, not recommended for operators)

export PICO_PRIVATE_KEY=0x…   # 32-byte hex; warns to stderr
pnpm install
pnpm pico hello

The CLI resolves the signing key in this order:

  1. --private-key <hex> flag (warns to stderr)
  2. PICO_PRIVATE_KEY env var (warns to stderr)
  3. --key-file <path> argument
  4. $XDG_CONFIG_HOME/pico/key.enc (default location)

The first two are intended for test/CI use. Production/operator workflows should prefer encrypted key files.

Commands

pico hello
pico keys init|import|show
pico channel open --hub <addr> --amount <usdc> [--rpc <url>] [--token <addr>]
pico channel list [--json]
pico channel close <id> [--cooperative|--unilateral] [--via <ws-url>]
pico invoice create --amount <usdc> [--memo <s>] [--expiry <s>] [--hub-hint <url>]
pico invoice list [--paid|--unpaid] [--json]
pico invoice show <paymentHash> [--reveal-preimage]
pico pay --invoice <env> [--via <ws-url>] [--json]
pico pay --keysend --to <addr> --amount <usdc> --recipient-pubkey <hex> [--memo <s>] [--via <ws-url>] [--json]
pico listen [--hub <ws-url>] [--channel <id>...] [--log-format pretty|json]
pico hub status <http-url>
pico dev anvil-fork [--fork-url <rpc>] [--fork-block <n>] [--port <n>]
pico dev mock-hub [--port <n>]

Tests

pnpm --filter @inferenceroom/pico-cli test --coverage

Coverage thresholds: 70% lines / 60% branches / 70% functions / 70% statements.

Demo (test keys; one terminal)

# Terminal 1 — start a mock hub
pnpm pico dev mock-hub --port 9050

# Terminal 2 — Bob listens (config dir A)
PICO_PRIVATE_KEY=0x…b0b PICO_CONFIG_DIR=/tmp/bob \
  pnpm pico listen --hub ws://127.0.0.1:9050

# Terminal 3 — Bob issues an invoice
INV=$(PICO_PRIVATE_KEY=0x…b0b PICO_CONFIG_DIR=/tmp/bob \
  pnpm pico invoice create --amount 50000 --memo "demo")

# Terminal 4 — Alice pays
PICO_PRIVATE_KEY=0x…a11c PICO_CONFIG_DIR=/tmp/alice \
  pnpm pico pay --invoice "$INV" --via ws://127.0.0.1:9050 --json

The integration test at test/integration/pay-listen.integration.test.ts runs this whole flow in-process against the test-utils mock hub.