Skip to main content

Shell Script Documentation

Write documentation in comments and render it with templates.

ci documentation pypi gitpod gitter

shellman can generate man pages, wiki pages and help text using documentation written in shell scripts comments.

For example:

#!/bin/bash

## \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 ;;
  esac
}

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

Output when calling ./demo -h:

Usage: demo [-h]

This script actually does nothing.

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

You can see more examples in the documentation: https://pawamoy.github.io/shellman/.

Demo

In the demo above we saw the three builtin templates: helptext, manpage and wikipage.

You can use your own templates by specifying them with the --template path:my/template syntax.

You can also write a plugin, see the docs: https://pawamoy.github.io/shellman/plugins.

Installation

pip install shellman

With uv:

uv tool install shellman

Some projects using shellman

  • shellm — A collection of scripts and libraries built on a core inclusion-system, all installable with basher. Here are a few examples:
    • daemon — A library that facilitates the writing of daemonized scripts that consume files in a watched directory.
    • debug — A simple script that sets the verbose/dry-run/debug Bash flags before running another script.
    • format — Format your output with style and color.
    • home — A home for your shell scripts!
    • loop — Control the flow of your loops (pause/resume/etc.).

Metadata

Release files for shellman 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shellman 1.0.2
File Size Uploaded
shellman-1.0.2.tar.gz 59.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shellman 1.0.2
File Interpreter ABI Platform
shellman-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 89.5 kB

Release files / shellman-1.0.2.tar.gz

Download URL shellman-1.0.2.tar.gz
Size 59.2 kB
Tags Source
SHA-256 checksum
How to use checksums
48cba79d6415c0d013ad4dfd2205ed81b0e468795d1886dcda943ac78eaffd38
BLAKE2b-256 checksum
How to use checksums
284a0740b503abaccd7f6a81c17401abfc6a8d53627ec5ea2104dee4dd5e268e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / shellman-1.0.2-py3-none-any.whl

Download URL shellman-1.0.2-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8c960fd2d3785e195f86fcd8f110a8d51a950e759d82c14a5af0bd71b918b3c
BLAKE2b-256 checksum
How to use checksums
0dbb2a3410f11a5ff50be0e98dff5de72d9c2a16982a64129a59fcc9b30c4447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

3 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page