LinuxCommandLibrary

archwiki-rs

Search and display ArchWiki articles

TLDR

Read a page from the ArchWiki

$ archwiki-rs read-page [page_title]
copy

Read a page from the ArchWiki in the specified format
$ archwiki-rs read-page [page_title] --format [plain-text|markdown|html]
copy

Search the ArchWiki for pages containing the provided text
$ archwiki-rs search "[search_text]" --text-search
copy

Download a local copy of all ArchWiki pages into a specific directory
$ archwiki-rs local-wiki /[path/to/local_wiki] --format [plain-text|markdown|html]
copy

SYNOPSIS

archwiki-rs [OPTIONS] QUERY

PARAMETERS

QUERY
    The search query string to be used when looking for articles on the Arch Linux Wiki.

-h, --help
    Displays help information for the command, detailing its usage and available options.

-o, --open
    Opens the best matching search result directly in your default web browser. This option is useful for quick navigation to the most relevant wiki page.

-s, --search
    Explicitly performs a search for the provided query. This is the default behavior if no other action-oriented option (like --open or --print) is specified.

-v, --version
    Prints the version information of the archwiki-rs tool, useful for checking compatibility or reporting bugs.

-i, --interactive
    Presents a list of search results, allowing the user to interactively select which article to open or further act upon. This is ideal when the initial search yields multiple relevant pages.

-p, --print
    Retrieves and prints the raw content of the best matching article directly to your terminal's standard output, enabling quick viewing without leaving the command line.

DESCRIPTION

archwiki-rs is a lightweight, Rust-based command-line utility designed to provide quick and efficient access to the Arch Linux Wiki directly from your terminal. It streamlines the process of information retrieval by eliminating the need to open a graphical web browser for common wiki queries. Users can easily search for articles by providing a QUERY, view a list of potential search results, and then either automatically open the most relevant page in their default web browser using the --open option, or interactively select from multiple options with --interactive. Furthermore, for those who prefer to stay entirely within the terminal, the --print option allows for the display of an article's raw content. This tool is invaluable for system administrators, developers, and any Arch Linux user who frequently consults the wiki and values a fast, integrated command-line workflow.

CAVEATS

The command requires an active internet connection to function as it queries the live Arch Linux Wiki.
When using the -p or --print option, the article content is displayed in its raw wiki markup format, which may not be easily readable without a dedicated renderer.
The 'best result' determined by the command for options like -o may not always be the exact page a user expects, making the -i or --interactive option useful for precise selection.

HISTORY

archwiki-rs is a relatively modern utility, written in Rust, a language known for its performance, safety, and concurrency. Its development is community-driven, typical for specialized open-source tools within the Linux ecosystem. It emerged as a response to the need for faster, more integrated access to the Arch Linux Wiki for command-line aficionados, providing a native, lightweight alternative to web browser-based access.

SEE ALSO

man(1), info(1), curl(1), wget(1), lynx(1), w3m(1)

Copied to clipboard