How elstongun/leviathan works
Leviathan maps and indexes records into a SQLite/FTS5 file, then returns compact, cited results through its CLI or optional MCP server. The main workflow is data discovery and mapping, ingestion, indexed retrieval, card construction, and rendering. Other documented capabilities include mapping inference, record updates, browsing and lookup commands, and agent-specific MCP configuration snippets. Edges are limited to relationships visible in excerpts or explicitly documented in the README; unsampled CLI internals are not inferred.
Main entry points: main.rs Command-line app · index.rs Index and updates · query.rs Search and lookup · card.rs Result cards
Components 14
Mapping and ingestion
- Field configuration
src/config.rs - Mapping inference
src/infer.rs - Record readers
src/source.rs - Field mapping
src/fields.rs - Index and updates
src/index.rs - SQLite FTS5 index
Search and results
- Search and lookup
src/query.rs - Result cards
src/card.rs - Text rendering
src/render.rs
Agent interfaces
- Command-line app
src/main.rs - MCP server
src/mcp.rs - Agent config snippets
src/wrap.rs
Shared text layer
- Text utilities
src/text.rs
Other components
- Agent or user
Connections 21
- Agent or user → Command-line app: runs commands
README.md - Command-line app → Mapping inference: infers mappings
README.md - Command-line app → Index and updates: builds or updates
README.md - Command-line app → Search and lookup: requests results
README.md - Command-line app → MCP server: starts server
README.md - Command-line app → Agent config snippets: prints setup
README.md - Mapping inference → Record readers: profiles records
src/infer.rs - Mapping inference → Field configuration: proposes mapping
src/infer.rs - Index and updates → Record readers: reads records
src/index.rs - Index and updates → Field configuration: uses mapping
src/index.rs - Index and updates → Field mapping: maps records
src/index.rs - Index and updates → SQLite FTS5 index: writes index
README.md - Search and lookup → SQLite FTS5 index: searches index
README.md - Search and lookup → Result cards: builds results
src/query.rs - Text rendering → Result cards: renders cards
src/render.rs - MCP server → Search and lookup: serves queries
src/mcp.rs - MCP server → Text rendering: formats responses
src/mcp.rs - Agent config snippets → MCP server: configures launch
src/wrap.rs - Field mapping → Text utilities: normalizes values
src/fields.rs - Result cards → Field mapping: extracts display fields
src/card.rs - Result cards → Text utilities: truncates snippets
src/card.rs