Dalil (Arabic for “guide”) is a local codebase reference engine for humans and coding agents. It finds the files, symbols, relationships, tests, and history that are most useful for the task at hand.
Dalil supports Rust, JavaScript, JSX, TypeScript, TSX, Python, Ruby, Java, C#, Go, Lua, and Zig. It reads local files and Git objects without running project code, hooks, filters, repository programs, or network transports.
Install the published crate:
cargo install --locked dalilTo build a source checkout instead:
cargo build --locked --releaseRun Dalil from the Git worktree you want to understand:
dalil
dalil context --task 'fix parser cache invalidation' --changed-path src/map/cache.rs
dalil impact --revision-range 'HEAD~1..HEAD'
dalil search parser
dalil search invalidation --language rust --test exclude --json
dalil relationships definitions MapReport --json
dalil relationships callers parse
dalil traverse neighbors src/map.rs --depth 2
dalil traverse path src/cli.rs src/report.rs --direction outgoing
dalil traverse reverse-dependencies src/map.rs --depth 3
dalil explain src/map.rsPATH defaults to the current directory. Dalil discovers the enclosing Git
repository and keeps analysis inside it.
The main workflows are:
dalilordalil orientreturns a short repository briefing and reading plan.dalil mapinventories source, symbols, lexical relationships, project roots, entry points, tests, and other landmarks.dalil contextselects one task-shaped evidence bundle.dalil impactseeds the shared relationship graph from local changes, files, or symbols and ranks direct and downstream inspection targets, projects, and tests.dalil searchfinds source content, paths, and symbols. Use--language,--project,--symbol-kind,--test, or--changed-pathto narrow it;--jsonincludes typed matches, totals, omissions, and continuation state.dalil explainshows the evidence behind one recommendation.dalil relationshipsqueries definitions, references, imports, dependencies, reverse dependencies, related tests, callers, and callees. Results include stable node and relationship IDs plus lexical confidence and limitations.dalil traversewalks bounded neighbors, shortest paths, and incoming file dependencies. Use--depth,--work-limit,--limit, and--budgetto control traversal and output size; JSON reports the work and omissions.dalil historyreports churn, contributor, bug-cluster, activity, and firefighting signals.
Pass --json for typed output or --html for a standalone browser report:
dalil map --profile evidence --json > map.json
dalil --html > dalil-report.html
dalil --html --openReports go to stdout and diagnostics go to stderr, so redirection writes a clean report file.
dalil export writes a persistent evidence map under .dalil/. Use
dalil export --task 'describe the work' to append the supplied task and its
orientation, or dalil export --review for a compact snapshot intended for Git
review:
.dalil/
├── map.json
├── map.md
├── review.md
└── tasks/
└── <timestamp>-<task-slug>-<id>.md
map.json is the complete portable evidence map, and map.md is its shorter
human-readable view. Each task record preserves its original input, repository
state, and task-specific orientation. Task records may contain sensitive input;
treat them as repository files and choose deliberately whether to ignore or
commit them. review.md contains only public surface and architectural facts,
so its diff is suitable for review. Run dalil export --review --check in CI
to fail when the committed review snapshot is missing or stale.
See repository evidence bundles for refresh, freshness, sharing, and Git guidance.
The CLI calls typed operations in dalil-core. Native adapters can use the
core API, coding agents can
install the Dalil skill, and MCP
clients can run the separate dalil-mcp adapter.
