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

@xystack/preview

v0.1.0

Published

A CLI tool to preview JSONL files with a beautiful web interface

Downloads

76

Readme

@xystack/preview

NPM version

A beautiful CLI tool to preview JSONL (JSON Lines) files in your browser with syntax highlighting and interactive exploration.

Features

  • 🚀 Zero Configuration - Built with Bun's fullstack bundler, no complex setup needed
  • 🎨 Beautiful UI - Modern dark theme with Tailwind CSS
  • 📝 Syntax Highlighting - Powered by Monaco Editor (VS Code's editor)
  • 🔍 Interactive Exploration - Click any line to view detailed JSON with folding support
  • Performance - Efficient pagination for large JSONL files
  • 🛠️ Error Handling - Invalid JSON lines are clearly marked
  • 🔥 Hot Module Reload - Development mode with instant updates

Installation

# Using Bun (recommended)
bun add -g @xystack/preview

# Using npm
npm install -g @xystack/preview

# Using pnpm
pnpm add -g @xystack/preview

Usage

Basic Usage

# Preview a JSONL file
preview data.jsonl

# Specify a custom port
preview data.jsonl --port 8080

# Short form
preview data.jsonl -p 8080

Development Mode

For development with hot module reload:

preview data.jsonl --dev

Examples

# Preview logs
preview ./logs/access.jsonl

# Preview API responses
preview ./data/api-responses.jsonl

# Preview with custom port
preview ./data/users.jsonl --port 3001

Development

Prerequisites

Setup

# Clone the repository
git clone https://github.com/xinyao27/preview.git
cd preview

# Install dependencies
bun install

# Run in development mode
bun run dev

# Build for production
bun run build

# Run tests
bun test

Project Structure

preview/
├── src/
│   ├── index.ts           # Server entry point & CLI
│   ├── parser.ts          # JSONL parser with streaming
│   ├── app.tsx            # Main React component
│   ├── frontend.tsx       # React entry point
│   ├── index.html         # HTML template
│   ├── index.css          # Global styles with design system
│   └── components/
│       ├── json-viewer.tsx  # Monaco editor modal
│       └── ui/            # shadcn/ui component library
│           ├── badge.tsx
│           ├── button.tsx
│           ├── card.tsx
│           └── ...        # 59 UI components
├── .claude/
│   └── skills/
│       └── brand-guidelines/  # Design system documentation
├── bunfig.toml            # Bun configuration
└── example.jsonl          # Sample JSONL file

Technology Stack

  • Runtime: Bun - Fast JavaScript runtime with native TypeScript support
  • Frontend: React - UI framework
  • Editor: modern-monaco - Monaco Editor (VS Code)
  • Styling: Tailwind CSS - Utility-first CSS framework
  • Bundler: Bun's built-in fullstack bundler with HMR

How It Works

  1. CLI: Parses command-line arguments and starts the server
  2. Backend: Bun serves both API endpoints and the frontend
  3. API: Provides metadata and paginated JSONL data
  4. Frontend: React app with Monaco Editor for JSON visualization
  5. Bundling: Bun automatically bundles the frontend with Tailwind CSS

Performance Considerations

  • Pagination: Only loads 50 lines at a time
  • Lazy Loading: More lines load automatically as you scroll
  • Efficient Parsing: Streams large files without loading entirely into memory
  • Monaco Editor: Provides code folding for deeply nested JSON

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License © 2025 xinyao27