diff --git a/.github/workflows/ghcr-publish.yml b/.github/workflows/ghcr-publish.yml index 8460a260..ce8c9fab 100644 --- a/.github/workflows/ghcr-publish.yml +++ b/.github/workflows/ghcr-publish.yml @@ -10,7 +10,7 @@ on: env: # Use docker.io for Docker Hub if empty - REGISTRY_IMAGE: ghcr.io/taqlaai/sourcebot + REGISTRY_IMAGE: ghcr.io/sourcebot-dev/sourcebot jobs: build: diff --git a/.gitmodules b/.gitmodules index 09919c13..b6be7427 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "vendor/zoekt"] path = vendor/zoekt - url = https://github.com/TaqlaAI/zoekt + url = https://github.com/sourcebot-dev/zoekt diff --git a/README.md b/README.md index 4cd10c08..bf5c0af1 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ Blazingly fast code search 🏎️

- - - + + +

@@ -37,7 +37,7 @@ You can try out our public hosted demo [here](https://demo.sourcebot.dev/)! Get started with a single docker command: ``` -docker run -p 3000:3000 --rm --name sourcebot ghcr.io/taqlaai/sourcebot:main +docker run -p 3000:3000 --rm --name sourcebot ghcr.io/sourcebot-dev/sourcebot:main ``` Navigate to `localhost:3000` to start searching the Sourcebot repo. Want to search your own repos? Checkout how to [configure Sourcebot](#configuring-sourcebot). @@ -45,7 +45,7 @@ Navigate to `localhost:3000` to start searching the Sourcebot repo. Want to sear
What does this command do? -- Pull and run the Sourcebot docker image from [ghcr.io/taqlaai/sourcebot:main](https://github.com/taqlaai/sourcebot/pkgs/container/sourcebot). Make sure you have [docker installed](https://docs.docker.com/get-started/get-docker/). +- Pull and run the Sourcebot docker image from [ghcr.io/sourcebot-dev/sourcebot:main](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot). Make sure you have [docker installed](https://docs.docker.com/get-started/get-docker/). - Read the repos listed in [default config](./default-config.json) and start indexing them. - Map port 3000 between your machine and the docker image. - Starts the web server on port 3000. @@ -70,7 +70,7 @@ Sourcebot supports indexing and searching through public and private repositorie ```sh touch my_config.json echo '{ - "$schema": "https://raw.githubusercontent.com/TaqlaAI/sourcebot/main/schemas/index.json", + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/index.json", "Configs": [ { "Type": "github", @@ -86,13 +86,13 @@ Sourcebot supports indexing and searching through public and private repositorie 3. Run Sourcebot and point it to the new config you created with the `-e CONFIG_PATH` flag: ```sh - docker run -p 3000:3000 --rm --name sourcebot -v $(pwd):/data -e CONFIG_PATH=/data/my_config.json ghcr.io/taqlaai/sourcebot:main + docker run -p 3000:3000 --rm --name sourcebot -v $(pwd):/data -e CONFIG_PATH=/data/my_config.json ghcr.io/sourcebot-dev/sourcebot:main ```
What does this command do? - - Pull and run the Sourcebot docker image from [ghcr.io/taqlaai/sourcebot:main](https://github.com/taqlaai/sourcebot/pkgs/container/sourcebot). + - Pull and run the Sourcebot docker image from [ghcr.io/sourcebot-dev/sourcebot:main](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot). - Mount the current directory (`-v $(pwd):/data`) to allow Sourcebot to persist the `.sourcebot` cache. - Mirrors (clones) llama.cpp at `HEAD` into `.sourcebot/github/ggerganov/llama.cpp`. - Indexes llama.cpp into a .zoekt index file in `.sourcebot/index/`. @@ -101,7 +101,7 @@ Sourcebot supports indexing and searching through public and private repositorie

- You should see a `.sourcebot` folder in your current directory. This folder stores a cache of the repositories zoekt has indexed. The `HEAD` commit of a repository is re-indexed [every hour](https://github.com/TaqlaAI/zoekt/blob/11b7713f1fb511073c502c41cea413d616f7761f/cmd/zoekt-indexserver/main.go#L86). Indexing private repos? See [Providing an access token](#providing-an-access-token). + You should see a `.sourcebot` folder in your current directory. This folder stores a cache of the repositories zoekt has indexed. The `HEAD` commit of a repository is re-indexed [every hour](https://github.com/sourcebot-dev/zoekt/blob/11b7713f1fb511073c502c41cea413d616f7761f/cmd/zoekt-indexserver/main.go#L86). Indexing private repos? See [Providing an access token](#providing-an-access-token).
Using GitLab? @@ -112,7 +112,7 @@ Sourcebot supports indexing and searching through public and private repositorie ```sh { - "$schema": "https://raw.githubusercontent.com/TaqlaAI/sourcebot/main/schemas/index.json", + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/index.json", "Configs": [ { "Type": "gitlab" @@ -144,7 +144,7 @@ In order to index private repositories, you'll need to generate a GitHub Persona You'll need to pass this PAT each time you run Sourcebot by setting the `GITHUB_TOKEN` environment variable:
-docker run -p 3000:3000 --rm --name sourcebot -e GITHUB_TOKEN=[your-github-token] -e CONFIG_PATH=/data/my_config.json -v $(pwd):/data ghcr.io/taqlaai/sourcebot:main
+docker run -p 3000:3000 --rm --name sourcebot -e GITHUB_TOKEN=[your-github-token] -e CONFIG_PATH=/data/my_config.json -v $(pwd):/data ghcr.io/sourcebot-dev/sourcebot:main
 
@@ -161,7 +161,7 @@ Generate a GitLab Personal Access Token (PAT) [here](https://gitlab.com/-/user_s You'll need to pass this PAT each time you run Sourcebot by setting the `GITLAB_TOKEN` environment variable:
-docker run -p 3000:3000 --rm --name sourcebot -e GITLAB_TOKEN=[your-gitlab-token] -e CONFIG_PATH=/data/my_config.json -v $(pwd):/data ghcr.io/taqlaai/sourcebot:main
+docker run -p 3000:3000 --rm --name sourcebot -e GITLAB_TOKEN=[your-gitlab-token] -e CONFIG_PATH=/data/my_config.json -v $(pwd):/data ghcr.io/sourcebot-dev/sourcebot:main
 
@@ -171,7 +171,7 @@ docker run -p 3000:3000 --rm --name sourcebot -e GITLAB_TOKEN=[your-gitlab-to ## Build from source >[!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](https://github.com/TaqlaAI/sourcebot/pkgs/container/sourcebot). +> 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](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot). 1. Install go and NodeJS. Note that a NodeJS version of at least `21.1.0` is required. @@ -186,7 +186,7 @@ docker run -p 3000:3000 --rm --name sourcebot -e GITLAB_TOKEN=[your-gitlab-to 3. Clone the repository with submodules: ```sh - git clone --recurse-submodules https://github.com/TaqlaAI/sourcebot.git + git clone --recurse-submodules https://github.com/sourcebot-dev/sourcebot.git ``` 4. Run `make` to build zoekt and install dependencies: @@ -217,7 +217,7 @@ docker run -p 3000:3000 --rm --name sourcebot -e GITLAB_TOKEN=[your-gitlab-to ```sh ghp_... ``` - zoekt will [read this file](https://github.com/TaqlaAI/zoekt/blob/6a5753692b46e669f851ab23211e756a3677185d/cmd/zoekt-mirror-github/main.go#L60) to authenticate with GitHub. + zoekt will [read this file](https://github.com/sourcebot-dev/zoekt/blob/6a5753692b46e669f851ab23211e756a3677185d/cmd/zoekt-mirror-github/main.go#L60) to authenticate with GitHub.
@@ -228,7 +228,7 @@ docker run -p 3000:3000 --rm --name sourcebot -e GITLAB_TOKEN=[your-gitlab-to ```sh glpat-... ``` - zoekt will [read this file](https://github.com/TaqlaAI/zoekt/blob/11b7713f1fb511073c502c41cea413d616f7761f/cmd/zoekt-mirror-gitlab/main.go#L43) to authenticate with GitLab. + zoekt will [read this file](https://github.com/sourcebot-dev/zoekt/blob/11b7713f1fb511073c502c41cea413d616f7761f/cmd/zoekt-mirror-gitlab/main.go#L43) to authenticate with GitLab.
@@ -243,15 +243,15 @@ docker run -p 3000:3000 --rm --name sourcebot -e GITLAB_TOKEN=[your-gitlab-to ## Telemetry -By default, Sourcebot collects anonymized usage data through [PostHog](https://posthog.com/) to help us improve the performance and reliability of our tool. We do not collect or transmit [any information related to your codebase](https://github.com/search?q=repo:TaqlaAI/sourcebot++captureEvent&type=code). In addition, all events are [sanitized](https://github.com/TaqlaAI/sourcebot/blob/main/src/app/posthogProvider.tsx) to ensure that no sensitive or identifying details leave your machine. The data we collect includes general usage statistics and metadata such as query performance (e.g., search duration, error rates) to monitor the application's health and functionality. This information helps us better understand how Sourcebot is used and where improvements can be made :) +By default, Sourcebot collects anonymized usage data through [PostHog](https://posthog.com/) to help us improve the performance and reliability of our tool. We do not collect or transmit [any information related to your codebase](https://github.com/search?q=repo:sourcebot-dev/sourcebot++captureEvent&type=code). In addition, all events are [sanitized](https://github.com/sourcebot-dev/sourcebot/blob/main/src/app/posthogProvider.tsx) to ensure that no sensitive or identifying details leave your machine. The data we collect includes general usage statistics and metadata such as query performance (e.g., search duration, error rates) to monitor the application's health and functionality. This information helps us better understand how Sourcebot is used and where improvements can be made :) If you'd like to disable all telemetry, you can do so by setting the environment variable `SOURCEBOT_TELEMETRY_DISABLED` to `1` in the docker run command:
-docker run -e SOURCEBOT_TELEMETRY_DISABLED=1 /* additional args */ ghcr.io/taqlaai/sourcebot:main
+docker run -e SOURCEBOT_TELEMETRY_DISABLED=1 /* additional args */ ghcr.io/sourcebot-dev/sourcebot:main
 
-Or if you are [building locally](#building-sourcebot), add the following to your [.env](./.env) file: +Or if you are [building locally](#build-from-source), add the following to your [.env](./.env) file: ```sh SOURCEBOT_TELEMETRY_DISABLED=1 NEXT_PUBLIC_SOURCEBOT_TELEMETRY_DISABLED=1 diff --git a/default-config.json b/default-config.json index 53578555..dff1cc71 100644 --- a/default-config.json +++ b/default-config.json @@ -1,9 +1,9 @@ { - "$schema": "https://raw.githubusercontent.com/TaqlaAI/sourcebot/main/schemas/index.json", + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/index.json", "Configs": [ { "Type": "github", - "GitHubOrg": "TaqlaAI", + "GitHubOrg": "sourcebot-dev", "Name": "^sourcebot$" } ] diff --git a/demo-site-config.json b/demo-site-config.json index 31d609ed..379d6af1 100644 --- a/demo-site-config.json +++ b/demo-site-config.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/TaqlaAI/sourcebot/main/schemas/index.json", + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/index.json", "Configs": [ { "Type": "github", diff --git a/example-config.json b/example-config.json index 4f3884b9..3d39d72b 100644 --- a/example-config.json +++ b/example-config.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/TaqlaAI/sourcebot/main/schemas/index.json", + "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/index.json", "Configs": [ // ~~~~~~~~~~~~ GitHub Examples ~~~~~~~~~~~~ // Index all repos in organization "my-org". diff --git a/src/app/navigationMenu.tsx b/src/app/navigationMenu.tsx index 4aebdc56..14c17ed5 100644 --- a/src/app/navigationMenu.tsx +++ b/src/app/navigationMenu.tsx @@ -11,7 +11,7 @@ import logoDark from "../../public/sb_logo_dark_small.png"; import logoLight from "../../public/sb_logo_light_small.png"; import { useRouter } from "next/navigation"; -const SOURCEBOT_GITHUB_URL = "https://github.com/TaqlaAI/sourcebot"; +const SOURCEBOT_GITHUB_URL = "https://github.com/sourcebot-dev/sourcebot"; export const NavigationMenu = () => { const router = useRouter(); diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index fd2f05a0..ee40b7d3 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -7,7 +7,7 @@ export const searchRequestSchema = z.object({ }); -// @see : https://github.com/TaqlaAI/zoekt/blob/main/api.go#L212 +// @see : https://github.com/sourcebot-dev/zoekt/blob/main/api.go#L212 export const locationSchema = z.object({ // 0-based byte offset from the beginning of the file ByteOffset: z.number(), @@ -22,7 +22,7 @@ export const rangeSchema = z.object({ End: locationSchema, }); -// @see : https://github.com/TaqlaAI/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L350 +// @see : https://github.com/sourcebot-dev/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L350 export const searchResponseStats = { ContentBytesLoaded: z.number(), IndexBytesLoaded: z.number(), @@ -46,7 +46,7 @@ export const searchResponseStats = { FlushReason: z.number(), } -// @see : https://github.com/TaqlaAI/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L497 +// @see : https://github.com/sourcebot-dev/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L497 export const searchResponseSchema = z.object({ Result: z.object({ ...searchResponseStats, @@ -81,7 +81,7 @@ export const fileSourceResponseSchema = z.object({ }); -// @see : https://github.com/TaqlaAI/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L728 +// @see : https://github.com/sourcebot-dev/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L728 const repoStatsSchema = z.object({ Repos: z.number(), Shards: z.number(), @@ -93,7 +93,7 @@ const repoStatsSchema = z.object({ OtherBranchesNewLinesCount: z.number(), }); -// @see : https://github.com/TaqlaAI/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L716 +// @see : https://github.com/sourcebot-dev/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L716 const indexMetadataSchema = z.object({ IndexFormatVersion: z.number(), IndexFeatureVersion: z.number(), @@ -105,7 +105,7 @@ const indexMetadataSchema = z.object({ ID: z.string(), }); -// @see : https://github.com/TaqlaAI/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L555 +// @see : https://github.com/sourcebot-dev/zoekt/blob/3780e68cdb537d5a7ed2c84d9b3784f80c7c5d04/api.go#L555 export const repositorySchema = z.object({ Name: z.string(), URL: z.string(), diff --git a/src/lib/server/searchService.ts b/src/lib/server/searchService.ts index cb480398..2c209f2b 100644 --- a/src/lib/server/searchService.ts +++ b/src/lib/server/searchService.ts @@ -9,7 +9,7 @@ import { zoektFetch } from "./zoektClient"; export const search = async ({ query, maxMatchDisplayCount, whole }: SearchRequest): Promise => { const body = JSON.stringify({ q: query, - // @see: https://github.com/TaqlaAI/zoekt/blob/main/api.go#L892 + // @see: https://github.com/sourcebot-dev/zoekt/blob/main/api.go#L892 opts: { NumContextLines: 2, ChunkMatches: true,