Observed since 21 Oct, 10:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
CLI: HTTP(S) or local file/dir → Readability → Markdown; optional LiteLLM summary; optional --max-tokens truncation.
HTTP(S) → clean Markdown for LLM context: httpx fetch → Readability → markdownify; optional LiteLLM summary with --summary (lazy-loaded — no LLM stack until you opt in).
# Markdown only (stdout stays pipe-clean; errors → stderr)
ai-context-cli "https://example.com/article"
# Same + LLM summary (loads .env from cwd for API keys)
ai-context-cli "https://example.com/article" --summary
# Verbose pipeline logs on stderr
ai-context-cli "https://example.com/article" --summary -v
Architecture and conventions: SPEC.md.
Raw HTML wastes tokens. ai-context-cli is a small preprocessing step: one URL in, readable Markdown (and optionally a short summary) out.
readability-lxml)markdownify--summary, --model)Scope today: SOURCE is an http(s) URL or a local file or directory (UTF-8 text; see SPEC §5). --structure and --version are available.
# 1) Install
pip install ai-context-cli
# 2) Convert a page to Markdown
ai-context-cli "https://example.com/article"
# 3) Show installed version
ai-context-cli --version
# 4) Add a summary block
ai-context-cli "https://example.com/article" --summary
From a clone (dev):
python3 -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\Activate.ps1
pip install -U pip
pip install -e ".[dev]"
ai-context-cli --help
From PyPI: pip install ai-context-cli
Requires Python 3.11+.
--summary uses LiteLLM model ids. Set the provider’s native env vars (also read from a .env in the working directory when --summary is used).
| Provider | Example --model | Credentials |
|---|---|---|
| OpenAI | gpt-4o-mini (default if --model omitted) | OPENAI_API_KEY |
| Anthropic | anthropic/claude-3-5-sonnet-latest | ANTHROPIC_API_KEY |
| OpenRouter | openrouter/openai/gpt-4o-mini (pick any model slug OpenRouter exposes) | OPENROUTER_API_KEY |
| Ollama (local) | ollama/llama3 | Optional: OLLAMA_API_BASE (default http://localhost:11434) |
ai-context-cli "https://example.com/article" --summary --model "openrouter/openai/gpt-4o-mini"
ai-context-cli "https://example.com/article" --summary --model "ollama/llama3"
See .env.example for other keys (MISTRAL_API_KEY, timeouts, etc.).
pytest
ruff check .
ruff format --check .
mypy src
See CONTRIBUTING.md (layers, ports/adapters, where to put code).
Release notes are tracked in CHANGELOG.md.
MIT — see LICENSE.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 16 Apr 2026 | 14 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 10:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:81820210754fcfe9cb4b660cdf7979cb1f5e09b02da769d1b75151ddf6a5f840