Skip to main content

Write documentation in comments and render it with templates.

Project description

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

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-1.0.2.tar.gz (59.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shellman-1.0.2-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file shellman-1.0.2.tar.gz.

File metadata

  • Download URL: shellman-1.0.2.tar.gz
  • Upload date:
  • Size: 59.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for shellman-1.0.2.tar.gz
Algorithm Hash digest
SHA256 48cba79d6415c0d013ad4dfd2205ed81b0e468795d1886dcda943ac78eaffd38
MD5 3037450373167c3129c1b1313e055019
BLAKE2b-256 284a0740b503abaccd7f6a81c17401abfc6a8d53627ec5ea2104dee4dd5e268e

See more details on using hashes here.

File details

Details for the file shellman-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: shellman-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for shellman-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f8c960fd2d3785e195f86fcd8f110a8d51a950e759d82c14a5af0bd71b918b3c
MD5 475d62f63233949cb501a57a10e4b9b6
BLAKE2b-256 0dbb2a3410f11a5ff50be0e98dff5de72d9c2a16982a64129a59fcc9b30c4447

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page