{"id":19852632,"url":"https://github.com/eeroel/hae","last_synced_at":"2025-05-02T00:31:25.501Z","repository":{"id":215916553,"uuid":"738256292","full_name":"eeroel/hae","owner":"eeroel","description":"Like grep but with natural language queries","archived":false,"fork":false,"pushed_at":"2024-01-20T07:34:08.000Z","size":343,"stargazers_count":49,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T20:23:59.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eeroel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-02T20:01:20.000Z","updated_at":"2025-01-15T18:03:53.000Z","dependencies_parsed_at":"2024-01-16T09:25:00.922Z","dependency_job_id":"cb2d8abf-f9f5-4d34-94d6-3af566c940f6","html_url":"https://github.com/eeroel/hae","commit_stats":null,"previous_names":["eeroel/hae"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeroel%2Fhae","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeroel%2Fhae/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeroel%2Fhae/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeroel%2Fhae/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eeroel","download_url":"https://codeload.github.com/eeroel/hae/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251966431,"owners_count":21672666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T14:03:45.527Z","updated_at":"2025-05-02T00:31:20.492Z","avatar_url":"https://github.com/eeroel.png","language":"C++","funding_links":[],"categories":["\u003ca name=\"text-search\"\u003e\u003c/a\u003eText search (alternatives to grep)"],"sub_categories":[],"readme":"# hae\n\nA command line tool for semantic search over text input.\n\nExample:\n```\n~\u003e man ls | hae \"how to show file sizes\" -n 1 -hl\n   The Long Format\n     If the -l option is given, the following information is displayed for\n     each file: file mode, number of links, owner name, group name, number of\n     bytes in the file, abbreviated month, day-of-month file was last\n     modified, hour file last modified, minute file last modified, and the\n     pathname.\n```\n\n`hae` is best suited for use cases where your input text contains up to thousands of paragraphs. Try it with some text on the clipboard, an RSS feed converted to JSON, or with a cup of coffee ☕ and a nice book 📖 from Project Gutenberg!\n\n_Disclaimer: `hae` is experimental software intended primarily for interactive use, and should not be considered ready for production applications._\n\n## Features\n- Highlights best-matching sentences, which makes it easy to quickly evaluate the results.\n- Optional JSON input and output. Input is automatically interpreted as JSON if it is in the \"JSON lines\" format, one object per line, and each object contains a field `content`. If a `title` field is present, it will also be used for the search.\n\n## Installation\nFor Linux and Apple Silicon Macs you can download a prebuilt binary. You can also build from source as described below.\n\n### Build from source\nThe repo contains a build script that also downloads the SentenceTransformers embedding model and converts it to ONNX format using Python libraries. So you will need some tools installed.\n\n- cmake (tested to work with 3.28.1)\n- clang\n- rust (tested to work with 1.75.0, required for Tokenizers dependency)\n- wget (for fetching ONNX runtime and model files)\n- xxd (for embedding model files in headers)\n- jq (for preprocessing the tokenizer config file)\n- Python (3.10)\n\nThe build steps are as follows:\n- First fetch the git submodules: `git submodule update --init --recursive --depth=1`.\n- Then run the build:\n`./build.sh $ARCH` where `$ARCH` is one of the following: osx-arm64, linux-x64, osx-x86_64\n\nThe application and the ONNX runtime dynamic library required to run it will be found under `./dist`.\n\n\n## Acknowledgements\n- This project is only possible thanks to SentenceTransformers https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2\n- ONNX Runtime for efficient CPU inferencing https://onnxruntime.ai/\n- HuggingFace Tokenizers via a C++ wrapper https://github.com/mlc-ai/tokenizers-cpp\n- https://github.com/p-ranav/argparse for creating the CLI\n- https://rapidjson.org/ for JSON I/O\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeroel%2Fhae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feeroel%2Fhae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeroel%2Fhae/lists"}