help2md

Convert command help string to Markdown.

Usage no npm install needed!

<script type="module">
  import help2md from 'https://cdn.skypack.dev/help2md';
</script>

README

help2md npm version

Convert command help string to Markdown.

Usage

# Show markdown equivalent of help text.
some-program --help | help2md

# Output a new readme, with newly generated help between
# `<!-- BEGIN USAGE -->` and `<!-- END USAGE -->` tags.
some-program --help | help2md-tags README.md

# Modify readme in place with new help between tags (like above).
some-program --help | help2md-in-place README.md

Examples

See the tests for example parsing.

You can also look gogs-migrate's package.json which is using help2md to update it's readme in place.