Existing bash script documentation tools are lackluster, so I created a documentation generation tool that allows you to document bash scripts with typing, type links in markdown.
Multi-line comments are detected as JSDoc comment blocks:
: '
@typedef myScript
@...
:
are interpreted in an identical fashion as JSDoc comments blocks:
/**
* @typdef myScript
* @...
*/
Example bash script:
#!/bin/sh
: '
@typedef "deploy.sh"
@param {string} semver Semantic Version of Docker image, ex. 1.0.0-rc2
@param {number} timeout Timeout period between retries
:
buildImage (){ }
# sh2md deploy.sh > api.md
Kind: global typedef
Param | Type | Description |
---|---|---|
semver | string |
Semantic Version of Docker image, ex. 1.0.0-rc2 |
timeout | number |
Timeout period between retries |
dmd
jsdoc
jsdoc-api
jsdoc-parse