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

@h3ravel/musket

v0.4.0

Published

Musket CLI is a framework-agnostic CLI framework designed to allow you build artisan-like CLI apps and for use in the H3ravel framework.

Readme

Framework Musket Version Downloads Tests License

About Musket CLI

Musket CLI is a framework-agnostic CLI framework designed to allow you build artisan-like CLI apps and for use in the H3ravel framework.

Installation

To use Musket CLI, you may install it by running:


npm install @h3ravel/musket
# or
pnpm add @h3ravel/musket
# or
yarn add @h3ravel/musket

Quick Setup

The base requirement fo setting up Musket CLI is an application class that it can bind itself to:

class Application {}

Once bound, Musket CLI will bind itself to the application class as musket and can be accessed as:

const app = new Application();

// Initialize Musket CLI here

console.log(app.musket);

Initialization

To initialize Musket CLI you can follow the example below:

import { Kernel } from 'h3ravel/musket';

const app = new Application();

Kernel.init(app);

The init method returs and instance of commanderjs's Command class allowing to further extend and customize your app if there is a need for that.

Passing Configuration

Musket allows passing a config object that alters it's behavior and provide some level of customizations

Kernel.init(app, {
  packages: ['@h3ravel/shared', '@h3ravel/support'],
  cliName: 'musket-cli',
  discoveryPaths: [path.join(process.cwd(), 'tests/Commands/*.ts')],
});

Creating Commands

Commands in Musket extend the base Command class and define a signature and handle() method.

Example:

import { Command } from '@h3ravel/musket';

export default class GreetCommand extends Command {
  protected signature = 'greet {name}';
  protected description = 'Display a personalized greeting.';

  async handle() {
    const name = this.argument('name');

    this.info(`Hello, ${name}!`);
  }
}

If your project uses discovery paths (via discoveryPaths), this command will be automatically registered.

Otherwise, you can manually register it in your application:

class Application {
  registeredCommands = [GreetCommand];
}

await Kernel.init(app);

// OR

await Kernel.init(app, {
  baseCommands: [GreetCommand, BuildCommand],
});

Running Commands

Once your CLI is compiled or built, you can run commands via:

node dist/cli.js greet Legacy

Output:

Hello, Legacy!

Documentation

The full musket documentation is available Here

Contributing

Thank you for considering contributing to the H3ravel framework! The Contribution Guide can be found in the H3ravel documentation and will provide you with all the information you need to get started.

Code of Conduct

In order to ensure that the H3ravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within H3ravel, please send an e-mail to Legacy via [email protected]. All security vulnerabilities will be promptly addressed.

License

The H3ravel framework is open-sourced software licensed under the MIT license.