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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sui-events-cli

v1.0.5

Published

CLI tool for monitoring Sui blockchain events

Readme

Sui Event Monitor CLI

A powerful command-line interface for monitoring Sui blockchain events with rich features and interactive controls.

Sui Event Monitor CLI

Features

  • Event Type Discovery: List all event types for any Sui package
  • Real-time Event Monitoring: Watch events as they occur on the Sui blockchain
  • Multi-subscription Support: Monitor multiple event types simultaneously
  • Interactive Controls: Filter and manage subscriptions without restarting
  • Rich Terminal UI: Color-coded output with spinner animations
  • Transaction Links: Direct links to SuiScan explorer for each event
  • Customizable Polling: Adjust the polling interval to your needs

Installation

# Install globally from npm (global installation is REQUIRED for CLI access)
npm install -g sui-events-cli

⚠️ IMPORTANT: The -g flag is required to make the sui-events command available globally. Without this flag, you won't be able to run the command from your terminal.

After installation, you can use the sui-events command from anywhere in your terminal.

Commands

Usage: sui-events [options] [command]

Options:
  -V, --version         output the version number
  -h, --help            display help for command

Commands:
  list <packageId>      List available event types for a package
  watch <packageId>     Watch for events of a specific type
  multi-watch <packageId>  Watch for multiple event types
  help [command]        display help for command

Usage

List Event Types

List all available event types for a specific package:

sui-events list <packageId> [options]

Options:

  • -r, --rpc <url> - Custom Sui RPC URL (default: https://sui-rpc.publicnode.com)

Example:

sui-events list 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb

Watch Events

Watch for events of a specific type:

sui-events watch <packageId> <eventType> [options]

You can specify the event type in two ways:

  1. Use the full event type, e.g., 0xpackage::module::EventName
  2. Use the index from the list command, e.g., 1 for the first event type

Options:

  • -r, --rpc <url> - Custom Sui RPC URL (default: https://sui-rpc.publicnode.com)
  • -i, --interval <seconds> - Polling interval in seconds (default: 5)

Examples:

# Using full event type
sui-events watch 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::pool::SwapEvent

# Using index from list command
sui-events watch 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb 1

# With custom polling interval (2 seconds)
sui-events watch 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb 1 -i 2

# With custom RPC endpoint
sui-events watch 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb 1 -r https://rpc.mysten.io

Monitor Multiple Event Types

Watch multiple event types at once with the multi-watch command:

sui-events multi-watch <packageId> [options]

Options:

  • -r, --rpc <url> - Custom Sui RPC URL (default: https://sui-rpc.publicnode.com)
  • -i, --interval <seconds> - Polling interval in seconds (default: 5)

This command will:

  1. List all available event types for the package
  2. Prompt you to select which event types to monitor (enter numbers comma-separated)
  3. Start monitoring all selected event types simultaneously

Example:

sui-events multi-watch 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb

Interactive Controls

While monitoring events, you can use these keyboard controls:

  • l - List all active subscriptions
  • f - Filter events by subscription ID
  • a - Show all events (clear filter)
  • q - Quit the application
  • Ctrl+C - Quit the application

Output Format

Event data is displayed in a structured format:

┌─────────────────────────────────────────────────────────┐
│ EVENT  2023-04-25 14:32:45                             │
├─────────────────────────────────────────────────────────┤
│ Type: 0xpackage::module::EventName                     │
│ Subscription: abc123                                   │
│ Tx ID: 5Gv4dC...8fZq                                   │
│ Explorer: https://suiscan.xyz/mainnet/tx/5Gv4dC...8fZq │
├─────────────────────────────────────────────────────────┤
│ Data:                                                  │
│ {                                                      │
│   "field1": "value1",                                  │
│   "field2": 123,                                       │
│   "nested": {                                          │
│     "subfield": "value"                                │
│   }                                                    │
│ }                                                      │
└─────────────────────────────────────────────────────────┘

Examples

Watch for Swap Events on a DEX

# First, find the event types
sui-events list 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb

# Then watch for swap events
sui-events watch 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::pool::SwapEvent

Monitor Multiple Events on a Marketplace

# Watch all events related to listings, sales, and bids
sui-events multi-watch 0x5f91554965f6da9c3f3f8de1a63b866f4778ebec548291c818027574da542355

# When prompted, enter the event numbers you want to watch:
# Enter event numbers to watch (comma separated, e.g., 1,3,5): 1,2,4

Common Use Cases

  • DEX Monitoring: Watch for swaps, liquidity additions/removals, and price changes
  • NFT Marketplace Activity: Track listings, sales, and bid events
  • Governance Participation: Monitor proposal and voting events
  • Game Events: Track in-game events like battles, item crafting, or marketplace activities

Troubleshooting

If you encounter any issues:

  1. No Events Appearing: Try increasing the polling interval with -i option
  2. Connection Issues: Check your internet connection or try a different RPC with -r option
  3. RPC Rate Limiting: If you see rate limit errors, try a different RPC endpoint
  4. Event Selection: When using multi-watch, make sure to enter valid event numbers separated by commas

License

MIT

Author

Hai Kukoten | Asmody