Skip to content

motet-a/gtsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Nov 13, 2017
7c80401 · Nov 13, 2017

History

44 Commits
Nov 13, 2017
Nov 13, 2017
Jul 8, 2017
Nov 13, 2017
Jul 17, 2017
Nov 13, 2017
Jul 8, 2017
Nov 13, 2017
Nov 13, 2017
Jul 11, 2017
Jul 12, 2017
Jul 17, 2017
Jul 17, 2017
Jul 21, 2017

Repository files navigation

gtsearch

Build Status

This is a web server and web client for GNU grep and Git repositories. It is a kind of a much simpler Hound or Livegrep, which does not require to index files.

Here is a running demo instance.

demo-gif-image

Is it slow?

Yes and no. grep on Linux is blazing fast on small repositories. Moreover, the gtsearch server streams results via WebSockets to the client in order to show the first matches instantly.

gtsearch starts one grep process per search. When some results don't fit on the client screen, the grep process is paused with kill(SIGTSTP). When the user scrolls down the result list, the server resumes the grep process with kill(SIGCONT). When the user starts a new search, the previous grep process is killed with kill(SIGTERM). It’s a bit tricky but it works.

However, grep is much slower with specific queries on very large repositories. Consider using Hound or Livegrep instead.

Regexps?

Currently no, but it’s really easy to implement since grep supports them. Please send PRs.

Deploy

docker run -d -p 8080:8080 -e GTSEARCH_ADDRESS=0.0.0.0 moteta/gtsearch:0.11

It listens on localhost by default.

Repositories and SQLite files are stored at /gs/server/var/ in the container. Feel free to create a volume.

The admin password is printed on stdout. Copy and paste it in the /login form in order to add the first repository.

That’s it.

About

Web `grep` for Git repositories

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages