parse-help is a JavaScript utility for programmatically parsing the help output of command-line interfaces, extracting structured information about their flags, options, and aliases. It provides a structured object representation of CLI options, making it easier to analyze or process them within other tools. The current stable version is 2.0.0. The package is maintained by Sindre Sorhus, known for a high volume of small, focused utility packages, typically implying a stable but not necessarily rapid release cadence unless new features or breaking changes warrant it. A key differentiator is its focus specifically on parsing *help output* rather than building a CLI from scratch or parsing `argv` directly, making it useful for introspection or documentation generation from existing CLIs.
npm install parse-helpVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use `parseHelp` to process a sample CLI help string and output the structured flags and aliases.
Ensure your project is configured for ESM. If using Node.js, add `"type": "module"` to your `package.json` or use `.mjs` file extensions. Update `require('parse-help')` to `import parseHelp from 'parse-help';`.Upgrade your Node.js environment to version 12 or higher. To maintain compatibility with older Node.js versions, you must stick to parse-help v1.x.
Provide well-formatted help text that resembles common CLI help output. Test `parseHelp` with various actual outputs from your target CLIs to ensure correct parsing.
Change your import statement from `const parseHelp = require('parse-help');` to `import parseHelp from 'parse-help';` and ensure your project is configured for ESM (e.g., `"type": "module"` in `package.json`).Ensure the file where you are using the import statement is treated as an ES module. This typically means adding `"type": "module"` to your `package.json` or changing the file extension to `.mjs`.
No dependency data recorded yet.