diff --git a/.cursor/rules/style.mdc b/.cursor/rules/style.mdc new file mode 100644 index 00000000..6d3e8046 --- /dev/null +++ b/.cursor/rules/style.mdc @@ -0,0 +1,7 @@ +--- +description: +globs: +alwaysApply: true +--- +- Always use 4 spaces for indentation +- Filenames should always be camelCase. Exception: if there are filenames in the same directory with a format other than camelCase, use that format to keep things consistent. \ No newline at end of file diff --git a/.env.development b/.env.development index ae6fdbb3..1c90cd01 100644 --- a/.env.development +++ b/.env.development @@ -18,10 +18,13 @@ SRC_TENANT_ENFORCEMENT_MODE=strict AUTH_SECRET="00000000000000000000000000000000000000000000" AUTH_URL="http://localhost:3000" # AUTH_CREDENTIALS_LOGIN_ENABLED=true -# AUTH_GITHUB_CLIENT_ID="" -# AUTH_GITHUB_CLIENT_SECRET="" -# AUTH_GOOGLE_CLIENT_ID="" -# AUTH_GOOGLE_CLIENT_SECRET="" +# AUTH_EE_GITHUB_CLIENT_ID="" +# AUTH_EE_GITHUB_CLIENT_SECRET="" +# AUTH_EE_GOOGLE_CLIENT_ID="" +# AUTH_EE_GOOGLE_CLIENT_SECRET="" + +DATA_CACHE_DIR=${PWD}/.sourcebot # Path to the sourcebot cache dir (ex. ~/sourcebot/.sourcebot) +# CONFIG_PATH=${PWD}/config.json # Path to the sourcebot config file (if one exists) # Email # EMAIL_FROM_ADDRESS="" # The from address for transactional emails. @@ -51,6 +54,16 @@ REDIS_URL="redis://localhost:6379" # STRIPE_WEBHOOK_SECRET: z.string().optional(), # STRIPE_ENABLE_TEST_CLOCKS=false +# Agents + +# GITHUB_APP_ID= +# GITHUB_APP_PRIVATE_KEY_PATH= +# GITHUB_APP_WEBHOOK_SECRET= +# OPENAI_API_KEY= +REVIEW_AGENT_LOGGING_ENABLED=true +REVIEW_AGENT_AUTO_REVIEW_ENABLED=false +REVIEW_AGENT_REVIEW_COMMAND=review + # Misc # Generated using: @@ -78,4 +91,4 @@ SOURCEBOT_TELEMETRY_DISABLED=true # Disables telemetry collection # NODE_ENV= # SOURCEBOT_TENANCY_MODE=single -# NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT= \ No newline at end of file +# NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT= diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 41fe389f..2de85ed1 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -3,7 +3,6 @@ name: Deploy Staging on: push: branches: [main] - tags: ["v*.*.*"] workflow_dispatch: jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md index 563cd010..94e94262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,85 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed +- Fixed issue where new oauth providers weren't being display in the login page + +## [4.0.1] - 2025-05-28 + +### Fixed +- Fixed issue with how entitlements are resolved for cloud. [#319](https://github.com/sourcebot-dev/sourcebot/pull/319) + +## [4.0.0] - 2025-05-28 + +Sourcebot V4 introduces authentication, performance improvements and code navigation. Checkout the [migration guide](https://docs.sourcebot.dev/self-hosting/upgrade/v3-to-v4-guide) for information on upgrading your instance to v4. + +### Changed +- [**Breaking Change**] Authentication is now required by default. Notes: + - When setting up your instance, email / password login will be the default authentication provider. + - The first user that logs into the instance is given the `owner` role. ([docs](https://docs.sourcebot.dev/docs/more/roles-and-permissions)). + - Subsequent users can request to join the instance. The `owner` can approve / deny requests to join the instance via `Settings` > `Members` > `Pending Requests`. + - If a user is approved to join the instance, they are given the `member` role. + - Additional login providers, including email links and SSO, can be configured with additional environment variables. ([docs](https://docs.sourcebot.dev/self-hosting/configuration/authentication)). +- Clicking on a search result now takes you to the `/browse` view. Files can still be previewed by clicking the "Preview" button or holding `Cmd` / `Ctrl` when clicking on a search result. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315) + +### Added +- [Sourcebot EE] Added search-based code navigation, allowing you to jump between symbol definition and references when viewing source files. [Read the documentation](https://docs.sourcebot.dev/docs/search/code-navigation). [#315](https://github.com/sourcebot-dev/sourcebot/pull/315) +- Added collapsible filter panel. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315) +- Added Sourcebot API key management for external clients. [#311](https://github.com/sourcebot-dev/sourcebot/pull/311) + +### Fixed +- Improved scroll performance for large numbers of search results. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315) + +## [3.2.1] - 2025-05-15 + +### Added +- Added support for indexing generic git hosts given a remote clone url or local path. [#307](https://github.com/sourcebot-dev/sourcebot/pull/307) + +## [3.2.0] - 2025-05-12 + +### Added +- Added AI code review agent [#298](https://github.com/sourcebot-dev/sourcebot/pull/298). Checkout the [docs](https://docs.sourcebot.dev/docs/agents/review-agent) for more information. + +### Fixed +- Fixed issue with repos appearing in the carousel when they fail indexing for the first time. [#305](https://github.com/sourcebot-dev/sourcebot/pull/305) +- Align gitea clone_url with gitea host url [#303](https://github.com/sourcebot-dev/sourcebot/pull/303) + +## [3.1.4] - 2025-05-10 + +### Fixed +- Added better error handling to git operations + +## [3.1.3] - 2025-05-07 + +### Fixed +- Fixes bug with repos not being visible in the homepage carousel when re-indexing. [#294](https://github.com/sourcebot-dev/sourcebot/pull/294) + +### Added +- Added special `*` value for `rev:` to allow searching across all branches. [#281](https://github.com/sourcebot-dev/sourcebot/pull/281) +- Added the Sourcebot Model Context Protocol (MCP) server in [packages/mcp](./packages/mcp/README.md) to allow LLMs to interface with Sourcebot. Checkout the npm package [here](https://www.npmjs.com/package/@sourcebot/mcp). [#292](https://github.com/sourcebot-dev/sourcebot/pull/292) + +## [3.1.2] - 2025-04-30 + +### Added +- Added `exclude.readOnly` and `exclude.hidden` options to Gerrit connection config. [#280](https://github.com/sourcebot-dev/sourcebot/pull/280) + +### Fixes +- Fixes regression introduced in v3.1.0 that causes auth errors with GitHub. [#288](https://github.com/sourcebot-dev/sourcebot/pull/288) + +## [3.1.1] - 2025-04-28 + +### Changed +- Changed the filter panel to embed the filter selection state in the query params. [#276](https://github.com/sourcebot-dev/sourcebot/pull/276) + +## [3.1.0] - 2025-04-25 + +### Added +- [Sourcebot EE] Added search contexts, user-defined groupings of repositories that help focus searches on specific areas of a codebase. [#273](https://github.com/sourcebot-dev/sourcebot/pull/273) +- Added support for Bitbucket Cloud and Bitbucket Data Center connections. [#275](https://github.com/sourcebot-dev/sourcebot/pull/275) + + ## [3.0.4] - 2025-04-12 ### Fixes @@ -43,8 +122,8 @@ Sourcebot v3 is here and brings a number of structural changes to the tool's fou ### Added - Added parallelized repo indexing and connection syncing via Redis & BullMQ. See the [architecture overview](https://docs.sourcebot.dev/self-hosting/overview#architecture). - Added repo indexing progress indicators in the navbar. -- Added authentication support via OAuth or email/password. For instructions on enabling, see [this doc](https://docs.sourcebot.dev/self-hosting/more/authentication). -- Added the following UI for managing your deployment when **[auth is enabled](https://docs.sourcebot.dev/self-hosting/more/authentication)**: +- Added authentication support via OAuth or email/password. For instructions on enabling, see [this doc](https://docs.sourcebot.dev/self-hosting/configuration/authentication). +- Added the following UI for managing your deployment when **[auth is enabled](https://docs.sourcebot.dev/self-hosting/configuration/authentication)**: - connection management: create and manage your JSON configs via a integrated web-editor. - secrets: import personal access tokens (PAT) into Sourcebot (AES-256 encrypted). Reference secrets in your connection config by name. - team & invite management: invite users to your instance to give them access. Configure team [roles & permissions](https://docs.sourcebot.dev/docs/more/roles-and-permissions). diff --git a/LICENSE b/LICENSE index 83bbbcd6..04fbff3a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,10 @@ -MIT License +Copyright (c) 2025 Taqla Inc. -Copyright (c) Taqla, Inc. +Portions of this software are licensed as follows: + +- All content that resides under the "ee/" and "packages/web/src/ee/" directories of this repository, if these directories exist, is licensed under the license defined in "ee/LICENSE". +- All third party components incorporated into the Sourcebot Software are licensed under the original license provided by the owner of the applicable component. +- Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index abae628d..7d8f80b6 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ ALL: $(CMDS) yarn: yarn install + yarn build:deps zoekt: mkdir -p bin @@ -13,6 +14,9 @@ zoekt: export CTAGS_COMMANDS=ctags clean: + redis-cli FLUSHALL + yarn dev:prisma:migrate:reset + rm -rf \ bin \ node_modules \ @@ -28,11 +32,14 @@ clean: packages/crypto/dist \ packages/error/node_modules \ packages/error/dist \ + packages/mcp/node_modules \ + packages/mcp/dist \ .sourcebot soft-reset: rm -rf .sourcebot redis-cli FLUSHALL + yarn dev:prisma:migrate:reset .PHONY: bin diff --git a/README.md b/README.md index 9bb3cf0a..2b9e9354 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@
@@ -48,14 +47,14 @@ # About -Sourcebot is the open source Sourcegraph alternative. Index all your repos and branches across multiple code hosts (GitHub, GitLab, Gitea, or Gerrit) and search through them using a blazingly fast interface. +Sourcebot is the open source Sourcegraph alternative. 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. https://github.com/user-attachments/assets/ced355f3-967e-4f37-ae6e-74ab8c06b9ec ## Features - 💻 **One-command deployment**: Get started instantly using Docker on your own machine. -- 🔍 **Multi-repo search**: Index and search through multiple public and private repositories and branches on GitHub, GitLab, Gitea, or Gerrit. +- 🔍 **Multi-repo search**: Index and search through multiple public and private repositories and branches on GitHub, GitLab, Bitbucket, Gitea, or Gerrit. - ⚡**Lightning fast performance**: Built on top of the powerful [Zoekt](https://github.com/sourcegraph/zoekt) search engine. - 🎨 **Modern web app**: Enjoy a sleek interface with features like syntax highlighting, light/dark mode, and vim-style navigation - 📂 **Full file visualization**: Instantly view the entire file when selecting any search result. @@ -113,7 +112,7 @@ To learn how to configure Sourcebot to index your own repos, please refer to our > [!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 `false`. Please refer to our [telemetry docs](https://docs.sourcebot.dev/self-hosting/overview#telemetry) for more information. +> variable to `true`. Please refer to our [telemetry docs](https://docs.sourcebot.dev/self-hosting/overview#telemetry) for more information. # Build from source >[!NOTE] diff --git a/demo-site-config.json b/demo-site-config.json index 169e4c93..42b8b346 100644 --- a/demo-site-config.json +++ b/demo-site-config.json @@ -1,75 +1,49 @@ +// This is the config file for https://demo.sourcebot.dev. +// To add a new repository, edit this file and open a PR. +// After the PR is merged, the deploy demo workflow will +// run (see: https://github.com/sourcebot-dev/sourcebot/actions/workflows/deploy-demo.yml), +// after which the changes will be reflected on the demo site. { - "$schema": "./schemas/v2/index.json", - "settings": { - "reindexInterval": 86400000, // 24 hours - "resyncInterval": 86400000 // 24 hours - }, - "repos": [ - { + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json", + "connections": { + // Defines the GitHub repositories. + // See: https://docs.sourcebot.dev/docs/connections/github + "github-repos": { "type": "github", "token": { "env": "GITHUB_TOKEN" }, - "exclude": { - "size": { - "max": 1000000000 // Limit to 1GB - } - }, "repos": [ "torvalds/linux", - "pytorch/pytorch", + "pytorch/pytorch", "commaai/openpilot", "ggerganov/whisper.cpp", "ggerganov/llama.cpp", "codemirror/dev", "tailwindlabs/tailwindcss", "sourcebot-dev/sourcebot", - "freeCodeCamp/freeCodeCamp", - "EbookFoundation/free-programming-books", "sindresorhus/awesome", - "public-apis/public-apis", - "codecrafters-io/build-your-own-x", - "jwasham/coding-interview-university", - "kamranahmedse/developer-roadmap", - "donnemartin/system-design-primer", - "996icu/996.ICU", "facebook/react", "vinta/awesome-python", "vuejs/vue", - "practical-tutorials/project-based-learning", - "awesome-selfhosted/awesome-selfhosted", "TheAlgorithms/Python", - "trekhleb/javascript-algorithms", "tensorflow/tensorflow", - "getify/You-Dont-Know-JS", - "CyC2018/CS-Notes", - "ohmyzsh/ohmyzsh", - "ossu/computer-science", "twbs/bootstrap", - "Significant-Gravitas/AutoGPT", "flutter/flutter", "microsoft/vscode", "github/gitignore", - "jackfrued/Python-100-Days", - "jlevy/the-art-of-command-line", - "trimstray/the-book-of-secret-knowledge", - "Snailclimb/JavaGuide", "airbnb/javascript", "AUTOMATIC1111/stable-diffusion-webui", "huggingface/transformers", "avelino/awesome-go", "ytdl-org/youtube-dl", "vercel/next.js", - "labuladong/fucking-algorithm", "golang/go", - "Chalarangelo/30-seconds-of-code", - "yangshun/tech-interview-handbook", "facebook/react-native", "electron/electron", "Genymobile/scrcpy", "f/awesome-chatgpt-prompts", "microsoft/PowerToys", - "justjavac/free-programming-books-zh_CN", "kubernetes/kubernetes", "d3/d3", "nodejs/node", @@ -90,23 +64,13 @@ "mui/material-ui", "ant-design/ant-design", "yt-dlp/yt-dlp", - "ryanmcdermott/clean-code-javascript", - "godotengine/godot", - "ripienaar/free-for-dev", - "iluwatar/java-design-patterns", "puppeteer/puppeteer", "papers-we-love/papers-we-love", - "PanJiaChen/vue-element-admin", "iptv-org/iptv", "fatedier/frp", "excalidraw/excalidraw", "tauri-apps/tauri", - "Hack-with-Github/Awesome-Hacking", - "nvbn/thefuck", - "mtdvio/every-programmer-should-know", - "storybookjs/storybook", "neovim/neovim", - "microsoft/Web-Dev-For-Beginners", "django/django", "florinpop17/app-ideas", "animate-css/animate.css", @@ -121,13 +85,11 @@ "macrozheng/mall", "jaywcjlove/awesome-mac", "tonsky/FiraCode", - "ChatGPTNextWeb/ChatGPT-Next-Web", "rustdesk/rustdesk", "tensorflow/models", "doocs/advanced-java", "shadcn-ui/ui", "gohugoio/hugo", - "MisterBooo/LeetCodeAnimation", "spring-projects/spring-boot", "supabase/supabase", "oven-sh/bun", @@ -138,17 +100,12 @@ "openai/whisper", "netdata/netdata", "vuejs/awesome-vue", - "DopplerHQ/awesome-interview-questions", "3b1b/manim", "2dust/v2rayN", "nomic-ai/gpt4all", "elastic/elasticsearch", - "anuraghazra/github-readme-stats", - "microsoft/ML-For-Beginners", - "MunGell/awesome-for-beginners", "fighting41love/funNLP", "vitejs/vite", - "thedaviddias/Front-End-Checklist", "coder/code-server", "moby/moby", "CompVis/stable-diffusion", @@ -156,13 +113,10 @@ "nestjs/nest", "pallets/flask", "hakimel/reveal.js", - "Anduin2017/HowToCook", "microsoft/playwright", "swiftlang/swift", - "Developer-Y/cs-video-courses", "redis/redis", "bregman-arie/devops-exercises", - "josephmisiti/awesome-machine-learning", "binary-husky/gpt_academic", "junegunn/fzf", "syncthing/syncthing", @@ -173,11 +127,9 @@ "microsoft/generative-ai-for-beginners", "grafana/grafana", "abi/screenshot-to-code", - "ByteByteGoHq/system-design-101", "chartjs/Chart.js", "webpack/webpack", "d2l-ai/d2l-zh", - "sdmg15/Best-websites-a-programmer-should-visit", "strapi/strapi", "python/cpython", "leonardomso/33-js-concepts", @@ -187,9 +139,7 @@ "apache/superset", "tesseract-ocr/tesseract", "lydiahallie/javascript-questions", - "xtekky/gpt4free", "FuelLabs/sway", - "twitter/the-algorithm", "keras-team/keras", "resume/resume.github.com", "swisskyrepo/PayloadsAllTheThings", @@ -214,7 +164,6 @@ "rust-unofficial/awesome-rust", "streamich/react-use", "pocketbase/pocketbase", - "serhii-londar/open-source-mac-os-apps", "lllyasviel/Fooocus", "k88hudson/git-flight-rules", "react-hook-form/react-hook-form", @@ -275,23 +224,21 @@ "eslint/eslint", "nextauthjs/next-auth", "flameshot-org/flameshot", - "envoyproxy/envoy" + "envoyproxy/envoy", + "sourcebot-dev/zoekt" ] }, - { + // Defines the GitLab repositories. + // See: https://docs.sourcebot.dev/docs/connections/gitlab + "gitlab-repos": { "type": "gitlab", - "token": { - "env": "GITLAB_TOKEN" - }, - "groups": [ - "fdroid" - ], - "exclude": { - "projects": [ - "fdroid/wiki", - "Matrixcoffee/internal-twif-preview" - ] - } + "projects": [ + "gnachman/iterm2" + ] } - ] -} \ No newline at end of file + }, + "settings": { + "reindexIntervalMs": 86400000, // 24 hours + "enablePublicAccess": true + } +} diff --git a/docs/docs.json b/docs/docs.json index 64358876..607deb9d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -29,17 +29,44 @@ "group": "Connecting your code", "pages": [ "docs/connections/overview", - "docs/connections/github", - "docs/connections/gitlab", - "docs/connections/gitea", - "docs/connections/gerrit", - "docs/connections/request-new" + { + "group": "Supported platforms", + "pages": [ + "docs/connections/github", + "docs/connections/gitlab", + "docs/connections/bitbucket-cloud", + "docs/connections/bitbucket-data-center", + "docs/connections/gitea", + "docs/connections/gerrit", + "docs/connections/generic-git-host", + "docs/connections/local-repos", + "docs/connections/request-new" + ] + } + ] + }, + { + "group": "Search", + "pages": [ + "docs/search/syntax-reference", + "docs/search/multi-branch-indexing", + "docs/search/code-navigation", + "docs/search/search-contexts" + ] + }, + { + "group": "Agents", + "pages": [ + "docs/agents/overview", + "docs/agents/review-agent" ] }, { "group": "More", "pages": [ - "docs/more/roles-and-permissions" + "docs/more/api-keys", + "docs/more/roles-and-permissions", + "docs/more/mcp-server" ] } ] @@ -52,16 +79,16 @@ "group": "Getting Started", "pages": [ "self-hosting/overview", - "self-hosting/configuration" + "self-hosting/license-key" ] }, { - "group": "More", + "group": "Configuration", "pages": [ - "self-hosting/more/authentication", - "self-hosting/more/tenancy", - "self-hosting/more/transactional-emails", - "self-hosting/more/declarative-config" + "self-hosting/configuration/environment-variables", + "self-hosting/configuration/authentication", + "self-hosting/configuration/transactional-emails", + "self-hosting/configuration/declarative-config" ] }, { @@ -72,6 +99,7 @@ { "group": "Upgrade", "pages": [ + "self-hosting/upgrade/v3-to-v4-guide", "self-hosting/upgrade/v2-to-v3-guide" ] } diff --git a/docs/docs/agents/overview.mdx b/docs/docs/agents/overview.mdx new file mode 100644 index 00000000..86fce12d --- /dev/null +++ b/docs/docs/agents/overview.mdx @@ -0,0 +1,17 @@ +--- +title: "Agents Overview" +sidebarTitle: "Overview" +--- + +The Sourcebot logging level. Valid values are `debug`, `info`, `warn`, `error`, in order of severity.
| -| `DATABASE_URL` | `postgresql://postgres@ localhost:5432/sourcebot` |Connection string of your Postgres database. By default, a Postgres database is automatically provisioned at startup within the container.
If you'd like to use a non-default schema, you can provide it as a parameter in the database url
| -| `REDIS_URL` | `redis://localhost:6379` |Connection string of your Redis instance. By default, a Redis database is automatically provisioned at startup within the container.
| -| `SOURCEBOT_ENCRYPTION_KEY` | - |Used to encrypt connection secrets. Generated using `openssl rand -base64 24`. Automatically generated at startup if no value is provided.
| -| `AUTH_SECRET` | - |Used to validate login session cookies. Generated using `openssl rand -base64 33`. Automatically generated at startup if no value is provided.
| -| `AUTH_URL` | - |URL of your Sourcebot deployment, e.g., `https://example.com` or `http://localhost:3000`. Required when `SOURCEBOT_AUTH_ENABLED` is `true`.
| -| `SOURCEBOT_TENANCY_MODE` | `single` |The tenancy configuration for Sourcebot. Valid values are `single` or `multi`. See [this doc](/self-hosting/more/tenancy) for more info.
| -| `SOURCEBOT_AUTH_ENABLED` | `false` |Enables/disables authentication in Sourcebot. If set to `false`, `SOURCEBOT_TENANCY_MODE` must be `single`. See [this doc](/self-hosting/more/authentication) for more info.
| -| `SOURCEBOT_TELEMETRY_DISABLED` | `false` |Enables/disables telemetry collection in Sourcebot. See [this doc](/self-hosting/security/telemetry) for more info.
| -| `DATA_DIR` | `/data` |The directory within the container to store all persistent data. Typically, this directory will be volume mapped such that data is persisted across container restarts (e.g., `docker run -v $(pwd):/data`)
| -| `DATA_CACHE_DIR` | `$DATA_DIR/.sourcebot` |The root data directory in which all data written to disk by Sourcebot will be located.
| -| `DATABASE_DATA_DIR` | `$DATA_CACHE_DIR/db` |The data directory for the default Postgres database.
| -| `REDIS_DATA_DIR` | `$DATA_CACHE_DIR/redis` |The data directory for the default Redis instance.
| - - -## Additional Features - -There are additional features that can be enabled and configured via environment variables. - -Enables/disables authentication with basic credentials. Username and passwords are stored encrypted at rest within the postgres database. Checkout the [auth docs](/self-hosting/configuration/authentication) for more info
| +| `AUTH_EMAIL_CODE_LOGIN_ENABLED` | `false` |Enables/disables authentication with a login code that's sent to a users email. `SMTP_CONNECTION_URL` and `EMAIL_FROM_ADDRESS` must also be set. Checkout the [auth docs](/self-hosting/configuration/authentication) for more info
| +| `AUTH_SECRET` | Automatically generated at startup if no value is provided. Generated using `openssl rand -base64 33` |Used to validate login session cookies
| +| `AUTH_URL` | - |URL of your Sourcebot deployment, e.g., `https://example.com` or `http://localhost:3000`.
| +| `CONFIG_PATH` | `-` |The container relative path to the declerative configuration file. See [this doc](/self-hosting/configuration/declarative-config) for more info.
| +| `DATA_CACHE_DIR` | `$DATA_DIR/.sourcebot` |The root data directory in which all data written to disk by Sourcebot will be located.
| +| `DATA_DIR` | `/data` |The directory within the container to store all persistent data. Typically, this directory will be volume mapped such that data is persisted across container restarts (e.g., `docker run -v $(pwd):/data`)
| +| `DATABASE_DATA_DIR` | `$DATA_CACHE_DIR/db` |The data directory for the default Postgres database.
| +| `DATABASE_URL` | `postgresql://postgres@ localhost:5432/sourcebot` |Connection string of your Postgres database. By default, a Postgres database is automatically provisioned at startup within the container.
If you'd like to use a non-default schema, you can provide it as a parameter in the database url
| +| `EMAIL_FROM_ADDRESS` | `-` |The email address that transactional emails will be sent from. See [this doc](/self-hosting/configuration/transactional-emails) for more info.
| +| `REDIS_DATA_DIR` | `$DATA_CACHE_DIR/redis` |The data directory for the default Redis instance.
| +| `REDIS_URL` | `redis://localhost:6379` |Connection string of your Redis instance. By default, a Redis database is automatically provisioned at startup within the container.
| +| `SHARD_MAX_MATCH_COUNT` | `10000` |The maximum shard count per query
| +| `SMTP_CONNECTION_URL` | `-` |The url to the SMTP service used for sending transactional emails. See [this doc](/self-hosting/configuration/transactional-emails) for more info.
| +| `SOURCEBOT_ENCRYPTION_KEY` | Automatically generated at startup if no value is provided. Generated using `openssl rand -base64 24` |Used to encrypt connection secrets and generate API keys.
| +| `SOURCEBOT_LOG_LEVEL` | `info` |The Sourcebot logging level. Valid values are `debug`, `info`, `warn`, `error`, in order of severity.
| +| `SOURCEBOT_TELEMETRY_DISABLED` | `false` |Enables/disables telemetry collection in Sourcebot. See [this doc](/self-hosting/security/telemetry) for more info.
| +| `TOTAL_MAX_MATCH_COUNT` | `100000` |The maximum number of matches per query
| +| `ZOEKT_MAX_WALL_TIME_MS` | `10000` |The maximum real world duration (in milliseconds) per zoekt query
| + +### Enterprise Environment Variables +| Variable | Default | Description | +| :------- | :------ | :---------- | +| `AUTH_EE_ENABLE_JIT_PROVISIONING` | `false` |Enables/disables just-in-time user provisioning for SSO providers.
| +| `AUTH_EE_GITHUB_BASE_URL` | `https://github.com` |The base URL for GitHub Enterprise SSO authentication.
| +| `AUTH_EE_GITHUB_CLIENT_ID` | `-` |The client ID for GitHub Enterprise SSO authentication.
| +| `AUTH_EE_GITHUB_CLIENT_SECRET` | `-` |The client secret for GitHub Enterprise SSO authentication.
| +| `AUTH_EE_GITLAB_BASE_URL` | `https://gitlab.com` |The base URL for GitLab Enterprise SSO authentication.
| +| `AUTH_EE_GITLAB_CLIENT_ID` | `-` |The client ID for GitLab Enterprise SSO authentication.
| +| `AUTH_EE_GITLAB_CLIENT_SECRET` | `-` |The client secret for GitLab Enterprise SSO authentication.
| +| `AUTH_EE_GOOGLE_CLIENT_ID` | `-` |The client ID for Google SSO authentication.
| +| `AUTH_EE_GOOGLE_CLIENT_SECRET` | `-` |The client secret for Google SSO authentication.
| +| `AUTH_EE_KEYCLOAK_CLIENT_ID` | `-` |The client ID for Keycloak SSO authentication.
| +| `AUTH_EE_KEYCLOAK_CLIENT_SECRET` | `-` |The client secret for Keycloak SSO authentication.
| +| `AUTH_EE_KEYCLOAK_ISSUER` | `-` |The issuer URL for Keycloak SSO authentication.
| +| `AUTH_EE_OKTA_CLIENT_ID` | `-` |The client ID for Okta SSO authentication.
| +| `AUTH_EE_OKTA_CLIENT_SECRET` | `-` |The client secret for Okta SSO authentication.
| +| `AUTH_EE_OKTA_ISSUER` | `-` |The issuer URL for Okta SSO authentication.
| + + +### Review Agent Environment Variables +| Variable | Default | Description | +| :------- | :------ | :---------- | +| `GITHUB_APP_ID` | `-` |The GitHub App ID used for review agent authentication.
| +| `GITHUB_APP_PRIVATE_KEY_PATH` | `-` |The container relative path to the private key file for the GitHub App used by the review agent.
| +| `GITHUB_APP_WEBHOOK_SECRET` | `-` |The webhook secret for the GitHub App used by the review agent.
| +| `OPENAI_API_KEY` | `-` |The OpenAI API key used by the review agent.
| +| `REVIEW_AGENT_API_KEY` | `-` |The Sourcebot API key used by the review agent.
| +| `REVIEW_AGENT_AUTO_REVIEW_ENABLED` | `false` |Enables/disables automatic code reviews by the review agent.
| +| `REVIEW_AGENT_LOGGING_ENABLED` | `true` |Enables/disables logging for the review agent. Logs are saved in `DATA_CACHE_DIR/review-agent`
| +| `REVIEW_AGENT_REVIEW_COMMAND` | `review` |The command used to trigger a code review by the review agent.
| + diff --git a/docs/self-hosting/more/tenancy.mdx b/docs/self-hosting/configuration/tenancy.mdx similarity index 90% rename from docs/self-hosting/more/tenancy.mdx rename to docs/self-hosting/configuration/tenancy.mdx index bbf3e18e..7dd2cd90 100644 --- a/docs/self-hosting/more/tenancy.mdx +++ b/docs/self-hosting/configuration/tenancy.mdx @@ -4,7 +4,7 @@ sidebarTitle: Multi tenancy ---+ {agent.description} +
++ Code navigation is not enabled for router.push(`/${domain}/settings/license`)}>your plan. +
+ + + Learn more + +No symbol selected
+ + Learn more + +- {/* hack since to make the @ symbol look more centered with the text */} - - @ - + @ {`${branchDisplayName}`}
)} @@ -66,7 +74,17 @@ export const FileHeader = ({