Skip to main content

Hybrid grep: fast scanning + neural reranking

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

hygrep

Hybrid grep: fast scanning + neural reranking

pip install hygrep
hygrep "auth logic" ./src

What it does

  • Semantic search: "auth" finds "login", "session", "token"
  • Smart context: Returns full functions/classes, not just lines
  • Fast: Parallel regex recall (~20k files/sec), then neural reranking
  • Zero indexing: Works instantly on any codebase

Install

pip install hygrep
# or
uv tool install hygrep
# or
pipx install hygrep

First search downloads the model (~83MB, cached in ./models/).

Usage

hygrep "query" [path]           # Search (default: current dir)
hygrep "error handling" . -n 5  # Limit to 5 results
hygrep "auth" . --fast          # Skip reranking (instant grep)
hygrep "test" . -t py,js        # Filter by file type
hygrep "config" . --json        # JSON output for agents/scripts
hygrep info                     # Check installation status

Run hygrep --help for all options.

Output

src/auth.py:42 [function] login (0.89)
src/session.py:15 [function] validate_token (0.76)

With --json:

[{"file": "src/auth.py", "type": "function", "name": "login", "start_line": 42, "score": 0.89, "content": "def login(user): ..."}]

Config

Optional ~/.config/hygrep/config.toml:

n = 10
color = "always"
exclude = ["*.test.js", "tests/*"]

Supported Languages

Python, JavaScript, TypeScript, Go, Rust, C, C++, Java, Ruby, C#, Mojo

How it works

Query → Parallel regex scan → Tree-sitter extraction → ONNX reranking → Results
Stage What
Recall Mojo/Python parallel scanner (~20k files/sec)
Extract Tree-sitter AST (functions, classes)
Rerank ONNX cross-encoder (mxbai-rerank-xsmall-v1)

Development

git clone https://github.com/nijaru/hygrep && cd hygrep
pixi install && pixi run build-ext && pixi run test

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hygrep-0.0.1-cp313-cp313-manylinux_2_17_x86_64.whl (86.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

hygrep-0.0.1-cp313-cp313-macosx_11_0_arm64.whl (76.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

hygrep-0.0.1-cp312-cp312-manylinux_2_17_x86_64.whl (86.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

hygrep-0.0.1-cp312-cp312-macosx_11_0_arm64.whl (76.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

hygrep-0.0.1-cp311-cp311-manylinux_2_17_x86_64.whl (86.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

hygrep-0.0.1-cp311-cp311-macosx_11_0_arm64.whl (76.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file hygrep-0.0.1-cp313-cp313-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hygrep-0.0.1-cp313-cp313-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 6de996528a5fca245c46b0823b98f9f6491ff55775cee12c244cbdcd5a705976
MD5 d272b860ffe96a5dcfb0533784b5db71
BLAKE2b-256 ef272af05cdffa4d1c0fc37114df836def07cd154baaf4d00c5034e9958ed978

See more details on using hashes here.

Provenance

The following attestation bundles were made for hygrep-0.0.1-cp313-cp313-manylinux_2_17_x86_64.whl:

Publisher: release.yml on nijaru/hygrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hygrep-0.0.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hygrep-0.0.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f9e7e8ee9d35634711c15685aa9779049ee7a5cb5cc481bd6bea94d68d75e03
MD5 ead75c0ffe7b9f83083ba7f6941d2224
BLAKE2b-256 0584361757b0f33ae8ea6aed6d4f27bbd51620e7c43c6542dc17a3010d002628

See more details on using hashes here.

Provenance

The following attestation bundles were made for hygrep-0.0.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on nijaru/hygrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hygrep-0.0.1-cp312-cp312-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hygrep-0.0.1-cp312-cp312-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 6e74835612d8cd1bdafe1aaa52be65ac13544f53331a16d1e48bb618632437d4
MD5 10af577548d5e40d33bbcd310c55af7f
BLAKE2b-256 78a5ee10a01045bc5ac9916ec298ef61f4373f04717272fa74b7ea797e4395a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for hygrep-0.0.1-cp312-cp312-manylinux_2_17_x86_64.whl:

Publisher: release.yml on nijaru/hygrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hygrep-0.0.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hygrep-0.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7acacf6cbb0548b87e9a7ea17b6e53a20c53e3adb8734f29d1bc27be84a53670
MD5 e593387b882bf41b79f12680b6e2d81d
BLAKE2b-256 6003908e7976619922300acd060e2559dbc575748a71c17b9881c2a7c4986b5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hygrep-0.0.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on nijaru/hygrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hygrep-0.0.1-cp311-cp311-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for hygrep-0.0.1-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 2eb4f747a8bfd4148496175ca0845c1fc9c105edee5cc17b74479e0a59b50d20
MD5 15f53f45ccc1c54466be844a6bf62718
BLAKE2b-256 ce09cf0bb23b34c003eb0428f09d798a4c9824c19b481472a9dca5cf65b7b9ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for hygrep-0.0.1-cp311-cp311-manylinux_2_17_x86_64.whl:

Publisher: release.yml on nijaru/hygrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hygrep-0.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hygrep-0.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d650409cb2b5a3d758c8bfb762a81f8186ff549c2d388ee598ec80e0f5a9f17
MD5 23c967a70bbc9e26f8d8451d600421aa
BLAKE2b-256 2963740b96d7437998532f7d364fd8cc450fa1a2cb049a803bf3cb756e34f381

See more details on using hashes here.

Provenance

The following attestation bundles were made for hygrep-0.0.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on nijaru/hygrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page