mix exograph.index

Index Elixir source files into Postgres.

mix exograph.index --repo MyApp.Repo --migrate lib
mix exograph.index --repo MyApp.Repo --migrate lib test
mix exograph.index --repo MyApp.Repo --prefix myindex --migrate --stats lib
OptionDefaultDescription
--repoEcto repo module
--prefixexographTable prefix
--migratefalseRun migrations before indexing
--no-bm25falseSkip ParadeDB BM25 index creation
--min-mass8Minimum AST fragment mass
--statsfalsePrint fragment statistics after indexing
--jsonfalsePrint summary as JSON
--backendpostgresBackend (only postgres is supported)

Structural, text, or regex search from the CLI.

mix exograph.search 'Repo.get!(_, _)' --repo MyApp.Repo --migrate lib
mix exograph.search '/users/:id' --text --repo MyApp.Repo lib
mix exograph.search 'Repo\.get!\(' --regex --repo MyApp.Repo lib
OptionDefaultDescription
--repoEcto repo module
--prefixexographTable prefix
--migratefalseRun migrations before searching
--no-bm25falseSkip ParadeDB BM25 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

Structural search with predicates:

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

mix exograph.index.hex

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

mix exograph.index.hex
mix exograph.index.hex --mode top --limit 5000
mix exograph.index.hex --mode latest --concurrency 8 --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
--min-mass8Minimum AST fragment mass
--reachfalseInclude Reach call graph extraction
--forcefalseRe-index already-indexed packages
--no-bm25falseSkip ParadeDB BM25 index creation
--mirrorhttps://repo.hex.pmTarball mirror URL (repeatable, round-robin)
--cache-tarballsDirectory to cache downloaded tarballs
--database-urlEXOGRAPH_DATABASE_URLPostgres connection URL
--repoEcto repo module (uses built-in if omitted)
--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 --database-url postgres://localhost/mydb --prefix hex
OptionDefaultDescription
--repoEcto repo module (uses built-in if omitted)
--prefixexographTable prefix
--port4200HTTP port
--database-urlEXOGRAPH_DATABASE_URLPostgres connection URL

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