This is a minimalist command line interface (CLI) program to fetch and display data from Wikipedia.
In an era where Artificial Intelligence answers everything and large language models shape our knowledge, this program is a small tribute to Wikipedia, the silent, human-curated backbone that feeds those very models. Never forget the source.
- Fetches and displays article summaries and table of contents
- Navigates article sections interactively
- Handles redirects and disambiguation pages automatically
- Supports multiple languages (tested mainly English and Italian)
pip install wiclipediawicli "Blade Runner"If no page title is provided, the program will prompt you to enter one interactively.
You will be interactively prompted to navigate through the article summary sections.
To navigate, use the section numbers shown in the table of contents.
If the query matches a disambiguation page, you will be prompted to select the intended article from a list of options.
By default, it fetches the English Wikipedia.
To specify a different language, use the -l or --lang option:
wicli "La classe operaia va in paradiso" --lang itAvailable commands at any prompt:
:b— Go back to the start prompt:q— Exit the program
| Option | Description |
|---|---|
page |
Wikipedia page title (optional, prompted if omitted) |
-l, --lang |
Language code (default: en) |
--no-cache |
Disable local cache for the session |
--purge |
Purge local cache and exit |
Responses are cached locally for 72 hours to reduce API calls.
The cache is stored in ~/.cache/wiclipedia/.
Use --no-cache to bypass it for a session, or --purge to clear it entirely.
ANSI colors and styles are enabled by default.
Set the NO_COLOR environment variable to disable them (see no-color.org).
WiCLIpedia interfaces directly with the official Wikipedia PHP/MediaWiki APIs without using any third-party scraping libraries.
Please use this program responsibly. If you need to perform massive automated data extraction, use official database dumps instead of hammering the live API.
WiCLIpedia caches responses locally for 72 hours by default to minimize API load. Check the Cache section for details.
More information about the MediaWiki API and usage guidelines:
This program is licensed under the GNU General Public License v3.0 or later (GPL-3.0).
See the LICENSE file for details.