Show HN: Cupertino – Offline Apple docs for AI agents (22K pages, MCP, Swift) (github.com)

🤖 AI Summary
Cupertino is a new Swift-based tool that crawls, indexes, and serves Apple developer documentation locally for AI agents via the Model Context Protocol (MCP). It grabs Apple Developer docs, Swift.org pages, Swift Evolution proposals and package metadata, converts JS-rendered HTML to Markdown, and builds a fast SQLite FTS5 index with BM25 ranking. The project ships pre-indexed catalogs (Swift packages, sample code) and can provide offline access to ~22,000 pages across 261 frameworks (index ~160MB, full docs ~2–3GB). It’s designed to run on macOS 15+, Swift 6.2+/Xcode 16+, and serves results to agents like Claude Desktop over MCP (stdio/JSON-RPC), exposing resources as apple-docs:// and swift-evolution:// URIs. For AI/ML practitioners and tool builders, Cupertino matters because it reduces hallucinations and network dependence by giving agents deterministic, up-to-date API context locally. Key technical points: sub-100ms search queries, Porter stemming, snippet generation, framework filtering, resumable crawls, change detection, and respectful crawling (0.5s default delay) — a full crawl can take ~20–24 hours initially. The codebase uses strict Swift concurrency (actors, Sendable), clear dependency injection, and separates crawling → indexing → serving phases. Typical workflow is cupertino fetch → cupertino save → cupertino serve, enabling local, inspectable, reproducible documentation tooling for AI-assisted development on Apple platforms.
Loading comments...
loading comments...