https://github.com/sourcebot-dev/sourcebot
Blazingly fast code search ποΈ Deployed as a single Docker image π¦ Search million+ lines of code in your GitHub, GitLab, and Gitea repositories πͺ MIT licensed β
https://github.com/sourcebot-dev/sourcebot
Last synced: 29 days ago
JSON representation
Blazingly fast code search ποΈ Deployed as a single Docker image π¦ Search million+ lines of code in your GitHub, GitLab, and Gitea repositories πͺ MIT licensed β
- Host: GitHub
- URL: https://github.com/sourcebot-dev/sourcebot
- Owner: sourcebot-dev
- License: mit
- Created: 2024-08-23T20:40:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-24T00:27:13.000Z (about 1 year ago)
- Last Synced: 2024-10-24T09:12:03.039Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 3.81 MB
- Stars: 974
- Watchers: 7
- Forks: 24
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-repositories - sourcebot-dev/sourcebot - Sourcebot is a self-hosted tool that helps you understand your codebase. (TypeScript)
- awesome - sourcebot-dev/sourcebot - Sourcebot is a self-hosted tool that helps you understand your codebase. (TypeScript)
- my-awesome-github-stars - sourcebot-dev/sourcebot - Sourcebot is a self-hosted tool that helps you understand your codebase. (TypeScript)
- metorial-index - Sourcebot Code Search Server - Enables regex-based code search across multiple code hosts such as GitHub, GitLab, and BitBucket to retrieve relevant code snippets and repository information. Provides LLM agents with enhanced context for improved reasoning and response quality without requiring local repository checkouts. (APIs and HTTP Requests)
- toolsdk-mcp-registry - β @sourcebot/mcp
README

Sourcebot is a self-hosted tool that helps you understand your codebase.
- **Ask Sourcebot:** Ask questions about your codebase and have Sourcebot provide detailed answers grounded with inline citations.
- **Code search:** Search and navigate across all your repos and branches, no matter where theyβre hosted.
Try it out in our [public demo](https://demo.sourcebot.dev)!
https://github.com/user-attachments/assets/ed66a622-e38f-4947-a531-86df1e1e0218
# Features

## Ask Sourcebot
Ask Sourcebot gives you the ability to ask complex questions about your codebase in natural language.
It uses Sourcebot's existing code search and navigation tools to allow reasoning models to search your code, follow code nav references, and provide an answer that's rich with inline citations and navigable code snippets.
https://github.com/user-attachments/assets/8212cd16-683f-468f-8ea5-67455c0931e2
## Code Search
Search across all your repos/branches across any code host platform. Blazingly fast, and supports regular expressions, repo/language search filters, boolean logic, and more.
https://github.com/user-attachments/assets/3b381452-d329-4949-b6f2-2fc38952e481
## Code Navigation
IDE-level code navigation (goto definition and find references) across all your repos.
https://github.com/user-attachments/assets/e2da2829-71cc-40af-98b4-7ba52e945530
## Built-in File Explorer
Explore every file across all of your repos. Modern UI with syntax highlighting, file tree, code navigation, etc.
https://github.com/user-attachments/assets/31ec0669-707d-4e03-b511-1bc33d44197a
# Deploy Sourcebot
Sourcebot can be deployed in seconds using our official docker image. Visit our [docs](https://docs.sourcebot.dev/docs/deployment-guide) for more information.
1. Create a config
```sh
touch config.json
echo '{
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
"connections": {
// Comments are supported
"starter-connection": {
"type": "github",
"repos": [
"sourcebot-dev/sourcebot"
]
}
}
}' > config.json
```
2. Run the docker container
```sh
docker run \
-p 3000:3000 \
--pull=always \
--rm \
-v $(pwd):/data \
-e CONFIG_PATH=/data/config.json \
--name sourcebot \
ghcr.io/sourcebot-dev/sourcebot:latest
```
What does this command do?
- Pull and run the Sourcebot docker image from [ghcr.io/sourcebot-dev/sourcebot:latest](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot).
- Mount the current directory (`-v $(pwd):/data`) to allow Sourcebot to persist the `.sourcebot` cache.
- Clones sourcebot at `HEAD` into `.sourcebot/github/sourcebot-dev/sourcebot`.
- Indexes sourcebot into a .zoekt index file in `.sourcebot/index/`.
- Map port 3000 between your machine and the docker image.
- Starts the web server on port 3000.
3. Visit `http://localhost:3000` to start using Sourcebot
To configure Sourcebot (index your own repos, connect your LLMs, etc), check out our [docs](https://docs.sourcebot.dev/docs/configuration/config-file).
> [!NOTE]
> Sourcebot collects anonymous usage data by default to help us improve the product. No sensitive data is collected, but if you'd like to disable this you can do so by setting the `SOURCEBOT_TELEMETRY_DISABLED` environment
> variable to `true`. Please refer to our [telemetry docs](https://docs.sourcebot.dev/self-hosting/overview#telemetry) for more information.
# Build from source
>[!NOTE]
> Building from source is only required if you'd like to contribute. If you'd just like to use Sourcebot, we recommend checking out our self-hosting [docs](https://docs.sourcebot.dev/self-hosting/overview).
If you'd like to build from source, please checkout the `CONTRIBUTING.md` file for more information.