Linux "ri" Command Line Options and Examples
Ruby API reference front end

ri is a command-line front end for the Ruby API reference. You can search and read the API reference for classes and methods with ri. ri is a part of Ruby.


ri [-ahilTv] [-d DIRNAME] [-f FORMAT] [-w WIDTH] [--[no-]pager] [--server[=PORT]] [--[no-]list-doc-dirs]
[--no-standard-docs] [--[no-]{system|site|gems|home}] [--[no-]profile] [--dump=CACHE] [name ...]

Command Line Options:

In interactive mode you can repeatedly look up methods with autocomplete.
ri --[no-]interactive ...
Show all documentation for a class or module.
ri --[no-]all ...
List classes ri knows about.
ri --[no-]list ...
Send output to a pager, rather than directly to stdout.
ri --[no-]pager ...
Synonym for --no-pager.
ri -T ...
Set the width of the output.
ri --width ...
Run RDoc server on the given port. The default port is 8214.
ri --server[ ...
Use the selected formatter. The default formatter is bs for paged output and ansi otherwise.Valid formatters are: ansi, bs, markdown, rdoc.
ri --format ...
Show help and exit.
ri --help ...
Data source options:
ri --version ...
List the directories from which ri will source documentation on stdout and exit.
ri --[no-]list-doc-dirs ...
List of directories from which to source documentation in addition to the standard directories.May be repeated.
ri --doc-dir ...
Do not include documentation from the Ruby standard library, site_lib, installed gems, or~/.rdoc. Use with --doc-dir.
ri --no-standard-docs ...
Include documentation from Ruby's standard library. Defaults to true.
ri --[no-]system ...
Include documentation from libraries installed in site_lib. Defaults to true.
ri --[no-]site ...
Include documentation from RubyGems. Defaults to true.
ri --[no-]gems ...
Run with the Ruby profiler.
ri --[no-]profile ...
ENVIRONMENTRI Options to prepend to those specified on the command-line.RI_PAGERPAGER Pager program to use for displaying.HOMEUSERPROFILEHOMEPATH Path to the user's home directory.FILES~/.rdoc Path for ri data in the user's home directory.
ri --dump=CACHE ...