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

precog-cli

v0.2.1

Published

Interactive Precog CLI — Base MCP wallet, markets, positions, favorites

Readme

precog-cli

Terminal app for Precog prediction markets on Base and Arbitrum.

Browse markets, track positions, save favorites, and trade — all from your terminal. Your wallet connects through Base Account (no private keys stored here).

Quick start

Requirements: Node.js 20+ and a Base Account.

npm install -g precog-cli
precog

Try it once without installing:

npx precog-cli

First-time setup

  1. Run precog.
  2. Choose Login with Base wallet.
  3. Your browser opens for Base Account authorization.
  4. After approving, return to the terminal — you should see your wallet address.
  5. Choose Enter app to open the main menu.

Session is saved locally, so you usually only log in once. Use Log out / switch wallet to sign out or connect a different account.


Using the app

Main menu

After login:

| Option | What it does | |--------|----------------| | Check markets | Browse open markets on Base and Arbitrum, view prices, buy/sell | | Check my positions | See your holdings across both chains | | Check my favorite markets | Open markets you saved | | Log out / switch wallet | Sign out and clear the saved session | | Back to welcome | Return to the welcome screen |

Markets

The markets list merges Base and Arbitrum in one view with a Chain column.

Open any market to see:

  • Leading outcome and probability
  • Buy prices per outcome
  • You hold column (when logged in)

From market detail you can Buy, Sell (if you hold shares), or Add to favorites.

Trading

  1. Open a market → Buy or Sell
  2. Pick an outcome and enter share count
  3. Review the quote and confirm
  4. Approve the transaction in Base Account (browser link if needed)

Trades run on the market’s chain. Base Account handles signing on both Base and Arbitrum.

You need collateral on the market’s chain (e.g. USDC on Arbitrum, MATE on Base).

Favorites

Add favorites from any market detail screen. They are stored on your machine at ~/.precog/favorites.json.


Command-line options

precog                  # arrow-key menus (default)
precog --typed          # type 1, 2, 3… and press Enter
precog -t               # shorthand for --typed
precog --help           # show all flags
precog --version        # show version

| Mode | Flag | How to choose | |------|------|----------------| | Arrows (default) | (none) or --arrows | ↑↓ and Enter | | Typed | --typed or -t | Type the option number and Enter |

Share counts and confirmations always use the keyboard.


Where data is stored

| File | Purpose | |------|---------| | ~/.precog/session.json | Logged-in wallet | | ~/.precog/base-mcp.json | Base Account OAuth tokens | | ~/.precog/favorites.json | Saved markets | | ~/.precog/config.json | Optional settings (see below) |


Optional configuration

The Precog API key is included with the CLI. To use your own key:

Environment variable:

export PRECOG_API_KEY=your-key-here   # macOS / Linux

Config file (~/.precog/config.json):

{
  "precogApiKey": "your-key-here"
}

Updating

npm update -g precog-cli

Support

Questions or issues? Join the Precog Discord:
https://discord.com/invite/frgXQfM3KZ


Development

For contributors working from source:

git clone <repo-url>
cd precog-cli
npm install
npm run build
npm link          # optional: global `precog` command
precog

Run tests:

npm run check

Publish (maintainers):

npm run check
npm publish