Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@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 0 weekly downloads. As such, @oclif/help popularity was classified as not 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.