GithubHelp home page GithubHelp logo

victorlin0208 / codesearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nairb774/codesearch

0.0 1.0 0.0 218 KB

Fast, indexed regexp search over large file trees

Home Page: http://swtch.com/~rsc/regexp/regexp4.html

License: BSD 3-Clause "New" or "Revised" License

Go 99.16% Shell 0.84%

codesearch's Introduction

Codesearch As A Service

This is a set of changes built on top of the code found in the https://github.com/google/codesearch repository to turn what was local indexing and search tools into a service.

Getting Started

Right now things are in a rough state of implementation, with likely poor debugability and rough corners. To get started you will need to do something like the following:

$ go build ./cmd/cindex-git ./cmd/cindex-serve ./cmd/csearch-ui
# Default cache size is 64MiB - might want to make it bigger if a lot of content
# is indexed.
$ ./cindex-serve -port 8801 -cache_size $$((64*1024*1024))
# Now to index some stuff. `-repo` is alocal git repo used for cloning and
# speeding up incremental indexing. `-url` is where to fetch the repo for
# indexing from. `-ref` is the full repository ref to index.
$ ./cindex-git -repo ~/index-repo -url [email protected]:nairb774/codesearch -ref refs/heads/master
# Repeat as many times as needed, configure a cron, ...
# Start the UI to actually search:
$ ./csearch-ui -port 8800
# Visit http://localhost:8800 to search.

Index data is stored under os.UserConfigDir()/codesearch which differs per OS. See index2/paths.go for details.

Warnings

The system can handle indexing the Linux Kernel, Kubernetes and other large "mono-repos" concurrently, but getting the system to "perform" and not trigger errors may not be trivial at this point without knowledge of internal details.

The current UI has no security protections. It is entirely possible that someone could exfiltrate all of the code indexed on your machine. Run with care.

codesearch's People

Contributors

nairb774 avatar rsc avatar dgryski avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.