Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
@oclif/plugin-help
Advanced tools
The @oclif/plugin-help package is designed to provide a help system for CLI (Command Line Interface) applications built with the oclif (Open CLI Framework). It allows developers to automatically generate and customize help output for their CLI commands.
Automatic help generation
This feature automatically generates help text for a specific command within an oclif CLI application. The help text includes the command's description, usage, arguments, flags, and examples.
const { Command, flags } = require('@oclif/command');
const Help = require('@oclif/plugin-help').default;
class MyCommand extends Command {
async run() {
// your command logic here
}
}
MyCommand.description = 'Description of my command';
const help = new Help(this.config);
help.showHelp(['mycommand']);
Custom help classes
Developers can extend the default Help class to create custom help output. This allows for greater control over the formatting and content of the help text displayed to the user.
const { Command } = require('@oclif/command');
const { Help } = require('@oclif/plugin-help');
class MyHelpClass extends Help {
// override methods to customize help output
}
class MyCommand extends Command {
static helpClass = MyHelpClass;
async run() {
// your command logic here
}
}
Yargs is a powerful npm package that helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. It provides features similar to @oclif/plugin-help, such as automatic help generation and command-specific help, but it is a more general-purpose CLI framework.
Commander is another npm package for node.js designed to make it easy to write full-featured command line applications. It also automatically generates help information for commands. Commander is less opinionated than oclif and does not enforce a specific project structure.
Caporal is a full-featured framework for building command line applications (CLI) with Node.js, which includes a powerful help system. It provides a similar level of abstraction as oclif and includes automatic help generation, but with a different API design and feature set.
A CLI command to invoke the standard help functionality from oclif/core.
oclif help [COMMAND]
Display help for oclif.
USAGE
$ oclif help [COMMAND...] [-n]
ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for oclif.
See code: src/commands/help.ts
FAQs
Standard help for oclif.
We found that @oclif/plugin-help demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.