Skip to main content

Write doc in your shell scripts.

Project description


Write doc in your shell scripts.

Shellman is a Python package that read files, search for special comment lines (documentation) and output formatted documentation as text, markdown or man page.


Software licensed under MPL 2.0 license.


pip install [--user] shellman



To run all the tests: tox


To render the doc on stdout:

shellman FILE
# equivalent to...
shellman --format=text FILE
# other available formats:
shellman --format=man FILE
shellman --format=markdown FILE

You can pass the -o, --output option to specify a file to write to, instead of stdout.

To check if the documentation within a script is correct:

shellman --check --warn FILE         # CI test
shellman --check --failfast FILE     # quick CI test with no output
shellman --check --warn --nice FILE  # always passing test with output

In a script, for automatic help text:


## \brief Just a demo
## \desc This script actually does nothing.

main() {
  case "$1" in
    ## \option -h, --help
    ## Print this help and exit.
    -h|--help) shellman "$0"; exit 0 ;;

## \usage demo [-h]
main "$@"

Output when calling ./demo -h:

Usage: demo [-h]

This script actually does nothing.

  -h, --help
    Print this help and exit.


0.1.0 (2016-11-30)

  • Alpha release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shellman-0.2.1.tar.gz (26.0 kB view hashes)

Uploaded source

Built Distribution

shellman-0.2.1-py2.py3-none-any.whl (17.5 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page