MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot

github.com/sourcebot-dev/sourcebot @v5.0.4 sqlite

repository ↗ · DeepWiki ↗ · release v5.0.4 ↗
2,428 symbols 7,966 edges 890 files 29 documented · 1%
README

  <h3>
     <a href="https://docs.sourcebot.dev">
        <strong>Self Host</strong>
     </a> · 
     <a href="https://app.sourcebot.dev">
        <strong>Public Demo</strong>
     </a>
  </h3>







  <a href="https://docs.sourcebot.dev/"><strong>Docs</strong></a> ·
  <a href="https://github.com/sourcebot-dev/sourcebot/issues/459"><strong>Roadmap</strong></a> ·
  <a href="https://github.com/sourcebot-dev/sourcebot/issues/new?template=bug_report.yml"><strong>Report Bug</strong></a> ·
  <a href="https://github.com/sourcebot-dev/sourcebot/issues/new?template=feature_request.md"><strong>Feature Request</strong></a> ·
  <a href="https://www.sourcebot.dev/changelog"><strong>Changelog</strong></a>

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://github.com/user-attachments/assets/ed66a622-e38f-4947-a531-86df1e1e0218

Features

Sourcebot 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 Docker Compose. Visit our docs for more information.

  1. Download the docker-compose.yml file
curl -o docker-compose.yml https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml
  1. In the same directory as the docker-compose.yml file, create a configuration file. The configuration file is a JSON file that configures Sourcebot's behaviour, including what repositories to index, language model providers, auth providers, and more.
echo '{
    "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
    // Comments are supported.
    // This config creates a single connection to GitHub.com that
    // indexes the Sourcebot repository
    "connections": {
        "starter-connection": {
            "type": "github",
            "repos": [
                "sourcebot-dev/sourcebot"
            ]
        }
    }
}' > config.json
  1. Update the secrets in the docker-compose.yml and then run Sourcebot using:
docker compose up
  1. Visit http://localhost:3000 to start using Sourcebot

To configure Sourcebot (index your own repos, connect your LLMs, etc), check out our docs.

[!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 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.

If you'd like to build from source, please checkout the CONTRIBUTING.md file for more information.

Extension points exported contracts — how you extend this code

MultiSelectProps (Interface)
* Props for MultiSelect component
packages/web/src/components/ui/multi-select.tsx
GerritProjects (Interface)
(no doc)
packages/backend/src/gerrit.ts
Script (Interface)
(no doc)
packages/db/tools/scriptRunner.ts
SourcebotConfigurationSchema (Interface)
(no doc)
packages/schemas/src/v2/index.type.ts
SearchInput (Interface)
(no doc)
packages/web/tools/globToRegexpPlayground.ts
GerritProjectInfo (Interface)
(no doc)
packages/backend/src/gerrit.ts
UserProfile (Interface)
(no doc)
packages/db/tools/scripts/inject-audit-data-v2.ts
Settings (Interface)
(no doc)
packages/schemas/src/v2/index.type.ts

Core symbols most depended-on inside this repo

cn
called by 316
packages/web/src/lib/utils.ts
isServiceError
called by 218
packages/web/src/lib/utils.ts
toast
called by 178
packages/web/src/components/hooks/use-toast.ts
sew
called by 106
packages/web/src/middleware/sew.ts
captureEvent
called by 93
packages/web/src/lib/posthog.ts
withAuth
called by 82
packages/web/src/middleware/withAuth.ts
createLogger
called by 70
packages/shared/src/logger.ts
notFound
called by 70
packages/web/src/lib/serviceError.ts

Shape

Function 1,702
Interface 559
Method 108
Class 56
Enum 3

Languages

TypeScript100%

Modules by API surface

packages/web/src/features/mcp/prismaScope.ts38 symbols
packages/schemas/src/v3/index.type.ts38 symbols
packages/web/src/app/(app)/settings/workspaceAskAgent/workspaceAskAgentPage.tsx29 symbols
packages/web/src/lib/utils.ts24 symbols
packages/web/src/features/chat/utils.ts24 symbols
packages/backend/src/bitbucket.ts24 symbols
packages/web/src/ee/features/chat/components/chatThread/codeFoldingExtension.ts23 symbols
packages/web/src/features/search/ir.ts21 symbols
packages/web/src/features/mcp/prismaOAuthClientProvider.ts20 symbols
packages/web/src/ee/features/chat/mcp/prismaOAuthClientProvider.ts20 symbols
packages/web/src/app/api/(client)/client.ts20 symbols
packages/web/src/ee/features/chat/mcp/mcpToolMetadata.ts19 symbols

Dependencies from manifests, versioned

@ai-sdk/amazon-bedrock4.0.94 · 1×
@ai-sdk/anthropic3.0.70 · 1×
@ai-sdk/azure3.0.54 · 1×
@ai-sdk/deepseek2.0.29 · 1×
@ai-sdk/google3.0.64 · 1×
@ai-sdk/google-vertex4.0.111 · 1×
@ai-sdk/mcp2.0.0-beta.11 · 1×
@ai-sdk/mistral3.0.30 · 1×
@ai-sdk/openai3.0.53 · 1×
@ai-sdk/openai-compatible2.0.41 · 1×
@ai-sdk/react3.0.169 · 1×
@ai-sdk/xai3.0.83 · 1×

Datastores touched

db_nameDatabase · 1 repos
sourcebotDatabase · 1 repos

For agents

$ claude mcp add sourcebot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact