Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@oclif/help
Advanced tools
@oclif/help is a package designed to generate help documentation for CLI applications built with the Oclif framework. It provides a structured way to display command usage, options, and examples, making it easier for users to understand how to use the CLI tool.
Generate Command Help
This feature allows you to generate help documentation for a specific command. The code sample demonstrates how to create a CommandHelp instance and generate the help text for a command with flags.
const { CommandHelp } = require('@oclif/help');
const command = { id: 'mycommand', description: 'This is my command', usage: 'mycommand [options]', flags: { flag1: { description: 'First flag' }, flag2: { description: 'Second flag' } } };
const help = new CommandHelp(command);
console.log(help.generate());
Generate CLI Help
This feature allows you to generate help documentation for the entire CLI application. The code sample shows how to create a Help instance with a configuration object containing multiple commands and generate the help text for the CLI.
const { Help } = require('@oclif/help');
const config = { commands: [{ id: 'mycommand', description: 'This is my command' }, { id: 'anothercommand', description: 'This is another command' }] };
const help = new Help(config);
console.log(help.generate());
Commander is a popular package for building CLI applications in Node.js. It provides built-in support for generating help documentation, but it is more focused on command parsing and execution. Compared to @oclif/help, Commander offers a more integrated approach to building and documenting CLI tools.
Yargs is another widely-used package for building CLI applications. It offers extensive features for argument parsing and command handling, along with built-in help generation. Yargs is more feature-rich in terms of argument parsing compared to @oclif/help, but it may require more configuration to achieve similar help documentation.
Meow is a minimalistic package for building CLI applications. It provides a simple way to parse arguments and generate help text. Meow is less feature-rich compared to @oclif/help, but it is easier to set up and use for smaller CLI tools.
This library has been replaced by @oclif/core and is now in maintenance mode. We will only consider PRs that address security concerns.
standard help for oclif
FAQs
standard help for oclif
The npm package @oclif/help receives a total of 416,236 weekly downloads. As such, @oclif/help popularity was classified as popular.
We found that @oclif/help demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.