hound-search /hound

Lightning fast code searching made easy

★ 5,897⑂ 600👁 126⑃ 281● 222▤ 9
JavaScriptMITCreated 2015-01-07
下载:2023-05 Patch2023-05-0.7.1 ↓0.7.12023-05-03
-1
日增长
5,897
stars
600
forks
126
watchers
281
prs
222
issues
9
releases

README

Hound




Hound is an extremely fast source code search engine. The core is based on this article (and code) from Russ Cox:
Regular Expression Matching with a Trigram Index. Hound itself is a static
React frontend that talks to a Go backend. The backend keeps an up-to-date index for each repository and answers searches through a minimal API. Here it is in action:

!Hound Screen Capture

 Quick Start Guide

 Building hound

0. Install go (minimum version required: 1.24) and npm

1. Clone the repository and run make.


git clone https://github.com/hound-search/hound.git
cd hound
make


The resulting binaries (hound, houndd) can be found in the .build/bin/ directory.

2. Create a config.json file and use it to list your repositories. Check out our example-config.json
   to see how to set up various types of repositories. For example, we can configure Hound to search its own source code using
   the config found in default-config.json:

json
{
    "dbpath": "db",
    "repos": {
        "Hound": {
            "url": "https://github.com/hound-search/hound.git",
            "vcs-config": {
                "ref": "main"
            }
        }
    }
}


A complete list of available config options can be found here.

3. Run the Hound server with houndd in the same directory as your config.json. You should see output similar to:


2015/03/13 09:07:42 Searcher started for statsd
2015/03/13 09:07:42 Searcher started for Hound
2015/03/13 09:07:42 All indexes built!
2015/03/13 09:07:42 running server at http://localhost:6080


4. By default, hound hosts a web ui at http://localhost:6080 . Open it in your browser, and start searching.

 Using Docker (1.14+)

0. Install docker if you don't have it. We need at least Docker = 1.14.

1. Create a config.json file and use it to list your repositories. Check out our example-config.json
   to see how to set up various types of repositories. For example, we can configure Hound to search its own source code using
   the config found in default-config.json.

 Run with image from github


docker run -d -p 6080:6080 --name hound -v $(pwd):/data ghcr.io/hound-search/hound:latest


You should be able to navigate to http://localhost:6080/ as usual.

 Build image and container yourself

0. Clone repository


git clone https://github.com/hound-search/hound.git
cd hound


1. Build the image


docker build . --tag=hound


2. Create the container


docker create -p 6080:6080 --name hound -v $(pwd):/data hound


3. Starting and stopping the container


docker start hound
docker stop hound


 Running in Production

There are no special flags to run Hound in production. You can use the --addr=:6880 flag to control the port to which the server binds.
Currently, Hound does not support TLS as most users simply run Hound behind either Apache or nginx. However, we are open to contributions to add TLS support.

 Why Another Code Search Tool?

We've used many similar tools in the past, and most of them are either too slow, too hard to config

Top issues

Latest release

2023-05 Patch v0.7.1 2023-05-03
What's Changed
 Bump the version by @dschott68 in https://github.com/hound-search/hound/pull/457


Full Changelog: https://github.com/hound-search/hound/compare/v0.7.0...v0.7.1

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON