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

@sylphx/leaf-cli

v1.0.0

Published

πŸš€ Command-line interface for Leaf documentation framework

Readme

@sylphx/leaf-cli

πŸš€ Command-line interface for Leaf documentation framework

Zero-config documentation tool that includes everything you need to build beautiful docs.

Quick Start

# 1. Install
npm install -D @sylphx/leaf-cli

# 2. Create a doc
mkdir docs
echo '# Hello World' > docs/index.md

# 3. Start dev server
npx leaf dev

Open http://localhost:5173 πŸŽ‰

Installation

Choose your preferred package manager:

# npm
npm install -D @sylphx/leaf-cli

# bun
bun add -D @sylphx/leaf-cli

# pnpm
pnpm add -D @sylphx/leaf-cli

# yarn
yarn add -D @sylphx/leaf-cli

What's included:

  • @sylphx/leaf - Core framework
  • @sylphx/leaf-theme-default - Default theme
  • All CLI commands

Commands

Development Server

Start dev server with hot reload:

npx leaf dev [options]

Options:
  --port <port>    Specify port (default: 5173)
  --host <host>    Specify host (default: localhost)
  --open           Open browser automatically

Build for Production

Generate static HTML files:

npx leaf build [options]

Options:
  --outDir <dir>   Output directory (default: dist)

Preview Production Build

Test your production build locally:

npx leaf preview [options]

Options:
  --port <port>    Specify port (default: 4173)

Configuration (Optional)

Create leaf.config.ts in your project root:

import { defineConfig } from '@sylphx/leaf';

export default defineConfig({
  title: 'My Documentation',
  description: 'My awesome docs',
  theme: {
    nav: [
      { text: 'Guide', link: '/guide' },
      { text: 'API', link: '/api' }
    ],
    sidebar: [
      { text: 'Introduction', link: '/' },
      { text: 'Getting Started', link: '/getting-started' }
    ]
  }
});

Leaf works with zero configuration - config is completely optional!

Project Structure

my-docs/
β”œβ”€β”€ docs/              # Your markdown files
β”‚   β”œβ”€β”€ index.md
β”‚   β”œβ”€β”€ guide/
β”‚   └── api/
β”œβ”€β”€ leaf.config.ts     # Optional configuration
└── package.json

Features

  • ⚑ Fast Development - Hot reload with Vite
  • πŸ“¦ Zero Config - Works out of the box
  • 🎨 Beautiful Theme - Responsive design with dark mode
  • πŸ” Local Search - Built-in fuzzy search (Cmd/Ctrl+K)
  • πŸ“ Full Markdown - GFM, code highlighting, math, diagrams
  • πŸ“± Mobile Friendly - Responsive design
  • πŸŒ™ Dark Mode - System preference detection

Usage with Different Package Managers

npm

npx leaf dev
npx leaf build
npx leaf preview

bun

bunx leaf dev
bunx leaf build
bunx leaf preview

pnpm

pnpm leaf dev
pnpm leaf build
pnpm leaf preview

yarn

yarn leaf dev
yarn leaf build
yarn leaf preview

Troubleshooting

Command not found

Make sure you installed the CLI:

npm install -D @sylphx/leaf-cli

Then use npx to run:

npx leaf dev

Port already in use

Specify a different port:

npx leaf dev --port 3000

Module not found

Clear cache and reinstall:

rm -rf node_modules
npm install

Documentation

License

MIT Β© Sylphx