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
-
Clone the repository:
git clone https://github.com/yourusername/wikish.git cd wikish
-
Install dependencies:
pip install -r requirements.txt
-
Configure Environment: Create a
.envfile in the root directory and add your Replicate API token:REPLICATE_API_TOKEN=your_token_here
๐ Usage
You can now run the tool using the simplified command:
.\wiki "Your Search Term"
Or using standard Python:
python main.py "Your Search Term"
Navigation
- Article Selection: Enter the index number from the search results to read an article.
- Reading: Use arrow keys or Space/PageDown to scroll through the article. Press
qto exit the pager. - Actions:
s: Generate an AI summary.n: Return to search results to pick another article.q: Quit the application.
๐ Project Structure
wikish/
โโโ src/ # Source code
โ โโโ wikish/ # Core package
โ โโโ ai.py
โ โโโ cli.py
โ โโโ models.py
โ โโโ search.py
โ โโโ utils.py
โโโ examples/ # Sample outputs and usage examples
โโโ main.py # Entry point
โโโ wiki.bat # Windows shortcut
โโโ requirements.txt # Project dependencies
๐ฆ 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.0.tar.gz.
File metadata
- Download URL: wikish-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2b795094f45335446b02530cbd6307d31de9fa578d9e5f12481e70e0943fa72
|
|
| MD5 |
36100faf2bb53e35c2a88f3044b8b299
|
|
| BLAKE2b-256 |
58b1c15ea87465c4ade112a16cd7009c90d4ceb9071847db7f3f14209ef74cab
|
File details
Details for the file wikish-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wikish-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 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 |
ac41ddf92d08fb2f40f3721776d13053575970098e611668640f81c7da8ceb57
|
|
| MD5 |
65447d77890d228610d294bef72fe5a6
|
|
| BLAKE2b-256 |
af633c717efd2e2ee9b0aaa65b1a0a74edb71ee8342a3dee1b7d64efbb543020
|