https://github.com/tj/mad
mad(1) is a markdown manual page viewer
https://github.com/tj/mad
Last synced: 4 months ago
JSON representation
mad(1) is a markdown manual page viewer
- Host: GitHub
- URL: https://github.com/tj/mad
- Owner: tj
- Created: 2012-04-14T19:43:14.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2017-09-18T10:28:50.000Z (over 8 years ago)
- Last Synced: 2025-09-02T06:32:43.185Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 41 KB
- Stars: 248
- Watchers: 7
- Forks: 24
- Open Issues: 9
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# mad(1)
`mad(1)` is a markdown driven manual page viewer,
this makes manuals easier to _write_, _reuse_, and
_read_.
For a newer / actively maintained thing check out [tldr](https://github.com/tldr-pages/tldr).

## Usage
Usage: mad
Options:
-U, --update-self update mad(1) itself
-u, --update update remote mad-pages
-v, --version output cpm version
-h, --help output this help information
-l, --list list mad-pages
## Installation
Install `mad(1)` and its associated mad page.
$ make install
Uninstall both `mad(1)` and the associated mad page.
$ make uninstall
Via npm:
$ npm install -g mad
## About
I _love_ man pages, however they are annoying to write by hand,
and often converted from markdown anyway. `mad(1)` is effectively
the same idea, but write your manuals in markdown like you would anyway,
re-use them in your github readmes, wikis, or use markdown to HTML conversion
tools.
`mad(1)` pipes to `less(1)` so you get the same paging / searching
goodness that you expect from `man(1)`.
## Page repository
[mad-pages](https://github.com/visionmedia/mad-pages) is a collection of
useful mad pages such as language operator precedence tables, http status
codes, mime type tables etc. Use `mad --update` to install/re-install them.
## Page lookup
Use the __MAD_PATH__ environment variable to control
where `mad(1)` will look for a manual page.
The ".md" extension may be omitted.
For example:
MAD_PATH="/usr/share/mad:share/mad"
The following paths will always be searched:
- .
- /usr/local/share/mad
- /usr/share/mad
## Configuration
By default `mad(1)` installs and sources `/usr/local/etc/mad.conf` for its formatting. You may edit this file directly, or if you're scared of overwriting it
when updating `mad(1)` you can copy this file to something like `~/mad.conf` and `export MAD_CONFIG=~/mad.conf`.
```
heading: 1m
code: 90m
strong: 1m
em: 4m
```
## Screenshots
Jade manual:
