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

@hedge-layer/cli

v2.2.0

Published

CLI for Hedge Layer — prediction market intelligence from the terminal

Readme

@hedge-layer/cli

npm version license

Command-line interface for Hedge Layer: prediction market intelligence from the terminal.

The canonical CLI guide now lives in the Hedge Layer web app docs: hedgelayer.ai/docs/cli.

Install

npm install -g @hedge-layer/cli

Requires Node.js 22 or later.

Install troubleshooting

  • EACCES / "operation was rejected by your operating system" on npm install -g: your npm prefix points at a root-owned directory (e.g. /usr/lib/node_modules) and you don't have sudo. Install into a user-writable prefix instead:

    mkdir -p "$HOME/.npm-global"
    npm config set prefix "$HOME/.npm-global"
    export PATH="$HOME/.npm-global/bin:$PATH"   # add to your shell rc to persist
    npm install -g @hedge-layer/cli
  • nvm warns npmrc ... globalconfig and/or prefix setting ... incompatible with nvm: this is harmless shell-init noise from nvm (not from hl) that appears after setting a custom npm prefix as above — the CLI still works. To avoid it entirely under nvm, install without a custom prefix (nvm's per-version bin/ is already user-writable):

    npm config delete prefix
    npm config delete globalconfig
    nvm use --delete-prefix "$(node -v)" --silent
    npm install -g @hedge-layer/cli

    Alternatively, skip the global install and run on demand with npx @hedge-layer/cli <command>.

Quick Start

# 1. Create an API token at https://hedgelayer.ai/account/settings
# 2. Authenticate the CLI
hl auth login

# 3. Generate a Market Brief
hl brief "US China trade war tariffs"

# 4. Or start an interactive research session
hl research

# 5. Run the manual liquidity-provider flow
hl --json feed liquidity-provider --limit 15 | jq '{ markets: .markets }' > markets.json
hl lp allocator --markets markets.json
hl-trader buy

# 6. Check linked wallet funds
hl wallet balances

# 7. Analyze a market probability edge
hl signal analyze "https://polymarket.com/event/example-market"

Commands

Full command documentation is available at hedgelayer.ai/docs/cli.

Liquidity-provider workflows are available under hl lp:

hl lp scan "liquidity opportunities"   # persist candidate evidence
hl lp allocator --markets markets.json # run allocator agent on an explicit list
hl lp recommend --scan-id <scan-id>    # recommend allocate/reduce/exit actions
hl lp evaluate                         # summarize PnL lessons

The lightweight manual loop is:

hl --json feed lp-opportunity --limit 15 > markets.json
hl-trader pnl --json > pnl.json   # optional: wallet PnL + live inventory
hl lp allocator --markets markets.json --pnl pnl.json --allocations pnl.json
hl-trader buy ...

hl lp allocator submits the candidate market list through the web API to the allocator agent. Allocator output shows target capital, quote regime, failed safety checks, and split spread/reward economics. Trade execution stays outside the hl allocator command.

--allocations tells the allocator what you already hold (enabling HOLD, REDUCE, and EXIT decisions), and --pnl feeds per-market PnL into its caution overlay so borderline allocations on losing markets are downgraded to WATCH or HOLD. Both flags accept the hl-trader pnl --json output file directly.

Wallet commands are available under hl wallet:

hl wallet status                       # show linked owner and Polymarket deposit wallet status
hl wallet balances                     # show available pUSD, USDC.e, and POL
hl wallet funds                        # alias for balances
hl wallet deposit                      # show public Polygon deposit address and assets
hl wallet deposit --bridge             # also show Polymarket Bridge deposit addresses
hl wallet withdraw --asset pUSD --amount 10 --to 0x...

hl wallet withdraw creates a withdrawal intent, opens the browser signing page, and polls until the deposit-wallet transfer succeeds, fails, or times out. The CLI token never receives wallet signing power.

Withdrawals currently send pUSD from the linked Polymarket deposit wallet on Polygon. Keep a small POL balance in the owner wallet for Polygon gas; without native POL, the browser-signed transfer can fail even when the deposit wallet has enough pUSD.

Signal-agent analysis is available under hl signal:

hl signal analyze "https://polymarket.com/event/example-market"
hl signal analyze "https://polymarket.com/event/example-market" --context "Recent search notes"
hl --json signal analyze "https://polymarket.com/event/example-market" | jq '.result.analysis'

Changelog

See CHANGELOG.md for release history.

License

MIT