wikit
Search and view Wikipedia articles in terminal
TLDR
Show a short summary of a specific topic on Wikipedia
Specify a language (ISO 639-1 language code)
Open the full Wikipedia article in the default browser
Open a disambiguation menu
SYNOPSIS
wikit
PARAMETERS
The word or phrase to search for on Wikipedia. Multiple words should be enclosed in quotes if they represent a single query (e.g., 'wikit "Linux kernel"').
-l
Specifies the language of the Wikipedia article to retrieve (e.g., 'en' for English, 'de' for German). If omitted, English is usually the default. Note: This option's availability depends on the specific wikit implementation.
-f
Retrieves the full article content instead of just the summary or introductory section. This can result in a much larger output in the terminal. Note: This option's availability depends on the specific wikit implementation.
-b
Opens the Wikipedia article in the default web browser instead of displaying content in the terminal. Useful for more in-depth reading. Note: This option's availability depends on the specific wikit implementation.
DESCRIPTION
The wikit command is a lightweight command-line utility designed to fetch and display concise summaries of Wikipedia articles directly in your terminal. It serves as a convenient tool for quickly looking up information without needing to open a web browser.
Typically implemented as a shell script, wikit leverages Wikipedia's API or web scraping techniques to retrieve the introductory section of an article corresponding to the user's search query. This makes it ideal for rapid fact-checking, understanding basic concepts, or getting a brief overview of a topic during command-line work.
Its primary benefit lies in its speed and minimalism, providing immediate answers in a text-based format, making it particularly useful for developers, system administrators, and anyone who prefers to stay within the terminal environment for information retrieval.
CAVEATS
The wikit command is not a standard, pre-installed utility on most Linux distributions; it typically requires manual installation or scripting. Its functionality heavily depends on an active internet connection to access Wikipedia.
Furthermore, implementations of wikit can vary widely, meaning the exact set of supported options (like language selection or full article retrieval) and underlying dependencies (such as curl, jq for JSON parsing, or text browsers like lynx or w3m) can differ significantly.
Output formatting may also vary, and complex Wikipedia content like tables, images, or infoboxes are generally not well-rendered in the terminal output.
<I>INSTALLATION NOTES</I>
As wikit is not a standard package, installation usually involves downloading a script (e.g., from a GitHub repository) and placing it in a directory listed in your system's PATH environment variable. You might also need to make the script executable using chmod +x wikit.
Ensure you have necessary dependencies like curl and jq (for API-based versions) or a text browser like lynx or w3m (for HTML-scraping versions) installed on your system. These dependencies are crucial for wikit to function correctly.
HISTORY
The wikit command does not have a single, official development history like many standard Linux utilities. Instead, it typically originates from individual developers and programmers who created custom shell scripts or small programs to fulfill the need for quick Wikipedia access from the command line.
Its emergence is largely a testament to the Unix philosophy of chaining simple tools together to perform complex tasks, often leveraging tools like curl for web requests and jq for parsing JSON API responses, or text-based browsers for HTML parsing.
While various versions exist across GitHub and personal repositories, they all share the common goal of bringing Wikipedia's vast knowledge base directly into the terminal environment, reflecting a broader trend among developers to minimize context switching and enhance productivity within their preferred command-line interface.