DEV Community

mahesh_attarde
mahesh_attarde

Posted on

Code Search and Navigation with livegrep

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
Enter fullscreen mode Exit fullscreen mode
  • Create Network
docker network create livegrep
Enter fullscreen mode Exit fullscreen mode
  • 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
Enter fullscreen mode Exit fullscreen mode
  • 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
Enter fullscreen mode Exit fullscreen mode
  • Using It

    1. Connect to "0.0.0.0:8910" of web application
    2. Search for Code literal
  • Best Parts

    1. LIVE GREPPING! Grep Works as you type. faster than egrep,grep
    2. Click on Search, it takes you to github file with anchor! :D

HTH!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more