get_blast_radius and get_coupling_radar answer the two questions that decide whether a change is safe: what calls this, and what has historically broken alongside it. The graph persists between sessions and updates while you type, so the answer is not from last week's index.
A Rust server that indexes every registered repository into a persistent code graph and answers structural questions across them. A file watcher keeps a volatile overlay fresh while you edit, and the config hot-reloads without a restart.
- Blast radius, call chains and transitive dependencies for a symbol — get_blast_radius, get_call_chain, trace_dependency
- Files that historically change together — get_coupling_radar
- Orientation in an unfamiliar codebase — find_anchors, list_entry_points, explore_architecture, describe_schema
- Search by meaning with local ONNX embeddings, and a flexible ops-array graph query — semantic_search, query_graph
- Code health — find_dead_code, suggest_refactor_targets, get_coverage_summary
- Explanation and context — explain_symbol, get_context_for_prompt, get_code_snippet
- Architecture reads — navigate_to_anchor, get_layered_map, compare_modules, architectural_observations
- Git state and builds — get_file_diff, get_commit_history, get_branch_status, run_build, run_tests, run_clippy
- Maintenance — sync_state, run_enrichment, export_graph_json, get_agent_strategy, get_health, install_language_server
- A Command Center dashboard served at the root of the HTTP transport
Install the binary with the project's install script, register repositories with lain repos add, then start lain server --config ./repos.yaml. lain mcp is the single-repo stdio path and needs no repos.yaml. Semantic search wants an ONNX embedding model — the installer fetches all-MiniLM-L6-v2 with --download-model, and the docs recommend the BGE family instead.
One command — curl -fsSL https://raw.githubusercontent.com/spuentesp/lain/main/install.sh | bash
