Awesome
AI powered Code Search for React codebases (JS/TS) by Wizi AI
We are launching our Code Search feature as an open-source project for frontend teams to enjoy instant natural language search in React (JS/TS) codebases.
Note that this is a self-hosted tool that uses Vercel, OpenAI and Pinecone. All of these tools have generous free tiers which should be more than enough for you to try Code Search. For reference, indexing a mid-sized React repo should cost $1-2 on average.
Warning This is not a production ready solution. The goal of this repo is to give a quick template for frontend teams to experiment with their own code search tools.
Setup
- Double click on the button above and open the link in a new tab.
- Note that we use Vercel to deploy and host this for your convenience instead of setting up locally.
- Now let's add 4 ENV variables.
- Generate Github Personal Access Token: https://github.com/settings/personal-access-tokens/new
- Generate OpenAI API Token: https://platform.openai.com/account/api-keys
- Generate Pinecone API Token: https://app.pinecone.io/
- Also in Pinecone, create a new index:
{name: 'wizi-ai-code-search', dimensions: 1536, metric: 'cosine', pod_type: 'P1'}
- Extract base url string under the title. Ex:
wizi-ai-code-search-7874c84.svc.us-east1-gcp.pinecone.io
. - Add this url as
PINECONE_BASE_URL
in Vercel setup. Important to addhttps://
prefix to the string, so that yourPINECONE_BASE_URL
env variable is in the similar tohttps://wizi-ai-code-search-7874c84.svc.us-east1-gcp.pinecone.io
- Hit deploy. Should take less than two minutes. Once complete, you will have a link to your app. Congrats!