跳到正文

正在自动登录…

← 返回项目列表

elstongun/leviathan

全文索引AI代理检索

Leviathan 是一个将大型数据集(如 JSONL、CSV、SQLite 等)转换为排名全文索引的单一静态二进制工具,供 AI 代理以自然语言查询并获取简洁、带引用的结果卡片,显著减少 token 消耗。适用于需要高效检索大规模记录(如工单、日志)的 AI 代理开发者。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/16 23:36:40 · 查看原文

值得看Rust应用与服务
累计 Stars
848
当前热度
未达当前门槛
仓库创建时间
打开 GitHub ↗

选用指南

AI 根据 README 整理 · 2026/10/16 23:36:40

适用场景

适用于将大型数据集(如工单、日志)索引后供 AI 代理查询,支持分组、过滤、时间范围等条件。

查看 README 依据
[docs/BENCHMARKS.md](docs/BENCHMARKS.md). ## Quickstart ```bash cargo install leviathan-index # or: cargo install --git https://github.com/elstongun/leviathan cd examples/tickets && leviathan index leviathan search -g acme "sso login loop after password reset" ``` ```text leviathan search · customer C-ACME "Acme Corp" (7 tickets) · query "sso login loop after password reset" · shown 3 of 3 · 24 tickets indexed [1] T-1001 · 2024-01-08 09:12 · rel 16.9 Login loops back to sign-in page after password reset status: closed · priority: high
resolution: Cleared stale session cookies on password reset; shipped in 4.2.1. Workaround: clear site data. match: Users who reset their password get redirected to the sign-in page again in an endless loop. ... ``` - `-g` accepts a key, name or partial name. Ambiguous or unknown groups list candidates and exit 3, never guess. - No match in the group falls back to other groups, labeled `OTHER CUSTOMER`. - Combine `--where field=value`, `--since`/`--until`, `"phrases"` and `-exclusions`.
使用方式

通过命令行使用,支持 init、index、search 等命令,也可作为 MCP 服务器或 HTTP 服务供代理连接。

查看 README 依据
[docs/BENCHMARKS.md](docs/BENCHMARKS.md). ## Quickstart ```bash cargo install leviathan-index # or: cargo install --git https://github.com/elstongun/leviathan cd examples/tickets && leviathan index leviathan search -g acme "sso login loop after password reset" ``` ```text leviathan search · customer C-ACME "Acme Corp" (7 tickets) · query "sso login loop after password reset" · shown 3 of 3 · 24 tickets indexed [1] T-1001 · 2024-01-08 09:12 · rel 16.9 Login loops back to sign-in page after password reset status: closed · priority: high
paste it into `AGENTS.md` / `.cursor/rules`. Costs 0 tokens until used. [`skills/leviathan-memory`](skills/leviathan-memory/SKILL.md) does the same for memory. **MCP (optional):** `leviathan mcp` serves four read-only stdio tools (`search`, `resolve_group`, `get`, `describe`) whose descriptions include a summary of your dataset (~640 tokens per session). `leviathan wrap <agent>` prints the config for 24 agents (Claude Code, Codex, Cursor, VS Code / Copilot, Gemini CLI, Windsurf, Cline, Zed, JetBrains and more) and `--apply` writes it; `leviathan wrap` lists them all
部署要求

需要 Rust 1.88 或更高版本进行安装,但预编译二进制无运行时依赖。

查看 README 依据
<img src="https://img.shields.io/badge/rust-1.88%2B-orange.svg" alt="Rust 1.88+"> <img src="https://img.shields.io/badge/MCP-optional-0B7A75.svg" alt="MCP optional"> </p> Leviathan is a single binary that turns records (JSONL, JSON, CSV/TSV, SQLite, or any database CLI's output) into a ranked full-text index. Agents ask in plain words and get short, cited result cards: ~450 tokens per answer at any dataset size, instead of grepping and reading raw history. <p align="center">
Prebuilt binaries are on [Releases](https://github.com/elstongun/leviathan/releases). No runtime dependencies; the index is one SQLite file. ## Map your data Fields are paths (`a.b`, `items[].name`); only `id` is required. | Field | Enables | |---|---| | `id` | `get`, `upsert`, `delete`, citations | | `title` / `text` | Card headline (weighted 2×) / searched text (default: all strings) | | `group` / `group_name` | `-g` scoped search, name resolution, labeled fallback | | `date` | `--since`, `--until`, `recent` | | `filters` / `display` | `--where` facets / fields shown on cards |
已知限制

作者未明确提及限制,但索引为只读,除非通过 HTTP 服务或连接,否则离线运行。

查看 README 依据
bench/.venv/bin/python bench/run_bench.py && bench/.venv/bin/python bench/report.py # ~30 min, ~4 GB ``` <p align="center"><img src="docs/assets/indexing-dark.png" alt="Index build time and size" width="80%"></p> ## Contributing, security, license See [CONTRIBUTING.md](CONTRIBUTING.md) (ranking changes need before/after benchmark numbers) and [SECURITY.md](SECURITY.md) (indexes read-only, offline unless you serve or connect over HTTP, `unsafe`-free; report privately). Licensed under [Apache-2.0](LICENSE); dependencies in [THIRD_PARTY.md](THIRD_PARTY.md).

README

正在加载 README…

收录信息

仓库创建时间
2026/10/5 16:57:44
首次达标收录
2026/10/9 12:11:18
统计更新时间
2026/10/22 19:10:50

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

值得看加权总分 4.2 / 5

新颖度
3.6
实用价值
4.7
成熟度
4.6
实质含量
4.0

由 Jev 模型根据仓库描述与 README 评估,2026/10/16 20:21:57 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/10/19 21:56:32
许可证标识
Apache-2.0
Fork 数
51
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目