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

v0.2.0

Published

CLI for Hedge Layer — hedge real-world risks on Polymarket

Downloads

214

Readme

@hedge-layer/cli

npm version license

Command-line interface for Hedge Layer — hedge real-world risks on Polymarket prediction markets.

Install

npm install -g @hedge-layer/cli

Requires Node.js 22 or later.

Quick Start

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

# 3. Start an interactive risk assessment
hl assess

Authentication

The CLI uses API tokens created in the Hedge Layer web app. Tokens are stored locally in ~/.hedgelayer/config.json.

hl auth login      # Paste your API token (interactive)
hl auth status     # Check current authentication
hl auth logout     # Remove stored token

You can also pass a token inline for CI/scripts:

hl --token hl_abc123... assess list

Commands

Markets

Polymarket orderbook tools.

# View orderbook for a specific CLOB token
hl markets orderbook <tokenId>
hl markets orderbook <tokenId> --size 1000

Assess

Run AI-powered risk assessments interactively.

# Start an interactive chat assessment
hl assess

# List past assessments
hl assess list
hl assess list --status completed

# View a specific assessment
hl assess show <id>

# Delete an assessment
hl assess delete <id>

Hedge

Calculate hedge positions from a risk profile JSON file.

# From a file
hl hedge profile.json

# From stdin
echo '{
  "location": "33109",
  "assetType": "residential",
  "riskTypes": ["hurricane", "flood"],
  "assetValue": 500000
}' | hl hedge -

Profile

hl profile

Global Options

| Flag | Description | |------|-------------| | --json | Machine-readable JSON output | | --api-url <url> | Override API base URL (default: https://hedgelayer.ai) | | --token <token> | Override stored API token | | --verbose | Show HTTP request/response details | | --no-color | Disable colored output |

JSON output

Every command supports --json for pipe-friendly output:

hl --json assess list | jq '.[0].id'

Development

git clone https://github.com/hedge-layer/hedge-layer-cli.git
cd hedge-layer-cli
npm install
npm run build        # Build with tsup
npm run dev          # Watch mode

# Test against local dev server
node dist/index.mjs --api-url http://localhost:3000 assess list

Publishing

Releases are automated via GitHub Actions. To publish a new version:

npm version patch    # or minor / major
git push --tags

The workflow builds and publishes to npm when a version tag (v*) is pushed. Requires an NPM_TOKEN secret in the repo settings.

Changelog

See CHANGELOG.md for release history.

License

MIT