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 (hhg)
Hyper hybrid grep: fast scanning + neural reranking
pip install hygrep
hhg "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
The binary name for hygrep is hhg.
First search downloads the model (~83MB, cached in ~/.cache/huggingface/).
Usage
hhg "query" [path] # Search (default: current dir)
hhg "error handling" . -n 5 # Limit to 5 results
hhg "auth" . --fast # Skip reranking (instant grep)
hhg "test" . -t py,js # Filter by file type
hhg "config" . --json # JSON output for agents/scripts
hhg info # Check installation status
hhg model # Show model info
hhg model install # Pre-download model (for CI/offline)
hhg model clean # Remove cached model
Run hhg --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/*"]
cache_dir = "~/.cache/hygrep" # Custom model cache (default: shared HF cache)
Supported Languages
Bash, C, C++, C#, Elixir, Go, Java, JavaScript, JSON, Kotlin, Lua, Mojo, PHP, Python, Ruby, Rust, Svelte, Swift, TOML, TypeScript, YAML, Zig
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hygrep-0.0.6-cp313-cp313-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: hygrep-0.0.6-cp313-cp313-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 90.7 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
706ffae7bbce0abd70923bb6697e9cafa4432d32e3c394eaf62c0b0639bf4320
|
|
| MD5 |
0f0a3ba18e7d1daca3a24a0d9302034b
|
|
| BLAKE2b-256 |
deca8a1fdbcb1b896b22a949a48595b9030ba6ad0402208750927865069f466b
|
Provenance
The following attestation bundles were made for hygrep-0.0.6-cp313-cp313-manylinux_2_17_x86_64.whl:
Publisher:
release.yml on nijaru/hygrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hygrep-0.0.6-cp313-cp313-manylinux_2_17_x86_64.whl -
Subject digest:
706ffae7bbce0abd70923bb6697e9cafa4432d32e3c394eaf62c0b0639bf4320 - Sigstore transparency entry: 739384824
- Sigstore integration time:
-
Permalink:
nijaru/hygrep@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nijaru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file hygrep-0.0.6-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: hygrep-0.0.6-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 81.1 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
123f70373ca63cab4d07847af841f377aabaf13f084164e249ba2b291788f65e
|
|
| MD5 |
4495a41f304ebdc67be8b3db901b6eec
|
|
| BLAKE2b-256 |
9817c50a65d9115a9c30b3bc545c477e2b820dd496fcef065a1392922036202b
|
Provenance
The following attestation bundles were made for hygrep-0.0.6-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on nijaru/hygrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hygrep-0.0.6-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
123f70373ca63cab4d07847af841f377aabaf13f084164e249ba2b291788f65e - Sigstore transparency entry: 739384835
- Sigstore integration time:
-
Permalink:
nijaru/hygrep@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nijaru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file hygrep-0.0.6-cp312-cp312-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: hygrep-0.0.6-cp312-cp312-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 89.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec348867d8194750198e7542b87e45950cc57dc55b0705d78a46003ed51f6ee8
|
|
| MD5 |
64427dd363b2884e3311c08ebf225fa2
|
|
| BLAKE2b-256 |
640b4dba8be50585b69fac1608a7f9828f58622e5468d0d615409aab88b9e5a9
|
Provenance
The following attestation bundles were made for hygrep-0.0.6-cp312-cp312-manylinux_2_17_x86_64.whl:
Publisher:
release.yml on nijaru/hygrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hygrep-0.0.6-cp312-cp312-manylinux_2_17_x86_64.whl -
Subject digest:
ec348867d8194750198e7542b87e45950cc57dc55b0705d78a46003ed51f6ee8 - Sigstore transparency entry: 739384837
- Sigstore integration time:
-
Permalink:
nijaru/hygrep@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nijaru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file hygrep-0.0.6-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: hygrep-0.0.6-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 81.1 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3298fe9a2f41ae1593b715d773fb0b9f72d315e03b7ffca646c540f9bc0bd0d9
|
|
| MD5 |
d144e2de93bf948c190916e0a1ebd67a
|
|
| BLAKE2b-256 |
ab6f5618218b186ffd83569164ac01e070df9d2708d0efc334d05f0f39b09872
|
Provenance
The following attestation bundles were made for hygrep-0.0.6-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
release.yml on nijaru/hygrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hygrep-0.0.6-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
3298fe9a2f41ae1593b715d773fb0b9f72d315e03b7ffca646c540f9bc0bd0d9 - Sigstore transparency entry: 739384831
- Sigstore integration time:
-
Permalink:
nijaru/hygrep@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nijaru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file hygrep-0.0.6-cp311-cp311-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: hygrep-0.0.6-cp311-cp311-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 90.7 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdb9e855cbd00f616d2fca89782702fe43faa610a591c09106774f8af05473bb
|
|
| MD5 |
2dd462339b3ed60ae591ad0c4fd512f7
|
|
| BLAKE2b-256 |
c8b7e789ba3042925c8fe6420184523eb6c88966e6c8c816f5ec82289d40d8df
|
Provenance
The following attestation bundles were made for hygrep-0.0.6-cp311-cp311-manylinux_2_17_x86_64.whl:
Publisher:
release.yml on nijaru/hygrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hygrep-0.0.6-cp311-cp311-manylinux_2_17_x86_64.whl -
Subject digest:
cdb9e855cbd00f616d2fca89782702fe43faa610a591c09106774f8af05473bb - Sigstore transparency entry: 739384836
- Sigstore integration time:
-
Permalink:
nijaru/hygrep@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nijaru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file hygrep-0.0.6-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: hygrep-0.0.6-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 81.1 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bbc25ff37d6faaacb10b03221799918109bf30a48212077bc72f0088d85ecea
|
|
| MD5 |
7caa7df438352019bbac888f31312c43
|
|
| BLAKE2b-256 |
99d342b25264e714fedfba50fdd95666e35036591360c107b48f09169a01d6a3
|
Provenance
The following attestation bundles were made for hygrep-0.0.6-cp311-cp311-macosx_11_0_arm64.whl:
Publisher:
release.yml on nijaru/hygrep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hygrep-0.0.6-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
8bbc25ff37d6faaacb10b03221799918109bf30a48212077bc72f0088d85ecea - Sigstore transparency entry: 739384821
- Sigstore integration time:
-
Permalink:
nijaru/hygrep@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nijaru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@abb5667c13f3654b892af9ea3c26fe38a2cc40a7 -
Trigger Event:
workflow_dispatch
-
Statement type: