Skip to main content

A CLI tool to search and read Wikipedia with AI-powered summaries

Project description

Wikish Banner

WikiSH ๐ŸŒ

Terminal Wikipedia Reader

License Python Build Contributions

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 rich for a vibrant terminal experience with tables, panels, and colored output.

๐Ÿš€ Getting Started

Prerequisites

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 wikish command is not recognized after installation, you likely need to add your Python Scripts folder to your system's PATH.

  1. Run pip show wikish to find where it is installed.
  2. Add the Scripts folder (e.g., ...\Python314\Scripts) to your Environment Variables.
  3. 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 q to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wikish-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wikish-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

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

Hashes for wikish-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3694bc400ff40b7638a10c73e2f730b3904153423714c94d9151ec37b018df39
MD5 bbac0f0b7d63db1decd122556f902355
BLAKE2b-256 7669f73cb2d290b788e04839207c4b284cd8a6a90b45fee0f1946064bee7178c

See more details on using hashes here.

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

Hashes for wikish-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8dbfee0ddb4c7206cdd9d1e1c0456ef2c41ce87ecd7b3576ba2add514d6e3eea
MD5 3376689365596fa46847b5371b7dd4a4
BLAKE2b-256 49cc955879c02a268fe0d0c1c8999d9381e754850c87bb979774e816dc1da90a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page