Man Page API
Get your desired man page with a simple HTTP request.
Example: VIM(1), MAN(1), HOSTS(5), NGINX(8)
plain text:
https://man-api.ch/v1/buster/${section}/${page}
original man page:
https://man-api.ch/v1/buster/${section}/${page}.gz
Contains the original gzip compressed man page, normally written in groff. Can be opened with man <file>, decompression is not necessary.
Add the appropriate alias to your ~/.zshrc or ~/.bashrc configuration. This way you always have the right man page with you even if you don't have the corresponding software installed. This works with less as pager or you can even use man for it.
with less:
man () { section="$(test -z $2 && echo 0 || echo $1)" page="${2:-$1}" ; curl -s "https://man-api.ch/v1/buster/${section}/${page}" | less; }
with man:
man () { section="$(test -z $2 && echo 0 || echo $1)" page="${2:-$1}" ; /usr/bin/man <(curl -s "https://man-api.ch/v1/buster/${section}/${page}.gz") }
Where do the man pages come from?
From the Debian 10 (buster) package repository.
Is this Service free?
Yes.
Is there a rate limit?
Fair Use. As long as this does not explode, it should not matter.
Isn't it dangerous to pipe a foreign file to man?
To be honest, we don't know. But you can use less(1) if you are worried about it.
What software do you use for this service?
I have a question or feedback.
You can reach Markus on Twitter or Marco per email.