A command-line interface for Wikipedia that allows you to search, read articles, and view ASCII art versions of images directly in your terminal.
- Search Wikipedia articles
- Read full articles in the terminal
- View article images as ASCII art
- Browse external links
- Command history
- Tab completion for commands
As of February 9, 2025, you can install Wiki-CLI on Windows using the attached installer available in the latest release. We are actively working on improving the installation experience.
Windows Installation (using the installer):
- Download the installer from the latest release page.
- Run the installer.
Known Issue (Windows Installer):
The installer may incorrectly report that Python is not installed even if it is present on your system. This is a known issue that we are actively working to resolve in future releases. In the meantime, if you encounter this issue, please ensure you have a compatible version of Python installed (3.7+) and consider using the manual installation method described below. If the error message (python is not installed) does appear on your machine, press no to continue with the instalation anyways.
- Clone the repository:
git clone https://github.com/DaDevMikey/Wikipedia-Command-Line-Interface.git
cd wiki-cli
- Create and activate a virtual environment (recommended):
# Windows
python -m venv .venv
.venv\Scripts\activate
# Linux/macOS
python -m venv .venv
source .venv/bin/activate
- Install the package:
pip install -e .
To use the wiki
command from anywhere on your system:
-
Add the Python Scripts directory to your PATH:
- Open System Properties (Win + Pause/Break)
- Click "Advanced system settings"
- Click "Environment Variables"
- Under "System Variables", find and select "Path"
- Click "Edit"
- Click "New"
- Add the Python Scripts path (typically
C:\Users\<username>\AppData\Local\Programs\Python\Python3x\Scripts
) - Click "OK" on all windows
-
Open a new command prompt (cmd.exe) and verify the installation:
wiki --help
The command should be automatically available after installation. If not:
which wiki # Verify installation path
wiki --help
wiki
search <query>
: Search Wikipedia articlesview <title>
: View a specific article<number>
: View article from search resultsimages
: List images in current articleimage <number>
: View ASCII art of an imagelinks
: Show external links for current articleclear
: Clear the screenhelp
: Show help messageexit
: Exit the application
# Search for an article
wiki> search Python programming
# View a specific article
wiki> view Python (programming language)
# List images in current article
wiki> images
# View an image as ASCII art
wiki> image 1
# Show external links
wiki> links
# Get help
wiki> help
- Python 3.7+
- Required packages (automatically installed):
- requests
- aiohttp
- pillow
- rich
- prompt_toolkit
- click
- python-dotenv
MIT
To use the command globally on your device:
-
For Windows users:
- After installation, the
wiki
command should be available in your Python Scripts directory - To make it available everywhere, you need to ensure your Python Scripts directory is in your system PATH
- The Python Scripts directory is typically located at:
C:\Users\<username>\AppData\Local\Programs\Python\Python3x\Scripts
(for system Python)C:\Users\<username>\Downloads\Wikipedia Command Line Interface\.venv\Scripts
(if using virtual environment)
- After installation, the
-
To add to PATH in Windows:
# First, find your Python Scripts directory where python
Then:
- Open System Properties (Win + Pause/Break)
- Click "Advanced system settings"
- Click "Environment Variables"
- Under "System Variables", find and select "Path"
- Click "Edit"
- Click "New"
- Add the full path to your Python Scripts directory
- Click "OK" on all windows
- Open a new command prompt for changes to take effect
-
To verify installation:
# Open a new command prompt and type: wiki --help
If you want to use the command without activating the virtual environment each time, you should install the package globally using:
pip install .
Instead of:
pip install -e .
Remember that global installation might require administrator privileges on Windows (run command prompt as administrator).