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

@bunli/plugin-completions

v0.3.5

Published

Shell completions plugin for Bunli CLI framework

Readme

@bunli/plugin-completions

Tab-powered shell completions for Bunli CLIs.

This plugin delegates script generation and the dynamic completion protocol (complete -- <args>) to @bomb.sh/tab, and builds Tab’s command tree from Bunli’s generated metadata (.bunli/commands.gen.ts).

Install

bun add @bunli/plugin-completions

Setup

import { defineConfig } from '@bunli/core'
import { completionsPlugin } from '@bunli/plugin-completions'

export default defineConfig({
  name: 'my-cli',
  plugins: [
    completionsPlugin({
      // generatedPath: '.bunli/commands.gen.ts',
      // commandName: 'my-cli',
      // executable: 'my-cli',
      // includeAliases: true,
      // includeGlobalFlags: true
    })
  ]
})

You must have .bunli/commands.gen.ts available (run bunli generate, or enable codegen in your build).

Commands

Generate a completion script

my-cli completions zsh
my-cli completions bash
my-cli completions fish
my-cli completions powershell

Dynamic completion protocol callback (used by the shell scripts)

my-cli complete -- <args...>

Do not build your own integrations on Bunli’s parsed positional args for this path: Tab relies on a trailing empty-string sentinel ('') to detect “ends with space”, and Bunli’s parser drops empty strings. The implementation uses runtime.args directly.

Shell Setup Examples

Bash

source <(my-cli completions bash)

Zsh

source <(my-cli completions zsh)

Fish

my-cli completions fish > ~/.config/fish/completions/my-cli.fish

PowerShell

my-cli completions powershell | Out-String | Invoke-Expression

Notes

Runtime packaging

@bunli/plugin-completions publishes a bundled runtime (dist/index.js) that already includes Tab. Downstream consumers only install @bunli/plugin-completions and do not need a separate runtime dependency on @bomb.sh/tab.

@bomb.sh/tab types note

As of @bomb.sh/[email protected], the published package references dist/t.d.ts but ships only dist/t-<hash>.d.ts. Bunli’s monorepo uses bun patch during development/CI to keep TypeScript builds unblocked until upstream fixes packaging.