Rename organization to sourcebot-dev

This commit is contained in:
bkellam 2024-09-29 14:39:17 -07:00
parent d0d104a1e1
commit fe3817b9a5
9 changed files with 33 additions and 33 deletions

View file

@ -10,7 +10,7 @@ on:
env: env:
# Use docker.io for Docker Hub if empty # Use docker.io for Docker Hub if empty
REGISTRY_IMAGE: ghcr.io/taqlaai/sourcebot REGISTRY_IMAGE: ghcr.io/sourcebot-dev/sourcebot
jobs: jobs:
build: build:

2
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "vendor/zoekt"] [submodule "vendor/zoekt"]
path = vendor/zoekt path = vendor/zoekt
url = https://github.com/TaqlaAI/zoekt url = https://github.com/sourcebot-dev/zoekt

View file

@ -11,9 +11,9 @@ Blazingly fast code search 🏎️
<p align="center"> <p align="center">
<a href="https://demo.sourcebot.dev"><img src="https://img.shields.io/badge/Try the Demo!-blue?logo=googlechrome&logoColor=orange"/></a> <a href="https://demo.sourcebot.dev"><img src="https://img.shields.io/badge/Try the Demo!-blue?logo=googlechrome&logoColor=orange"/></a>
<a href="mailto:brendan@sourcebot.dev"><img src="https://img.shields.io/badge/Email%20Us-brightgreen" /></a> <a href="mailto:brendan@sourcebot.dev"><img src="https://img.shields.io/badge/Email%20Us-brightgreen" /></a>
<a href="https://github.com/TaqlaAI/sourcebot/blob/main/LICENSE"><img src="https://img.shields.io/github/license/TaqlaAI/sourcebot"/></a> <a href="https://github.com/sourcebot-dev/sourcebot/blob/main/LICENSE"><img src="https://img.shields.io/github/license/sourcebot-dev/sourcebot"/></a>
<a href="https://github.com/TaqlaAI/sourcebot/actions/workflows/ghcr-publish.yml"><img src="https://img.shields.io/github/actions/workflow/status/TaqlaAI/sourcebot/ghcr-publish.yml"/><a> <a href="https://github.com/sourcebot-dev/sourcebot/actions/workflows/ghcr-publish.yml"><img src="https://img.shields.io/github/actions/workflow/status/sourcebot-dev/sourcebot/ghcr-publish.yml"/><a>
<a href="https://github.com/TaqlaAI/sourcebot/stargazers"><img src="https://img.shields.io/github/stars/TaqlaAI/sourcebot" /></a> <a href="https://github.com/sourcebot-dev/sourcebot/stargazers"><img src="https://img.shields.io/github/stars/sourcebot-dev/sourcebot" /></a>
</p> </p>
@ -37,7 +37,7 @@ You can try out our public hosted demo [here](https://demo.sourcebot.dev/)!
Get started with a single docker command: 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). 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
<details> <details>
<summary>What does this command do?</summary> <summary>What does this command do?</summary>
- 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. - Read the repos listed in [default config](./default-config.json) and start indexing them.
- Map port 3000 between your machine and the docker image. - Map port 3000 between your machine and the docker image.
- Starts the web server on port 3000. - Starts the web server on port 3000.
@ -70,7 +70,7 @@ Sourcebot supports indexing and searching through public and private repositorie
```sh ```sh
touch my_config.json touch my_config.json
echo '{ 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": [ "Configs": [
{ {
"Type": "github", "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: 3. Run Sourcebot and point it to the new config you created with the `-e CONFIG_PATH` flag:
```sh ```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
``` ```
<details> <details>
<summary>What does this command do?</summary> <summary>What does this command do?</summary>
- 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. - 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`. - Mirrors (clones) llama.cpp at `HEAD` into `.sourcebot/github/ggerganov/llama.cpp`.
- Indexes llama.cpp into a .zoekt index file in `.sourcebot/index/`. - 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
</details> </details>
<br> <br>
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).
<details> <details>
<summary><img src="https://gitlab.com/favicon.ico" width="16" height="16" /> Using GitLab?</summary> <summary><img src="https://gitlab.com/favicon.ico" width="16" height="16" /> Using GitLab?</summary>
@ -112,7 +112,7 @@ Sourcebot supports indexing and searching through public and private repositorie
```sh ```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": [ "Configs": [
{ {
"Type": "gitlab" "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: You'll need to pass this PAT each time you run Sourcebot by setting the `GITHUB_TOKEN` environment variable:
<pre> <pre>
docker run -p 3000:3000 --rm --name sourcebot -e <b>GITHUB_TOKEN=[your-github-token]</b> -e CONFIG_PATH=/data/my_config.json -v $(pwd):/data ghcr.io/taqlaai/sourcebot:main docker run -p 3000:3000 --rm --name sourcebot -e <b>GITHUB_TOKEN=[your-github-token]</b> -e CONFIG_PATH=/data/my_config.json -v $(pwd):/data ghcr.io/sourcebot-dev/sourcebot:main
</pre> </pre>
</details> </details>
@ -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: You'll need to pass this PAT each time you run Sourcebot by setting the `GITLAB_TOKEN` environment variable:
<pre> <pre>
docker run -p 3000:3000 --rm --name sourcebot -e <b>GITLAB_TOKEN=[your-gitlab-token]</b> -e CONFIG_PATH=/data/my_config.json -v $(pwd):/data ghcr.io/taqlaai/sourcebot:main docker run -p 3000:3000 --rm --name sourcebot -e <b>GITLAB_TOKEN=[your-gitlab-token]</b> -e CONFIG_PATH=/data/my_config.json -v $(pwd):/data ghcr.io/sourcebot-dev/sourcebot:main
</pre> </pre>
</details> </details>
@ -171,7 +171,7 @@ docker run -p 3000:3000 --rm --name sourcebot -e <b>GITLAB_TOKEN=[your-gitlab-to
## Build from source ## Build from source
>[!NOTE] >[!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 <a href="https://go.dev/doc/install"><img src="https://go.dev/favicon.ico" width="16" height="16"> go</a> and <a href="https://nodejs.org/"><img src="https://nodejs.org/favicon.ico" width="16" height="16"> NodeJS</a>. Note that a NodeJS version of at least `21.1.0` is required. 1. Install <a href="https://go.dev/doc/install"><img src="https://go.dev/favicon.ico" width="16" height="16"> go</a> and <a href="https://nodejs.org/"><img src="https://nodejs.org/favicon.ico" width="16" height="16"> NodeJS</a>. 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 <b>GITLAB_TOKEN=[your-gitlab-to
3. Clone the repository with submodules: 3. Clone the repository with submodules:
```sh ```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: 4. Run `make` to build zoekt and install dependencies:
@ -217,7 +217,7 @@ docker run -p 3000:3000 --rm --name sourcebot -e <b>GITLAB_TOKEN=[your-gitlab-to
```sh ```sh
ghp_... 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.
</details> </details>
<details> <details>
@ -228,7 +228,7 @@ docker run -p 3000:3000 --rm --name sourcebot -e <b>GITLAB_TOKEN=[your-gitlab-to
```sh ```sh
glpat-... 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.
</details> </details>
</div> </div>
@ -243,15 +243,15 @@ docker run -p 3000:3000 --rm --name sourcebot -e <b>GITLAB_TOKEN=[your-gitlab-to
## Telemetry ## 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: 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:
<pre> <pre>
docker run -e <b>SOURCEBOT_TELEMETRY_DISABLED=1</b> /* additional args */ ghcr.io/taqlaai/sourcebot:main docker run -e <b>SOURCEBOT_TELEMETRY_DISABLED=1</b> /* additional args */ ghcr.io/sourcebot-dev/sourcebot:main
</pre> </pre>
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 ```sh
SOURCEBOT_TELEMETRY_DISABLED=1 SOURCEBOT_TELEMETRY_DISABLED=1
NEXT_PUBLIC_SOURCEBOT_TELEMETRY_DISABLED=1 NEXT_PUBLIC_SOURCEBOT_TELEMETRY_DISABLED=1

View file

@ -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": [ "Configs": [
{ {
"Type": "github", "Type": "github",
"GitHubOrg": "TaqlaAI", "GitHubOrg": "sourcebot-dev",
"Name": "^sourcebot$" "Name": "^sourcebot$"
} }
] ]

View file

@ -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": [ "Configs": [
{ {
"Type": "github", "Type": "github",

View file

@ -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": [ "Configs": [
// ~~~~~~~~~~~~ GitHub Examples ~~~~~~~~~~~~ // ~~~~~~~~~~~~ GitHub Examples ~~~~~~~~~~~~
// Index all repos in organization "my-org". // Index all repos in organization "my-org".

View file

@ -11,7 +11,7 @@ import logoDark from "../../public/sb_logo_dark_small.png";
import logoLight from "../../public/sb_logo_light_small.png"; import logoLight from "../../public/sb_logo_light_small.png";
import { useRouter } from "next/navigation"; 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 = () => { export const NavigationMenu = () => {
const router = useRouter(); const router = useRouter();

View file

@ -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({ export const locationSchema = z.object({
// 0-based byte offset from the beginning of the file // 0-based byte offset from the beginning of the file
ByteOffset: z.number(), ByteOffset: z.number(),
@ -22,7 +22,7 @@ export const rangeSchema = z.object({
End: locationSchema, 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 = { export const searchResponseStats = {
ContentBytesLoaded: z.number(), ContentBytesLoaded: z.number(),
IndexBytesLoaded: z.number(), IndexBytesLoaded: z.number(),
@ -46,7 +46,7 @@ export const searchResponseStats = {
FlushReason: z.number(), 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({ export const searchResponseSchema = z.object({
Result: z.object({ Result: z.object({
...searchResponseStats, ...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({ const repoStatsSchema = z.object({
Repos: z.number(), Repos: z.number(),
Shards: z.number(), Shards: z.number(),
@ -93,7 +93,7 @@ const repoStatsSchema = z.object({
OtherBranchesNewLinesCount: z.number(), 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({ const indexMetadataSchema = z.object({
IndexFormatVersion: z.number(), IndexFormatVersion: z.number(),
IndexFeatureVersion: z.number(), IndexFeatureVersion: z.number(),
@ -105,7 +105,7 @@ const indexMetadataSchema = z.object({
ID: z.string(), 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({ export const repositorySchema = z.object({
Name: z.string(), Name: z.string(),
URL: z.string(), URL: z.string(),

View file

@ -9,7 +9,7 @@ import { zoektFetch } from "./zoektClient";
export const search = async ({ query, maxMatchDisplayCount, whole }: SearchRequest): Promise<SearchResponse | ServiceError> => { export const search = async ({ query, maxMatchDisplayCount, whole }: SearchRequest): Promise<SearchResponse | ServiceError> => {
const body = JSON.stringify({ const body = JSON.stringify({
q: query, 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: { opts: {
NumContextLines: 2, NumContextLines: 2,
ChunkMatches: true, ChunkMatches: true,