mix exograph.index

Index Elixir source files into DuckDB through QuackDB.

mix exograph.index --migrate lib
mix exograph.index --migrate lib test
mix exograph.index --prefix myindex --migrate --stats lib
OptionDefaultDescription
--repoQuackDB-backed Ecto repo module
--prefixexographTable prefix
--migratefalseRun DuckDB migrations before indexing
--no-bm25falseSkip DuckDB BM25/FTS index creation
--min-mass8Minimum AST fragment mass
--statsfalsePrint fragment statistics after indexing
--jsonfalsePrint summary as JSON
--quackdb-uriQUACKDB_URIQuackDB URI when no repo is provided
--quackdb-tokenQUACKDB_TOKENQuackDB token
--duckdb-databaseexograph.duckdbManaged DuckDB database path when no QuackDB URI is provided

Structural, text, or regex search from the CLI.

mix exograph.search 'Repo.get!(_, _)' --migrate lib
mix exograph.search '/users/:id' --text lib
mix exograph.search 'Repo\.get!\(' --regex lib
OptionDefaultDescription
--repoQuackDB-backed Ecto repo module
--prefixexographTable prefix
--migratefalseRun DuckDB migrations before searching
--no-bm25falseSkip DuckDB BM25/FTS index creation
--min-mass8Minimum AST fragment mass
--limit / -n20Maximum results
--containsRequire descendant pattern (repeatable)
--not-containsReject descendant pattern (repeatable)
--no-verifyfalseSkip ExAST verification
--textfalseLiteral text search
--regexfalseRegex text search
--jsonfalsePrint results as JSON
--quackdb-uriQUACKDB_URIQuackDB URI when no repo is provided
--quackdb-tokenQUACKDB_TOKENQuackDB token
--duckdb-databaseexograph.duckdbManaged DuckDB database path when no QuackDB URI is provided

Structural search with predicates:

mix exograph.search 'def _ do ... end' \
  --migrate lib \
  --contains 'Repo.transaction(_)' \
  --not-contains 'IO.inspect(_)'

mix exograph.index.hex

Download and index Hex.pm packages in a streaming DuckDB pipeline.

mix exograph.index.hex
mix exograph.index.hex --mode top --limit 5000
mix exograph.index.hex --mode latest --duckdb-shards 4 --duckdb-threads 1 --prefix hex
mix exograph.index.hex --mode latest --web --port 4200
OptionDefaultDescription
--modelatestlatest, top, or all
--limitMax packages to index
--prefixhexTable prefix
--concurrency4Parallel download+index workers
--duckdb-shards1DuckDB shard count for corpus indexing
--duckdb-threadsDuckDB execution threads per server/shard
--duckdb-recovery-modeManaged DuckDB recovery mode; use no_wal_writes for rebuildable indexes
--manifest-pathWrite sharded DuckDB manifest ETF
--shard-dirsystem tempDirectory for managed DuckDB shard files
--min-mass8Minimum AST fragment mass
--reachfalseInclude Reach call graph extraction
--forcefalseRe-index already-indexed packages
--no-bm25falseSkip DuckDB BM25/FTS index creation
--mirrorhttps://repo.hex.pmTarball mirror URL (repeatable, round-robin)
--registry-urlfirst --mirror valueHex registry URL for versions, latest, and all modes
--api-urlhttps://hex.pm/api/packagesHex package API URL for top mode
--cache-tarballsDirectory to cache downloaded tarballs
--quackdb-uriQUACKDB_URIQuackDB URI for single DuckDB indexing
--quackdb-tokenQUACKDB_TOKENQuackDB token
--duckdb-databasehex.duckdbManaged DuckDB database path when no QuackDB URI is provided
--repoQuackDB-backed Ecto repo module
--timeout300Per-package timeout in seconds
--webfalseStart web UI with live progress dashboard
--port4200Web UI port (requires --web)

When --web is set, the progress dashboard is available at /progress during indexing. The process keeps running after indexing completes so the web UI remains accessible.

Already-indexed packages (by name+version) are skipped unless --force is given. Peak disk usage is proportional to --concurrency, not total package count.

mix exograph.web

Start a standalone web interface for exploring an index.

mix exograph.web --prefix exograph --port 4200
mix exograph.web --manifest-path priv/exograph/hex.etf --port 4200
OptionDefaultDescription
--repoQuackDB-backed Ecto repo module
--prefixexographTable prefix
--port4200HTTP port
--quackdb-uriQUACKDB_URIQuackDB URI
--quackdb-tokenQUACKDB_TOKENQuackDB token
--duckdb-databaseexograph.duckdbManaged DuckDB database path
--manifest-pathSharded DuckDB manifest path

Requires optional dependencies: phoenix, phoenix_live_view, volt, bandit. See Web UI for editor features, search modes, and API details.

Release artifacts

Use ReleaseKit directly to produce the OTP release tarball and ETF manifest:

MIX_ENV=prod mix release_kit.artifact --out-dir _build/prod/artifacts

Exograph configures ReleaseKit's assets: [volt: ...] pipeline, so the command installs locked frontend packages, builds Tailwind and Volt assets, assembles the OTP release, and writes the typed manifest. Exograph does not wrap ReleaseKit; deployment tools such as HostKit.Recipes.OTPRelease consume the generated manifest directly:

_build/prod/artifacts/exograph-20260620-abcdef0.tar.gz
_build/prod/artifacts/exograph.etf