Skip to content

Commit 66a59b2

Browse files
authored
Merge branch 'main' into feature/gerrit-authentication
2 parents b4d007d + 1cc2381 commit 66a59b2

File tree

158 files changed

+19919
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+19919
-940
lines changed

.github/workflows/_gcp-deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
NEXT_PUBLIC_SENTRY_ENVIRONMENT=${{ vars.NEXT_PUBLIC_SENTRY_ENVIRONMENT }}
6161
NEXT_PUBLIC_SENTRY_WEBAPP_DSN=${{ vars.NEXT_PUBLIC_SENTRY_WEBAPP_DSN }}
6262
NEXT_PUBLIC_SENTRY_BACKEND_DSN=${{ vars.NEXT_PUBLIC_SENTRY_BACKEND_DSN }}
63+
NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY=${{ vars.NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY }}
64+
NEXT_PUBLIC_LANGFUSE_BASE_URL=${{ vars.NEXT_PUBLIC_LANGFUSE_BASE_URL }}
6365
SENTRY_SMUAT=${{ secrets.SENTRY_SMUAT }}
6466
SENTRY_ORG=${{ vars.SENTRY_ORG }}
6567
SENTRY_WEBAPP_PROJECT=${{ vars.SENTRY_WEBAPP_PROJECT }}

.github/workflows/deploy-demo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Demo
22

33
on:
44
push:
5-
tags: ["v*.*.*"]
5+
branches: ["main"]
66
workflow_dispatch:
77

88
jobs:

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- Introducing Ask Sourcebot - ask natural langauge about your codebase. Get back comprehensive Markdown responses with inline citations back to the code. Bring your own LLM api key. [#392](https://github.com/sourcebot-dev/sourcebot/pull/392)
12+
1013
## [4.5.3] - 2025-07-20
1114

1215
### Changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ ARG NEXT_PUBLIC_SENTRY_ENVIRONMENT
1717
ARG NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT
1818
ARG NEXT_PUBLIC_SENTRY_WEBAPP_DSN
1919
ARG NEXT_PUBLIC_SENTRY_BACKEND_DSN
20+
ARG NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY
21+
ARG NEXT_PUBLIC_LANGFUSE_BASE_URL
2022

2123
FROM node:20-alpine3.19 AS node-alpine
2224
FROM golang:1.23.4-alpine3.19 AS go-alpine
@@ -67,6 +69,10 @@ ARG NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT
6769
ENV NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT=$NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT
6870
ARG NEXT_PUBLIC_SENTRY_WEBAPP_DSN
6971
ENV NEXT_PUBLIC_SENTRY_WEBAPP_DSN=$NEXT_PUBLIC_SENTRY_WEBAPP_DSN
72+
ARG NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY
73+
ENV NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY=$NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY
74+
ARG NEXT_PUBLIC_LANGFUSE_BASE_URL
75+
ENV NEXT_PUBLIC_LANGFUSE_BASE_URL=$NEXT_PUBLIC_LANGFUSE_BASE_URL
7076

7177
# To upload source maps to Sentry, we need to set the following build-time args.
7278
# It's important that we don't set these for oss builds, otherwise the Sentry
@@ -164,6 +170,10 @@ ARG NEXT_PUBLIC_SENTRY_WEBAPP_DSN
164170
ENV NEXT_PUBLIC_SENTRY_WEBAPP_DSN=$NEXT_PUBLIC_SENTRY_WEBAPP_DSN
165171
ARG NEXT_PUBLIC_SENTRY_BACKEND_DSN
166172
ENV NEXT_PUBLIC_SENTRY_BACKEND_DSN=$NEXT_PUBLIC_SENTRY_BACKEND_DSN
173+
ARG NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY
174+
ENV NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY=$NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY
175+
ARG NEXT_PUBLIC_LANGFUSE_BASE_URL
176+
ENV NEXT_PUBLIC_LANGFUSE_BASE_URL=$NEXT_PUBLIC_LANGFUSE_BASE_URL
167177
# -----------
168178

169179
RUN echo "Sourcebot Version: $NEXT_PUBLIC_SOURCEBOT_VERSION"

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,20 @@
4444

4545
# About
4646

47-
Sourcebot lets you index all your repos and branches across multiple code hosts (GitHub, GitLab, Bitbucket, Gitea, or Gerrit) and search through them using a blazingly fast interface.
47+
Sourcebot is a self-hosted tool that helps you understand your codebase.
4848

49-
https://github.com/user-attachments/assets/ced355f3-967e-4f37-ae6e-74ab8c06b9ec
49+
- **Ask Sourcebot:** Ask questions about your codebase and have Sourcebot provide detailed answers grounded with inline citations.
50+
- **Code search:** Search and navigate across all your repos and branches, no matter where they’re hosted.
51+
52+
https://github.com/user-attachments/assets/286ad97a-a543-4eef-a2f1-4fa31bea1b32
5053

5154

5255
## Features
5356
- 💻 **One-command deployment**: Get started instantly using Docker on your own machine.
54-
- 🔍 **Multi-repo search**: Index and search through multiple public and private repositories and branches on GitHub, GitLab, Bitbucket, Gitea, or Gerrit.
55-
-**Lightning fast performance**: Built on top of the powerful [Zoekt](https://github.com/sourcegraph/zoekt) search engine.
56-
- 🎨 **Modern web app**: Enjoy a sleek interface with features like syntax highlighting, light/dark mode, and vim-style navigation
57+
- 🤖 **Bring your own model**: Connect Sourcebot to any of the reasoning models you're already using.
58+
- 🔍 **Multi-repo support**: Index and search through multiple public and private repositories and branches on GitHub, GitLab, Bitbucket, Gitea, or Gerrit.
59+
-**Lightning fast performance**: Built on top of the powerful [Zoekt](https://github.com/sourcegraph/zoekt) search engine.
60+
- 🎨 **Modern web app**: Enjoy a sleek interface with features like syntax highlighting, light/dark mode, and vim-style navigation.
5761
- 📂 **Full file visualization**: Instantly view the entire file when selecting any search result.
5862

5963
You can try out our public hosted demo [here](https://demo.sourcebot.dev)!

docs/docs.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,21 @@
2828
"group": "Features",
2929
"pages": [
3030
{
31-
"group": "Search",
31+
"group": "Code Search",
3232
"pages": [
33+
"docs/features/search/overview",
3334
"docs/features/search/syntax-reference",
3435
"docs/features/search/multi-branch-indexing",
3536
"docs/features/search/search-contexts"
3637
]
3738
},
39+
{
40+
"group": "Ask Sourcebot",
41+
"pages": [
42+
"docs/features/ask/overview",
43+
"docs/features/ask/add-model-providers"
44+
]
45+
},
3846
"docs/features/code-navigation",
3947
"docs/features/analytics",
4048
"docs/features/mcp-server",
@@ -51,6 +59,7 @@
5159
{
5260
"group": "Configuration",
5361
"pages": [
62+
"docs/configuration/config-file",
5463
{
5564
"group": "Indexing your code",
5665
"pages": [
@@ -66,8 +75,7 @@
6675
"docs/connections/request-new"
6776
]
6877
},
69-
"docs/license-key",
70-
"docs/configuration/environment-variables",
78+
"docs/configuration/language-model-providers",
7179
{
7280
"group": "Authentication",
7381
"pages": [
@@ -78,6 +86,8 @@
7886
"docs/configuration/auth/faq"
7987
]
8088
},
89+
"docs/configuration/environment-variables",
90+
"docs/license-key",
8191
"docs/configuration/transactional-emails",
8292
"docs/configuration/structured-logging",
8393
"docs/configuration/audit-logs"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Config File
3+
sidebarTitle: Config file
4+
---
5+
6+
When self-hosting Sourcebot, you **must** provide it a config file. This is done by defining a config file in a volume that's mounted to Sourcebot, and providing the path to this
7+
file in the `CONFIG_PATH` environment variable. For example:
8+
9+
```bash icon="terminal" Passing in a CONFIG_PATH to Sourcebot
10+
docker run \
11+
-v $(pwd)/config.json:/data/config.json \
12+
-e CONFIG_PATH=/data/config.json \
13+
... \ # other options
14+
ghcr.io/sourcebot-dev/sourcebot:latest
15+
```
16+
17+
The config file tells Sourcebot which repos to index, what language models to use, and various other settings as defined in the [schema](#config-file-schema).
18+
19+
# Config File Schema
20+
21+
The config file you provide Sourcebot must follow the [schema](https://github.com/sourcebot-dev/sourcebot/blob/main/schemas/v3/index.json). This schema consists of the following properties:
22+
23+
- [Connections](/docs/connections/overview) (`connections`): Defines a set of connections that tell Sourcebot which repos to index and from where
24+
- [Language Models](/docs/configuration/language-model-providers) (`models`): Defines a set of language model providers for use with [Ask Sourcebot](/docs/features/ask)
25+
- [Settings](#settings) (`settings`): Additional settings to tweak your Sourcebot deployment
26+
- [Search Contexts](/docs/features/search/search-contexts) (`contexts`): Groupings of repos that you can search against
27+
28+
# Config File Syncing
29+
30+
Sourcebot syncs the config file on startup, and automatically whenever a change is detected.
31+
32+
# Settings
33+
34+
The following are settings that can be provided in your config file to modify Sourcebot's behavior
35+
36+
| Setting | Type | Default | Minimum | Description / Notes |
37+
|-------------------------------------------|---------|------------|---------|----------------------------------------------------------------------------------------|
38+
| `maxFileSize` | number | 2 MB | 1 | Maximum size (bytes) of a file to index. Files exceeding this are skipped. |
39+
| `maxTrigramCount` | number | 20 000 | 1 | Maximum trigrams per document. Larger files are skipped. |
40+
| `reindexIntervalMs` | number | 1 hour | 1 | Interval at which all repositories are re‑indexed. |
41+
| `resyncConnectionIntervalMs` | number | 24 hours | 1 | Interval for checking connections that need re‑syncing. |
42+
| `resyncConnectionPollingIntervalMs` | number | 1 second | 1 | DB polling rate for connections that need re‑syncing. |
43+
| `reindexRepoPollingIntervalMs` | number | 1 second | 1 | DB polling rate for repos that should be re‑indexed. |
44+
| `maxConnectionSyncJobConcurrency` | number | 8 | 1 | Concurrent connection‑sync jobs. |
45+
| `maxRepoIndexingJobConcurrency` | number | 8 | 1 | Concurrent repo‑indexing jobs. |
46+
| `maxRepoGarbageCollectionJobConcurrency` | number | 8 | 1 | Concurrent repo‑garbage‑collection jobs. |
47+
| `repoGarbageCollectionGracePeriodMs` | number | 10 seconds | 1 | Grace period to avoid deleting shards while loading. |
48+
| `repoIndexTimeoutMs` | number | 2 hours | 1 | Timeout for a single repo‑indexing run. |
49+
| `enablePublicAccess` **(deprecated)** | boolean | false || Use the `FORCE_ENABLE_ANONYMOUS_ACCESS` environment variable instead. |

0 commit comments

Comments
 (0)