Skip to main content

kiwix-llm-cli

Kiwix ZIM file search CLI/Skill for coding agents.

Agentic search for Wikipedia, DevDocs, StackExchange, and other offline content from ZIM files.

Installation

uv tool install kiwix-llm-cli

kwxlc -h

Quick Start

  1. Initialize configuration (shows download directory):

    kwxlc init                    # Global config
    kwxlc init -p .               # Local config for project (./.kiwix-llm-cli.yaml)
    

    Config locations (Linux example, OS-dependent, see init output):

    • Global: ~/.config/kiwix-llm-cli/config.yaml
    • Download: ~/.local/share/kiwix-llm-cli/
  2. Get ZIM files:

    # Search and download from library.kiwix.org
    kwxlc remote catalog --lang eng --query wikipedia --count 5
    kwxlc remote download wikipedia_en_100_2026-04
    
    # Or download manually from https://library.kiwix.org/
    # Place in: ~/.local/share/kiwix-llm-cli/ (see your config.yaml)
    
  3. List discovered ZIM files:

    kwxlc list
    
  4. Search:

    kwxlc search "machine learning"
    

Skill Installation

Installs SKILL.md for coding agents (default: .claude/skills):

 # ./.claude/skills (default)
kwxlc install-skills

# ./.agents/skills
kwxlc install-skills -a opencode

# Both
kwxlc install-skills -a opencode -a claude-code

Commands Reference

kwxlc init [-p PATH]              # Generate config file
kwxlc list [-f FORMAT]            # List discovered ZIM files
kwxlc delete NAME [NAME...] [-f]  # Delete ZIM files (use -f to skip confirmation)
kwxlc search QUERY [-l LIMIT]     # Full-text search
kwxlc suggest TERM [-l LIMIT]     # Title suggestion
kwxlc get TITLE [-f FORMAT]       # Get article (markdown/html/raw)
kwxlc info                        # Show ZIM file info
kwxlc install-skills [-a AGENT]   # Install skill for coding agents
kwxlc --version                   # Show version

kwxlc remote catalog [OPTIONS]    # Search library.kiwix.org
kwxlc remote download NAME [-o DIR] # Download ZIM file

Options:
  -c, --config PATH       Config file path
  -b, --backend {libzim,api}  Backend selection
  -u, --kiwix-api-url URL     API endpoint URL
  -z, --zim NAME              ZIM file name/path

Configuration

Config File Locations (Linux example)

Type Location
Global ~/.config/kiwix-llm-cli/config.yaml
Local ./.kiwix-llm-cli.yaml (auto-detected)

Config Structure

default_zim: wikipedia_en_wp1-0.8_nopic_2026-04
backend: libzim # Default backend (libzim or api)
kiwix_api_url: http://localhost:8080 # API endpoint URL
search_dirs: # Directories to search for ZIM files
  - ~/.local/share/kiwix-llm-cli # Default (OS-dependent)
  - ~/Documents/zim
download_dir: ~/.local/share/kiwix-llm-cli

Priority (low to high)

  1. Global config
  2. Local config (./.kiwix-llm-cli.yaml)
  3. Environment variables (KWXLC_*)
  4. Command-line options (-c, --zim, --backend)

Environment Variables

KWXLC_DEFAULT_ZIM=wikipedia_en_wp1-0.8_nopic_2026-04
KWXLC_BACKEND=api
KWXLC_KIWIX_API_URL=http://localhost:8080

API Backend

Use kiwix-serve to serve ZIM files via HTTP UI/API.

When backend: api in config, commands default to API backend.

# Start kiwix-serve (example)
kiwix-serve --port 8080 ~/.local/share/kiwix-llm-cli/*.zim

# Config with backend: api
kwxlc search "query"  # Uses kiwix-serve automatically

# Or override explicitly
kwxlc search "query" --backend api --kiwix-api-url http://custom:9999

Development

# Setup
mise trust
uv sync --dev
uv run pre-commit install

# Lint & Format
uv run ruff check .
uv run ruff format .

# Type check
uv run ty check src/

# Test
uv run pytest

# Pre-commit
uv run pre-commit run --all-files

# Pin GitHub Actions versions
pinact run

Tips

  • OR/NOT operators are not supported (Xapian limitation)
  • Kiwix: Offline content reader

License

MIT

Metadata

Release files for kiwix-llm-cli 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kiwix-llm-cli 0.2.1
File Size Uploaded Provenance
kiwix_llm_cli-0.2.1.tar.gz 15.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kiwix-llm-cli 0.2.1
File Interpreter ABI Platform
kiwix_llm_cli-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 34.7 kB

Release files / kiwix_llm_cli-0.2.1.tar.gz

Download URL kiwix_llm_cli-0.2.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9540f7b039c39a5a7254e08f19921ab71a169903b9a7db69288564b2a7fed20c
BLAKE2b-256 checksum
How to use checksums
6e576930191127eb7f25f8bf7e239a470c3d85571ac8096cb2481b1e5430f35f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / kiwix_llm_cli-0.2.1-py3-none-any.whl

Download URL kiwix_llm_cli-0.2.1-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dde1618c169344b78701f0e66018ebd8ef56b1fb32d1067972058b638cba00f
BLAKE2b-256 checksum
How to use checksums
d2483ee6d90a0639b77d92ecdbfc3b84a6244c898576d517045a63f6b8dd2d68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for kiwix-llm-cli 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page