A CLI tool to search and read Wikipedia with AI-powered summaries
Project description
WikiSH ๐
Terminal Wikipedia Reader
WikiSH is a powerful command-line interface (CLI) tool that lets you search and read Wikipedia articles directly from your terminal.
It features a clean, rich interface and integrates with AI to provide concise summaries of long articles.
โจ Features
- ๐ Fast Search: Instantly search Wikipedia for any topic.
- ๐ Terminal Reader: Read full Wikipedia articles with beautiful Markdown formatting and a pager for easy navigation.
- ๐ค AI Summarization: Generate 300-word summaries of any article using Llama 3 via Replicate.
- ๐จ Rich UI: Utilizes
richfor a vibrant terminal experience with tables, panels, and colored output.
๐ Getting Started
Prerequisites
- Python 3.8+
- Replicate API Token (optional, for summaries)
Installation
๐ฆ Recommended: Using pipx
The easiest way to install WikiSH and have it work immediately is using pipx. This handles the system PATH automatically.
pipx install wikish
๐ Standard: Using pip
You can also install it directly from PyPI or GitHub:
# From PyPI
pip install wikish
# Or from GitHub
pip install git+https://github.com/yourusername/wikish.git
[!IMPORTANT] Windows Users: If the
wikishcommand is not recognized after installation, you likely need to add your Python Scripts folder to your system's PATH.
- Run
pip show wikishto find where it is installed.- Add the
Scriptsfolder (e.g.,...\Python314\Scripts) to your Environment Variables.- Restart your terminal.
๐ Usage
Once installed, you can launch WikiSH from anywhere:
wikish
Or search for a specific topic directly:
wikish "Quantum Physics"
โจ๏ธ Navigation
- Article Selection: Enter the index number from the search results to read an article.
- Reading: Use arrow keys or Space/PageDown to scroll. Press
qto exit the pager. - Actions:
s: Generate an AI summary.n: Return to search results.q: Quit the application.
โ๏ธ Configuration
Create a .env file in your project or set the environment variable:
REPLICATE_API_TOKEN=your_token_here
(Optional: Only needed for AI-powered summaries)
๐ Project Structure
wikish/
โโโ src/ # Source code
โ โโโ wikish/ # Core package
โ โโโ ai.py
โ โโโ cli.py
โ โโโ models.py
โ โโโ search.py
โ โโโ utils.py
โโโ main.py # Entry point (for local dev)
โโโ pyproject.toml # Build system and dependencies
โโโ .env # Environment variables (secret)
โโโ requirements.txt # legacy dependency list
๐ฆ Dependencies
typer: For CLI argument parsing.rich: For beautiful terminal formatting.nlpia2-wikipedia: For accessing Wikipedia content.replicate: For AI-powered summaries.python-dotenv: For managing environment variables.mdv: For terminal markdown viewing.
๐ License
This project is open-source and available under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wikish-0.1.1.tar.gz.
File metadata
- Download URL: wikish-0.1.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3694bc400ff40b7638a10c73e2f730b3904153423714c94d9151ec37b018df39
|
|
| MD5 |
bbac0f0b7d63db1decd122556f902355
|
|
| BLAKE2b-256 |
7669f73cb2d290b788e04839207c4b284cd8a6a90b45fee0f1946064bee7178c
|
File details
Details for the file wikish-0.1.1-py3-none-any.whl.
File metadata
- Download URL: wikish-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dbfee0ddb4c7206cdd9d1e1c0456ef2c41ce87ecd7b3576ba2add514d6e3eea
|
|
| MD5 |
3376689365596fa46847b5371b7dd4a4
|
|
| BLAKE2b-256 |
49cc955879c02a268fe0d0c1c8999d9381e754850c87bb979774e816dc1da90a
|