A while ago, I wrote a guide that described how to browse the Arch Wiki from your Terminal using a command line script named arch-wiki-cli. Using this script, anyone can easily navigate through entire Arch Wiki website and read it with a text browser of your choice. Obviously, an active Internet connection is required to use this script. Today, I stumbled upon a similar utility named "Arch-wiki-man". As the name says, it is also used to read the Arch Wiki from command line, but it doesn't require Internet connection. Arch-wiki-man program helps you to browse and read entire Arch Wiki as Linux man pages. It will display any article from Arch Wiki in man pages format. Also, you need not to be online to browse Arch Wiki. The entire Arch Wiki will be downloaded locally and the updates are pushed automatically every two days. So, you always have an up-to-date, local copy of the Arch Wiki on your system.
$ yay -S arch-wiki-man
Alternatively, it can be installed using NPM package manager like below. Make sure you have installed NodeJS and run the following command to install it:
$ npm install -g arch-wiki-man
Browse And Read Entire Arch Wiki As Linux Man Pages
The typical syntax of Arch-wiki-man is:
$ awman <search-query>
Let me show you some examples.
Search with one or more matches
Let us search for a Arch Linux installation guide. To do so, simply run:
$ awman Installation guide
The above command will search for the matches that contains the search term "Installation guide" in the Arch Wiki. If there are multiple matches for the given search term, a selection menu will appear. Choose the guide you want to read using UP/DOWN arrows or Vim-style keybindings (j/k) and hit ENTER to open it. The resulting guide will open in man pages format like below.
Here, awman refers arch wiki man.
All man command options are supported, so you can navigate through guide as the way you do when reading a man page. To view the help section, press h.
To exit the selection menu without entering man, simply press Ctrl+c.
To go back and/or quit man, type q.
Search matches in titles and descriptions
By default, Awman will search for the matches in titles only. You can, however, direct it to search for the matches in both the titles and descriptions as well.
$ awman -d vim
$ awman --desc-search vim
Search for matches in contents
Apart from searching for matches in titles and descriptions, it is also possible to scan the contents for a match as well. Please note that this will significantly slower the search process.
$ awman -k emacs
$ awman --apropos emacs
Open the search results in web browser
If you don't want to view the arch wiki guides in man page format, you can open it in a web browser. To do so, run:
$ awman -w pacman
$ awman --web pacman
This command will open the resulting match in the default web browser rather than with man command. Please note that you need Internet connection to use this option.
Search in other languages
By default, Awman will open the Arch wiki pages in English. If you want to view the results in other languages, for example Spanish, simply do:
$ awman -l spanish codecs
To view the list of available language options, run:
$ awman --list-languages
Update the local copy of Arch Wiki
Like I already said, the updates are pushed automatically every two days. If you want to update it manually, simply run:
$ awman-update [email protected] /usr/lib/node_modules/arch-wiki-man └── [email protected] arch-wiki-md-repo has been successfully updated or reinstalled.