Kiwix ZIM file search CLI for LLM coding agents
Project description
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
-
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
initoutput):- Global:
~/.config/kiwix-llm-cli/config.yaml - Download:
~/.local/share/kiwix-llm-cli/
- Global:
-
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)
-
List discovered ZIM files:
kwxlc list -
Search:
kwxlc search "machine learning"
Commands Reference
kwxlc init [-p PATH] # Generate config file
kwxlc list [-f FORMAT] # List discovered ZIM files
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 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
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
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)
- Global config
- Local config (
./.kiwix-llm-cli.yaml) - Environment variables (
KWXLC_*) - 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
# 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)
Related Projects
- Kiwix: Offline content reader
License
MIT
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 kiwix_llm_cli-0.1.0.tar.gz.
File metadata
- Download URL: kiwix_llm_cli-0.1.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1e8e7ceeae84ff0d26422371c93081e4e0d04b9094a049172f38cb9df28a2e7
|
|
| MD5 |
7408ebae7f018ce5bb60b14bed0dcf45
|
|
| BLAKE2b-256 |
2b71f4f1d521b09a61b86484a855d728f354937fbbc72cf32087d25c72ab1a52
|
File details
Details for the file kiwix_llm_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kiwix_llm_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
123a260276a88d93f40b31fb38121e8e43b799d0e76015e420de8eea2bca1dcd
|
|
| MD5 |
09a3eeda3f8307e26c219663fe867d5a
|
|
| BLAKE2b-256 |
7eff7e3a64681bbb967ae60b43a44adc0f3b29174cf1563689ea455f1f6a8b74
|