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

@gutenye/commander-completion-carapace

v1.0.7

Published

Effortlessly add intelligent autocomplete support to your Commander.js CLI app using Carapace. Supports Bash, Zsh, Fish, Nushell and more

Downloads

617

Readme

⌘ Commander Completion Carapace ⌘

Stars NPM Version License PRs Welcome

Effortlessly add intelligent autocomplete support to your Commander.js CLI app using Carapace. It works with a wide range of shells, making your CLI tools more intuitive and user-friendly.

Show your ❤️ and support by starring this project and following the author, Guten Ye!

screenrecording

🌟 Features

  • Multiple Shells Support: Works with Bash, Zsh, Fish, Nushell, and more.
  • 🚄 Blazing Fast Completion: Experience instantaneous completion with no delays.
  • 🔗 Carapace Integration: Unlock all the powerful features of Carapace, including advanced shell completions.
  • 🧑‍💻 Effortless Integration: Easily add completion support to your Commander.js based CLI app.

🚀 Getting Started

1️⃣ Install

First, make sure Carapace is installed, as it powers the completion functionality:

bun add @gutenye/commander-completion-carapace commander

2️⃣ Write Completion Code

Now, integrate completion support into your Commander.js application by adding the following code:

import { program, Option } from '@gutenye/commander-completion-carapace'

program
  .name('hello')
  .enableCompletion()

program.command('cmd1 [...files]')
  .description('Description')
  .option('--option1', 'Description')
  .addOption(new Option('--option2 <size>', 'Description').choices(['small', 'medium']))
  .completion({   // pass to carapace 
    positonalany: ['$files'] // dynamic completion
  })
  .action(() => {})

await program.installCompletion() // Creates hello.yaml Carapace spec file

program.parse()

3️⃣ Use the Completion

hello      # Will create the Carapace spec file the first time it runs
hello<Tab> # Press Tab to see completions for commands and options

🤝 Contribute

We welcome contributions! Whether it’s bug reports, feature suggestions, or pull requests, your involvement makes this project better.

How to Contribute:

  1. Fork the Repository
  2. Open a Pull Request on Github

Thank you for using Commander Completion Carapace! ✨ If you found it helpful, please ⭐️ star the project ️️⭐ on GitHub. If you encounter any issues, feel free to report an issue on Github.

Special thanks to all the contributors:

⬆ Back to top ⬆