rakudoc is a command-line-interface (CLI) program that reads Raku pod from installed modules' source code, in contrast to running
raku --doc=MODULE programfile which reads Raku pod from the named source file.
rakudoc may not be installed automatically depending upon how you installed Rakudo Raku. To install it use
zef install 'rakudoc:auth<zef:coke>'
rakudoc [switches] [arguments]
With no switches or arguments,
rakudoc lists its help to
rakudoc:ver<0.2.5>, this output is:
Usage: rakudoc [-d|--doc-sources=<Directories>] [-D|--no-default-docs] <query> rakudoc -b|--build-index [-d|--doc-sources=<Directories>] [-D|--no-default-docs] rakudoc -V|--version rakudoc -h|--help <ARGUMENTS> <query> Example: 'Map', 'IO::Path.add', '.add' -d|--doc-sources=<Directories> Additional directories to search for documentation -D|--no-default-docs Use only directories in --doc-sources / $RAKUDOC -b|--build-index Index all documents found in doc source directories
The text output can be captured and converted to other forms if desired.
If you want to use ANSI escape sequences, which will apply boldface and other enhancements when the output is printed to a terminal, you will have to set the environment variable POD_TO_TEXT_ANSI, which is unset by default
rakudoc can only extract embedded Raku pod from installed module source files (as listed in a distribution's
META6.json file). It is planned to add a feature for
rakudoc (in conjunction with
META6.json changes) to extract all Raku pod in files included with the installed distribution.