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

@abbacchio/tui

v0.1.2

Published

Terminal user interface for Abbacchio real-time log viewer

Downloads

41

Readme

@abbacchio/tui

Terminal user interface for the Abbacchio real-time log viewer. Connects to Centrifugo via WebSocket (same as Dashboard) and displays logs in the terminal with colors, filtering, and keyboard navigation.

Installation

# From the monorepo root
pnpm install

Building

# Build only the TUI package
pnpm build:tui

# Or from packages/tui
cd packages/tui
pnpm build

Usage

Development (with hot reload)

# From monorepo root
pnpm tui -c <channel>

# Or directly
cd packages/tui
pnpm dev -- -c <channel>

# Using npx
npx tsx src/cli.ts -c <channel>

Production (after build)

cd packages/tui
node dist/cli.js -c <channel>

CLI Options

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --channel | -c | Channel name (required) | - | | --api-url | -u | API server URL | http://localhost:4000 | | --key | -k | Decryption key for encrypted logs | - | | --level | -l | Minimum log level filter | - |

Examples

# Basic usage
pnpm tui -c my-app

# With custom API URL
pnpm tui -c production -u https://logs.example.com

# With encryption key (will be saved for future sessions)
pnpm tui -c secure-channel -k mySecretKey123

# Filter by level (only show warn and above)
pnpm tui -c my-app -l warn

Channel & Key Management

The TUI stores channel configurations and encryption keys in a local JSON file at ~/.abbacchio/tui-config.json. This allows you to:

  • Remember encryption keys: Once you provide a key via CLI (-k), it's saved and automatically used next time
  • Switch channels: Press C to open the channel selector
  • Update keys: When switching channels, you can view/edit the stored key

How it works

  1. First time connecting to an encrypted channel:

    pnpm tui -c my-channel -k mySecretKey123

    The key is saved to the database.

  2. Subsequent connections:

    pnpm tui -c my-channel

    The stored key is automatically loaded.

  3. To change a key, press C to open the channel selector, select the channel, and enter the new key.

Config File Location

  • Linux/macOS: ~/.abbacchio/tui-config.json
  • Windows: C:\Users\<username>\.abbacchio\tui-config.json

Keyboard Shortcuts

| Key | Action | |-----|--------| | q | Quit | | p / Space | Pause/Resume log stream | | j / | Scroll down | | k / | Scroll up | | g | Go to top | | G | Go to bottom | | / | Search logs | | 1 | Filter: trace+ | | 2 | Filter: debug+ | | 3 | Filter: info+ | | 4 | Filter: warn+ | | 5 | Filter: error+ | | 6 | Filter: fatal only | | 0 | Show all levels | | c | Clear logs | | C | Open channel selector | | ? | Show help | | Esc | Clear filters / Go back |

Architecture

src/
├── cli.ts                # CLI entry point (meow)
├── index.tsx             # Ink render entry
├── App.tsx               # Main component
├── components/
│   ├── Header.tsx        # Channel, status, log count
│   ├── LogList.tsx       # Scrollable log list
│   ├── LogRow.tsx        # Individual log with colors
│   ├── FilterBar.tsx     # Level filter, search
│   ├── StatusBar.tsx     # Keyboard shortcuts
│   ├── HelpOverlay.tsx   # Full help screen
│   └── ChannelSelector.tsx # Channel/key management UI
├── hooks/
│   ├── useCentrifugo.ts  # Centrifugo WebSocket connection
│   ├── useLogStore.ts    # Log state and filtering
│   ├── useKeyBindings.ts # Keyboard input
│   └── useChannelConfig.ts # Channel config persistence
├── lib/
│   ├── colors.ts         # Level colors (chalk)
│   ├── crypto.ts         # AES-256-GCM decryption
│   └── storage.ts        # JSON file storage for config
└── types/
    └── index.ts          # TypeScript types

Dependencies

  • ink - React for CLI
  • react - UI framework
  • meow - CLI argument parsing
  • centrifuge - Centrifugo client for WebSocket
  • ws - WebSocket implementation for Node.js
  • chalk - Terminal colors
  • ink-text-input - Text input component
  • ink-select-input - Select/dropdown component

Connection Flow

1. TUI fetches token from API: GET /api/centrifugo/token
2. TUI connects directly to Centrifugo: ws://localhost:8000/connection/websocket
3. TUI subscribes to channel: logs:{channelName}
4. Logs are received in real-time via WebSocket

This is the same connection flow used by the Dashboard and Tauri app.

Data Storage

The TUI uses a JSON file for local persistence at ~/.abbacchio/tui-config.json:

{
  "channels": [
    {
      "name": "my-channel",
      "secretKey": "encryption-key-here",
      "createdAt": 1705123456789,
      "lastUsedAt": 1705123456789
    }
  ]
}

Each channel entry stores:

  • name: Channel name (unique identifier)
  • secretKey: Encryption key for decrypting logs
  • createdAt: Unix timestamp when channel was first added
  • lastUsedAt: Unix timestamp of last access (used for sorting)