| .github | ||
| public | ||
| schemas | ||
| src | ||
| vendor | ||
| .dockerignore | ||
| .eslintignore | ||
| .eslintrc.json | ||
| .gitignore | ||
| .gitmodules | ||
| components.json | ||
| Dockerfile | ||
| entrypoint.sh | ||
| fly.toml | ||
| next.config.mjs | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| sample-config.json | ||
| supervisord.conf | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
| yarn.lock | ||
About
Sourcebot is a fast code indexing and search tool for your codebases. It is built ontop of the zoekt indexer, originally authored by Han-Wen Nienhuys and now maintained by Sourcegraph.
Getting Started
Using Docker
-
Create a
config.jsonfile and list the repositories you want to index. For example, if we want to index all repositories in vercel, we could use the following config:
{
"$schema": "https://raw.githubusercontent.com/TaqlaAI/sourcebot/main/schemas/zoekt-mirror.json",
"Config": [
{
"Type": "github",
"GitHubOrg": "vercel"
}
]
}
Sourcebot also supports indexing GitLab & BitBucket. Checkout the config schema for a full list of available options.
-
Generate a GitHub Personal Access Token (PAT) here. If you are indexing public repositories only, you can select the
public_reposcope, otherwise you will need thereposcope. (GitLab and BitBucket instructions are below) -
Launch the latest image from the GitHub registry:
docker run -p 3000:3000 --rm --name sourcebot -v $(pwd):/data -e GITHUB_TOKEN=<token> ghcr.io/taqlaai/sourcebot:main
Two things should happen: (1) a .sourcebot directory will be created containing the mirror repositories and indexes, and (2) you will see output similar to:
INFO spawned: 'node-server' with pid 10
INFO spawned: 'zoekt-indexserver' with pid 11
INFO spawned: 'zoekt-webserver' with pid 12
run [zoekt-mirror-github -dest /data/.sourcebot/repos -delete -org <org>]
...
INFO success: node-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO success: zoekt-indexserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
INFO success: zoekt-webserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zoekt will now index your repositories (at HEAD). By default, it will re-index existing repositories every hour, and discover new repositories every 24 hours.
- Go to
http://localhost:3000- once a index has been created, you should get results.
Building Sourcebot
TODO
GitLab
TODO
BitBucket
TODO
Todos
- Add instructions on using GitLab and BitBucket
- Add instructions on building Sourcebot locally