Note
Building from source is only required if you'd like to contribute. The recommended way to use Sourcebot is to use the pre-built docker image.
-
Install
go,
NodeJS, redis, and postgres. Note that a NodeJS version of at least
21.1.0
is required. -
Install ctags (required by zoekt)
// macOS: brew install universal-ctags // Linux: snap install universal-ctags
-
Clone the repository with submodules:
git clone --recurse-submodules https://github.com/sourcebot-dev/sourcebot.git
-
Run
make
to build zoekt and install dependencies:cd sourcebot make
The zoekt binaries and web dependencies are placed into
bin
andnode_modules
respectively. -
Create a copy of
.env.development
and name it.env.development.local
. Update the required environment variables. -
If you're using a declerative configuration file (the default behavior if you didn't enable auth), create a configuration file and update the
CONFIG_PATH
environment variable in your.env.development.local
file. -
Start Sourcebot with the command:
yarn dev
A
.sourcebot
directory will be created and zoekt will begin to index the repositories found in theconfig.json
file. -
Start searching at
http://localhost:3000
.