Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oclif/plugin-commands

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oclif/plugin-commands

plugin to show the list of all the commands

  • 4.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
223K
increased by5.88%
Maintainers
2
Weekly downloads
 
Created

What is @oclif/plugin-commands?

@oclif/plugin-commands is a plugin for the Oclif CLI framework that provides functionality to list and manage commands within an Oclif-based CLI application. It helps developers to easily display available commands, their descriptions, and usage information.

What are @oclif/plugin-commands's main functionalities?

List Commands

This feature allows you to list all available commands in your CLI application. The code sample demonstrates how to use the @oclif/plugin-commands to display a table of commands with their names and descriptions.

const {Command} = require('@oclif/command');
const {cli} = require('cli-ux');

class ListCommands extends Command {
  async run() {
    const commands = this.config.commands;
    cli.table(commands, {
      name: {
        header: 'Command Name'
      },
      description: {
        header: 'Description'
      }
    });
  }
}

ListCommands.description = 'List all available commands';
module.exports = ListCommands;

Command Help

This feature provides detailed help for a specific command. The code sample shows how to use the @oclif/plugin-commands to display help information for a command named 'mycommand'.

const {Command} = require('@oclif/command');
const {Help} = require('@oclif/plugin-help');

class CommandHelp extends Command {
  async run() {
    const help = new Help(this.config);
    help.showHelp(['mycommand']);
  }
}

CommandHelp.description = 'Show help for a specific command';
module.exports = CommandHelp;

Other packages similar to @oclif/plugin-commands

Keywords

FAQs

Package last updated on 23 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc