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.3

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.3
File Size Uploaded
shellman-1.0.3.tar.gz 61.5 kB Details

Built distribution (wheel)

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

Total release size: 100.1 kB

Release files / shellman-1.0.3.tar.gz

Download URL shellman-1.0.3.tar.gz
Size 61.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dbf5dc48c90df2eb18ab2fa5f1a097cfc7b560d5489d05178ace74d8e824cd35
BLAKE2b-256 checksum
How to use checksums
00d6c758ccc4d102d58a8eed695037b2137edfc5fdf41045a7815de30c65ab52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL shellman-1.0.3-py3-none-any.whl
Size 38.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9080ff918a6388e2784788bb30566e42704d8495c62febe4d7c2b3f96eee7ce
BLAKE2b-256 checksum
How to use checksums
160c1facde33aa1ff40182fbf8b221f1f85bd64ab16b4b251d74c479a228557e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

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