photon_platform.clerk.search

Fast fuzzy repository/file finder and ripgrep-powered content search for Clerk.

Functions

fuzzy_score(query, text) → int

Return a positive fuzzy match score (higher is better), or 0 if no match.

search_files_and_repos(query, *[, scope_path, config, ...]) → dict[str, Any]

Fuzzy-search all workspace repositories and files within scope_path.

grep_content(query, *, scope_path[, glob, ...]) → dict[str, Any]

Search file contents under scope_path using rg --json (with pure-Python fallback).

Module Contents

photon_platform.clerk.search.fuzzy_score(query: str, text: str) → int

Return a positive fuzzy match score (higher is better), or 0 if no match.

photon_platform.clerk.search.search_files_and_repos(query: str, *, scope_path: pathlib.Path | str | None = None, config: photon_platform.clerk.config.ClerkConfig | None = None, limit: int = 60) → dict[str, Any]

Fuzzy-search all workspace repositories and files within scope_path.

photon_platform.clerk.search.grep_content(query: str, *, scope_path: pathlib.Path | str, glob: str | None = None, case_sensitive: bool = False, limit: int = 120) → dict[str, Any]

Search file contents under scope_path using rg --json (with pure-Python fallback).