Code Search and Navigation with livegrep
mahesh_attarde
Posted on March 10, 2023
Using Code Search : Livegrep
After trying out bunch of indexing (tag) tools production/command-line, one that index git repo, uses ngram, has web frontend, includes docker setup. It is code search that just works!
(Original Github) [https://github.com/livegrep/livegrep]
This are instructions to run source indexer
- Go to Source Directory
- Clone repo and output index file with idx suffx current directory, mouted as data on container
docker run -v ${PWD}:/data ghcr.io/livegrep/livegrep/indexer /livegrep/bin/livegrep-github-reindex -repo doxygen/doxygen -http -dir /data
- Create Network
docker network create livegrep
- Create backend process load it with idx file and accept RPC call at grpc
docker run -d --rm -v ${PWD}:/data --network livegrep --name livegrep-backend ghcr.io/livegrep/livegrep/base /livegrep/bin/codesearch -load_index /data/livegrep.idx -grpc 0.0.0.0:9999
- Connect web app and backend process and publish web application
docker run -d --rm --network livegrep --publish 8910:8910 ghcr.io/livegrep/livegrep/base /livegrep/bin/livegrep -docroot /livegrep/web -listen 0.0.0.0:8910 --connect livegrep-backend:9999
-
Using It
- Connect to "0.0.0.0:8910" of web application
- Search for Code literal
-
Best Parts
- LIVE GREPPING! Grep Works as you type. faster than egrep,grep
- Click on Search, it takes you to github file with anchor! :D
HTH!
💖 💪 🙅 🚩
mahesh_attarde
Posted on March 10, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.