RI(1)

πŸ“¦ version 4.0.6, in centos-stream 10

✨ NAME ✨

ok so bestie, welcome to ri β€” the Ruby API reference front end πŸ’– this is your girl for looking up Ruby docs without ever leaving the terminal. it's part of the Ruby Programmer's Reference Guide, iykyk.


🌸 SYNOPSIS 🌸

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 ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

ri is literally a command-line front end for the Ruby API reference πŸŽ€ you can search and read the API reference for classes and methods with it. no browser, no vibes ruined, just you and the docs.

ri is a part of Ruby. periodt πŸ’…

ok so name can be any of these:

Class | Module | Module::Class

Class::method | Class#method | Class.method | method

gem_name: | gem_name:README | gem_name:History

ruby: | ruby:NEWS | ruby:globals

all class names may be abbreviated to their minimum unambiguous form. and if a name is ambiguous?? don't stress β€” all valid options will be listed for you 🫢

a . matches either class or instance methods, while #method matches only instance and ::method matches only class methods. so precise. so iconic.

README and other files may be displayed by prefixing them with the gem name they're contained in. if the gem name is followed by a :, all files in the gem will be shown. the file name extension may be omitted where it is unambiguous ✨

for example:

ri Fil
ri File
ri File.new
ri zip
ri rdoc:README
not me reminding you that shell quoting or escaping may be required for method names containing punctuation 😭 like:
ri 'Array.[]'
ri compact\!

to see the default directories ri will search, run:

ri --list-doc-dirs

specifying the --system, --site, --home, --gems, or --doc-dir options will limit ri to searching only the specified directories. keep that in mind bestie.

ri options may be set in the RI environment variable πŸ‘‘

the ri pager can be set with the RI_PAGER environment variable or the PAGER environment variable. pick your fighter πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • -i, --[no-]interactive β€” in interactive mode you can repeatedly look up methods with autocomplete. it's giving main character energy fr πŸ”₯
  • -a, --[no-]all β€” show all documentation for a class or module.
  • -l, --[no-]list β€” list classes ri knows about πŸ‘‘
  • --[no-]pager β€” send output to a pager, rather than directly to stdout.
  • -T β€” synonym for --no-pager. yes bestie, it's just a shortcut 🫢
  • -w WIDTH, --width=WIDTH β€” set the width of the output.
  • --server[=PORT] β€” run RDoc server on the given port. the default port is 8214.
  • -f FORMAT, --format=FORMAT β€” use the selected formatter. the default formatter is bs for paged output and ansi otherwise. valid formatters are: ansi, bs, markdown, rdoc.
  • -h, --help β€” show help and exit. no thoughts, just help πŸ’–
  • -v, --version β€” output version information and exit.

πŸ’œ Data source options:

  • --[no-]list-doc-dirs β€” list the directories from which ri will source documentation on stdout and exit.
  • -d DIRNAME, --doc-dir=DIRNAME β€” list of directories from which to source documentation in addition to the standard directories. may be repeated. yes, stack them up πŸ”₯
  • --no-standard-docs β€” do not include documentation from the Ruby standard library, site_lib, installed gems, or ~/.rdoc. use with --doc-dir.
  • --[no-]system β€” include documentation from Ruby's standard library. defaults to true.
  • --[no-]site β€” include documentation from libraries installed in site_lib. defaults to true.
  • --[no-]gems β€” include documentation from RubyGems. defaults to true.
  • --[no-]home β€” include documentation stored in ~/.rdoc. defaults to true.

🧚 Debug options:

  • --[no-]profile β€” run with the Ruby profiler.
  • --dump=CACHE β€” dump data from an ri cache or data file.

🌈 ENVIRONMENT 🌈

  • RI β€” options to prepend to those specified on the command-line. (prepend!! like a little pregame for your flags πŸ’…)
  • RI_PAGER, PAGER β€” pager program to use for displaying.
  • HOME, USERPROFILE, HOMEPATH β€” path to the user's home directory.

πŸ“ FILES πŸ“

  • ~/.rdoc β€” path for ri data in the user's home directory.

⭐ SEE ALSO ⭐

ruby(1), rdoc(1), gem(1)


πŸ’€ REPORTING BUGS πŸ’€

  • security vulnerabilities should be reported via an email to security@ruby-lang.org. reported problems will be published after being fixed.
  • other bugs and feature requests can be reported via the Ruby Issue Tracking System (https://bugs.ruby-lang.org/).
do NOT report security vulnerabilities via this system because it publishes the vulnerabilities immediately 😭 fr fr, this one matters.

πŸ‘‘ AUTHORS πŸ‘‘

written by Dave Thomas <dave@pragmaticprogrammer.com>.


and that's the whole thing bestie πŸ’– this one's from the UNIX manual, April 20, 2017 edition (that's the RI(1) in the corner πŸŽ€). slay, go read some docs, you've got this 🫢✨

πŸ“¦ where this page comes from
  • centos-stream 10: ruby4.0 4.0.6-37.el10 Β· (Ruby OR BSD-2-Clause) AND (Ruby OR BSD-2-Clause OR GPL-1.0-or-later) AND BSD-3-Clause AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND ISC AND LicenseRef-Fedora-Public-Domain AND MIT AND CC0-1.0 AND zlib AND Unicode-DFS-2015 AND HPND-Markus-Kuhn AND Ruby-pty AND (Ruby OR BSD-2-Clause OR Python-2.0.1) AND BSD-2-Clause AND (Apache-2.0 OR BSL-1.0) AND GPL-2.0-only AND CC-BY-2.5 AND OFL-1.1-RFN AND BSL-1.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms