Ingests source code files into the dllb database as MetaAST nodes and edges.
Parses source files using Metastatic, converts them to dllb documents,
and stores them as ast_node records with structural relationship edges
(contains, calls, imports).
Usage
mix dllb.ingest PATH [PATH...] [OPTIONS]Arguments
PATH-- One or more files or directories to ingest. Directories are walked recursively. Only files with recognized extensions are selected. Defaults tolib/when no paths are given.
Options
--language LANG-- Force a language for all files instead of auto-detecting from extensions. One of: elixir, erlang, python, ruby, haskell.--project-path NAME-- Project identifier stored in theproject_pathfield of every ingested node. Useful for multi-project indexes.--batch-size N-- Number of queries per batch send (default 100).--bootstrap-- Create the dllb schema (DEFINE TABLE / FIELD / INDEX) before ingesting. Safe to run repeatedly.--clean-- Delete existing ast_node records for each file before re-ingesting. Use this for a full refresh of already-ingested files.--dry-run-- Discover files and print a summary without executing any queries.--exclude PATTERN-- Glob pattern to exclude. May be repeated. Directories_build,.git,.elixir_ls,.lexical, and.dialyzerare always excluded.
Supported extensions
| Extension | Language |
|---|---|
| .ex .exs | elixir |
| .erl .hrl | erlang |
| .py | python |
| .rb | ruby |
| .hs | haskell |
Examples
Ingest a project's lib directory:
mix dllb.ingest lib/Ingest with schema bootstrap and project tag:
mix dllb.ingest lib/ --bootstrap --project-path my_appAlso ingest dependency source code:
mix dllb.ingest lib/ deps/ --bootstrap --project-path my_appRe-ingest a single file, cleaning stale data first:
mix dllb.ingest lib/my_app/parser.ex --cleanDry run to preview what would be ingested:
mix dllb.ingest lib/ deps/ --dry-runExclude test and support files:
mix dllb.ingest . --exclude "test/**" --exclude "priv/**"