ix 🔍
High-signal code retrieval for humans and AI agents.
Sub-millisecond search across multi-gigabyte codebases with constant memory overhead.
⚡️ The Hero Visual (Proof of Life)
# Instant search across a massive repo
)
;
# Streaming compressed logs without OOM
🎯 The Hook
ix is a high-performance, Unix-native search engine that eliminates the linear scan bottleneck of traditional tools. By leveraging a sparse trigram index and a constant-memory streaming architecture, ix delivers sub-millisecond retrieval across multi-gigabyte codebases with guaranteed resource safety.
Engineered for the 2026 agentic workflow, it introduces the Beacon Protocol to eliminate redundant re-indexing and provide authoritative state for AI agents.
🚀 Quick Start
Installation
Build your first index
This creates a compact .ix/shard.ix file (typically <10% of source size).
💎 Features
- Universal Search: Seamlessly query
.rs,.py,.gz,.zst,.zip, and.tar.gzfiles. - Beacon Protocol: Coordination plane between CLI and Daemon. Eliminates "stale index" confusion for AI agents.
- Streaming Architecture: Search arbitrarily large files with constant memory overhead.
- Data Integrity: Per-posting-list CRC32C checksums detect silent data corruption.
- Logical Correctness: Full support for CRLF (
\r\n) and LF (\n) line endings with accurate byte offsets. - Agent-Native: First-class support for
--jsonoutput and context capping to respect LLM window limits.
🤖 Agentic Retrieval (LLM Usage)
ix follows the UTCP Schema for optimal AI agent integration:
| Command | Capability | Agent Output |
|---|---|---|
ix -c "p" |
Existence Check | Single integer (match count) |
ix -l "p" |
Location | List of unique file paths |
ix -C 3 "p" |
Contextual Retrieval | ±3 lines around every match |
ix --json "p" |
Structured Extraction | JSON Lines for machine parsing |
ix -r -U \"foo.*\\nbar\" |
Multiline | Cross-line Regex support |
🛠 Debugging & Development
For contributors and power users:
- Telemetry: Use
--statsto see retrieval performance and index efficiency. - Integrity:
ixautomatically verifies checksums during query execution. - Diagnostics:
cargo testruns the full suite, including Negative Oracle corruption tests and Resource Boundary memory tests.
🏛 Architecture
ix employs a tiered verification pipeline:
- Query Planner: Analyzes Regex/Literal and expands trigram variants.
- Sparse Lookup: Intersects posting lists from the trigram table.
- Beacon Gate: Validates authority and coordinates with the background daemon (
ixd). - Streaming Verification: Byte-level verification of candidate matches using constant-memory buffers.
📜 License & Provenance
"Stop scanning. Start finding."