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

deepbook

v0.3.0

Published

Terminal trading interface for DeepBook on Sui

Readme

DeepBook TUI

A terminal trading interface for DeepBook — Sui's native central limit order book protocol. View live market data, place spot and margin orders, and manage positions entirely from the terminal.

Mainnet only.

Features

  • Live orderbook depth with braille-rendered bar charts
  • OHLCV price charts with multiple timeframes
  • Spot and margin trading (up to 4x leverage)
  • Open positions tracking with one-key close
  • Wallet balance management and SUI/token transfers
  • Full keyboard navigation — no mouse needed

Requirements

  • Node.js 20+
  • Python 3.11+
  • A Sui wallet (Ed25519 keypair)

Install

npm install -g deepbook

Or run without installing globally:

npx deepbook

Run

deepbook

On first launch, the CLI:

  • checks for Python 3.11+
  • creates a virtualenv at ~/.deepbook/venv
  • installs Python dependencies from the packaged requirements.txt
  • launches the TUI

On macOS, deepbook opens the app in a new Terminal/iTerm window by default. Use inline mode to stay in the current terminal:

deepbook --inline

The app will prompt you to import or create a wallet on first launch. The private key is stored in macOS Keychain, and public account metadata is stored at ~/.deepbook/account.json.

If Python dependency installation fails, you may need system build tools for pynacl:

# macOS
xcode-select --install

# Ubuntu
sudo apt install python3-dev libsodium-dev

Development

# Install TS sidecar deps once on a fresh clone
cd ts && npm ci && cd ..

# Auto-reload on file changes (recommended)
watchfiles "python3 app/main.py" app/

# Or use the dev script to open in a sized terminal
bash dev.sh            # Terminal.app
bash dev.sh --iterm    # iTerm2

Validate syntax:

python3 -m py_compile $(rg --files app -g '*.py')

Architecture

app/
├── main.py           # Textual app shell + TS sidecar orchestration
├── ui/               # Trade/account panels, focus helpers, overlays, onboarding
├── state/            # Account storage, executor bridge, state readers/writers
└── shared/           # Config, logging, biometrics, keychain, JSON helpers

ts/
├── src/startup.ts        # One-time startup sync (pools, pyth, wallet coins)
├── src/poller-main.ts    # Long-lived poller entrypoint
├── src/poller.ts         # On-chain/indexer/Pyth reads -> state files
├── src/executor-main.ts  # One-shot execution entrypoint
└── src/executor*.ts      # PTB construction, execution, manager updates

Data flows through three layers:

  1. Startup + Poll (ts/src/startup.ts, ts/src/poller.ts) — fetches from indexer + Sui RPC + Pyth, writes normalized JSON to ~/.deepbook/state/
  2. UI (ui/) — reads from disk on a 1-second interval, renders to terminal
  3. Execute (app/state/executor.py + ts/src/executor*.ts) — authenticates, builds PTBs, submits transactions, updates local state

Keyboard shortcuts

| Key | Action | |-----|--------| | 1 | Trade view | | 2 | Account view | | m | Markets sidebar | | l | Latency overlay | | r | Refresh | | q | Quit | | Arrow keys | Navigate between panels | | Enter | Confirm / submit | | Esc | Close overlay |

License

MIT