Installations
npm install cli-meow-help
Developer Guide
Typescript
Yes
Module System
ESM
Node Version
20.16.0
NPM Version
10.2.0
Score
68.5
Supply Chain
97.7
Quality
77.5
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
184,616
Last Day
25
Last Week
500
Last Month
5,879
Last Year
51,591
GitHub Statistics
36 Stars
33 Commits
3 Forks
3 Watching
2 Branches
1 Contributors
Bundle Size
30.77 kB
Minified
10.19 kB
Minified + Gzipped
Package Meta Information
Latest Version
4.0.0
Package Id
cli-meow-help@4.0.0
Unpacked Size
31.73 kB
Size
8.32 kB
File Count
9
NPM Version
10.2.0
Node Version
20.16.0
Publised On
13 Aug 2024
Total Downloads
Cumulative downloads
Total Downloads
184,616
Last day
-79.7%
25
Compared to previous day
Last week
-36.6%
500
Compared to previous week
Last month
49.9%
5,879
Compared to previous month
Last year
-38%
51,591
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Dev Dependencies
4
cli-meow-help
Generate automatically formatted help text for
meow
CLI helper
Install
1npm install meow cli-meow-help
Usage
1const meow = require('meow'); 2const meowHelp = require('cli-meow-help'); 3 4const commands = { 5 new: {desc: `Creates a new user account`}, 6 duplicate: {desc: `Duplicates a user account`} 7}; 8 9const flags = { 10 random: { 11 desc: `Prints random data`, 12 type: 'boolean', 13 default: true 14 } 15}; 16 17const helpText = meowHelp({ 18 name: `cli-command`, 19 flags, 20 commands 21}); 22 23meow(helpText, {flags}); 24 25// Now run `cli-command --help` to view the 26// following auto formatted & generated help info.
API
meowHelp(options)
❯ options
Type: object
Default: ↓
1{ 2 name = `(CLI name undefined)`, 3 desc, 4 commands = {}, 5 flags = {}, 6 examples = [], 7 defaults = true, 8 header, 9 footer 10}
You can specify the options below.
❯ name
Type: string
Default: (CLI name undefined)
The bin
command name of the cli that's used to run the CLI. Examples: corona
for the corona-cli that's installed globally or npx corona-cli
for if npx
is the recommended usage.
❯ desc
Type: string
Default: undefined
(optional)
Optionally define a description text for the help message.
❯ commands
Type: string
Default: {}
(optional)
Optionally, define a JavaScript object containing info on the CLI commands (i.e. meow
inputs). Each command has a desc
property to define the help text.
❯ flags
Type: string
Default: {}
Define CLI options (i.e. meow
flags) just like you do with meow
which is the flags
JavaScript object containing each flag with an extra desc
property to define the help text.
> examples
Type: Array
Default: []
List optional examples of how to use the CLI.
Check the test file for more context. Format example:
1const examples = [ 2 3 { 4 command: `new`, 5 flags: [`random`] 6 } 7];
❯ defaults
Type: string
Default: true
(optional)
Prints out the default values of flags. Set to false
to disable.
❯ header
Type: string
Default: undefined
(optional)
Optionally, add additional header information.
❯ footer
Type: string
Default: undefined
(optional)
Optionally, add additional footer information.
Changelog
KEY: 📦 NEW
, 👌 IMPROVE
, 🐛 FIX
, 📖 DOC
, 🚀 RELEASE
, and 🤖 TEST
I use Emoji-log, you should try it and simplify your git commits.
License & Conduct
- MIT © Ahmad Awais
- Thanks to Maarten Brakkee for initial implementation
- Code of Conduct
Connect
(follow) To stay up to date on free & open-source software
(follow) To get #OneDevMinute daily hot tips & trolls
(subscribe) To tech talks & #OneDevMinute videos
Sponsor
Me (Ahmad Awais) and my incredible wife (Maedah Batool) are two engineers who fell in love with open source and then with each other. You can read more about me here. If you or your company use any of my projects or like what I’m doing then consider backing me. I'm in this for the long run. An open-source developer advocate.
NodeCLI.com — Learn to build Node.js CLI Automation
This repository is part of the NodeCLI.com course.
After building hundreds of developer automation tools used by millions of developers, I am sharing exactly how you can do it yourself with minimum effective effort. Learn to build Node.js & JavaScript based CLI (Command Line Interface) apps. Automate the grunt work, do more in less time, impress your manager, and help the community. → I'm sharing it all in this online video course. Node CLI Automation without wasting a 1,000 hours →
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/29 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Score
3
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More