mix exograph.search (exograph v0.8.1)

Copy Markdown View Source

Searches Elixir source files with Exograph.

mix exograph.search 'Repo.get!(_, _)' --repo MyApp.Repo --migrate
mix exograph.search 'def _ do ... end' lib --repo MyApp.Repo --contains 'Repo.transaction(_)'
mix exograph.search 'def _ do ... end' lib --repo MyApp.Repo --contains 'Repo.transaction(_)' --not-contains 'IO.inspect(_)'
mix exograph.search '/users/:id' lib --text
mix exograph.search 'Repo\.get!\(' lib --regex

Options

  • --backend - duckdb (default) or postgres
  • --repo - Ecto repo module for the selected backend
  • --prefix - Exograph table prefix (default: exograph)
  • --migrate - create/upgrade backend tables and text indexes
  • --no-bm25 - skip BM25/full-text index creation during migration/finalization
  • --quackdb-uri - QuackDB URI for the DuckDB backend when --repo is omitted
  • --quackdb-token - QuackDB token for the DuckDB backend
  • --duckdb-database - managed DuckDB database path when --quackdb-uri is omitted
  • --duckdb-threads - DuckDB execution threads for indexing/query setup
  • --postgres-maintenance-work-mem - session-local maintenance_work_mem during Postgres index builds
  • --postgres-max-parallel-maintenance-workers - session-local max_parallel_maintenance_workers during Postgres index builds
  • --postgres-unlogged - use UNLOGGED Postgres tables for rebuildable local indexes
  • --postgres-defer-indexes - build non-unique Postgres query indexes after indexing
  • --postgres-copy - use Postgres COPY for supported high-volume append tables
  • --min-mass - minimum AST fragment mass (default: 8)
  • --limit - maximum results (default: 20)
  • --contains - require descendant pattern, can be repeated
  • --not-contains - reject descendant pattern, can be repeated; verifier-only
  • --no-verify - skip final ExAST verification
  • --json - print JSON results
  • --text - literal source text search instead of AST query
  • --regex - regex source text search instead of AST query