https://github.com/crowdstrike/yargs-help-output
Update docs to include the full output of yargs help
https://github.com/crowdstrike/yargs-help-output
Last synced: 9 months ago
JSON representation
Update docs to include the full output of yargs help
- Host: GitHub
- URL: https://github.com/crowdstrike/yargs-help-output
- Owner: CrowdStrike
- License: mit
- Created: 2021-02-17T14:48:33.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-09-16T16:42:46.000Z (10 months ago)
- Last Synced: 2025-09-18T07:37:38.622Z (10 months ago)
- Language: JavaScript
- Size: 297 KB
- Stars: 2
- Watchers: 3
- Forks: 4
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# yargs-help-output
[](https://badge.fury.io/js/yargs-help-output)
Update docs to include the full output of yargs help
## CLI API
```
yargs-help-output
Update docs to include the full output of yargs help
Positionals:
input-file-path The file to be updated [string]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--bin-path The yargs entry file if you're running it directly
[string]
--npm-script-name The NPM script that runs your yargs CLI [string]
--replacement-sigil The metadata divider used to find the replacement
[string] [default: ""]
--help-text-modify String/regex replacements to modify the help text (ex
--help-text-modify.search "^foo$"
--help-text-modify.replacement "") [array] [default: []]
```
## JS API
```js
let outputString = await updateHelpTextByString({
// required
inputString,
// optional
replacementSigil = '',
// optional
helpTextModifyReplacements: [
[/^Options:$\r?\n/m, ''],
],
// and/or
helpTextModifyCallback(helpText) {
return helpText.replace(/^Options:$\r?\n/m, '');
},
binPath: './my-cli.js',
// or
npmScriptName: 'start',
// optional
cwd,
});
await updateHelpTextByFile({
// required
inputFilePath,
// optional
replacementSigil = '',
// optional
helpTextModifyReplacements: [
[/^Options:$\r?\n/m, ''],
],
// and/or
helpTextModifyCallback(helpText) {
return helpText.replace(/^Options:$\r?\n/m, '');
},
binPath: './my-cli.js',
// or
npmScriptName: 'start',
// optional
cwd,
});
```