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.
- 🔍 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.
- Python 3.8+
- Replicate API Token (optional, for summaries)
The easiest way to install WikiSH and have it work immediately is using pipx. This handles the system PATH automatically.
pipx install wikishYou 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.gitImportant
Windows Users: If the wikish command 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.
Once installed, you can launch WikiSH from anywhere:
wikishOr search for a specific topic directly:
wikish "Quantum Physics"- 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.
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)
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
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.
This project is open-source and available under the MIT License.
