mix exograph.search (exograph v0.1.0)

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 - only postgres is supported (default: postgres)
  • --repo - Ecto repo module for the Postgres backend
  • --prefix - Exograph table prefix for the Postgres backend (default: exograph)
  • --migrate - create/upgrade Postgres tables and ParadeDB BM25 index
  • --no-bm25 - skip ParadeDB pg_search extension/index creation during migration
  • --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