Add docs to this repo
59
docs/.editorconfig
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
[*]
|
||||
cpp_indent_braces=false
|
||||
cpp_indent_multi_line_relative_to=innermost_parenthesis
|
||||
cpp_indent_within_parentheses=indent
|
||||
cpp_indent_preserve_within_parentheses=false
|
||||
cpp_indent_case_labels=false
|
||||
cpp_indent_case_contents=true
|
||||
cpp_indent_case_contents_when_block=false
|
||||
cpp_indent_lambda_braces_when_parameter=true
|
||||
cpp_indent_goto_labels=one_left
|
||||
cpp_indent_preprocessor=leftmost_column
|
||||
cpp_indent_access_specifiers=false
|
||||
cpp_indent_namespace_contents=true
|
||||
cpp_indent_preserve_comments=false
|
||||
cpp_new_line_before_open_brace_namespace=ignore
|
||||
cpp_new_line_before_open_brace_type=ignore
|
||||
cpp_new_line_before_open_brace_function=ignore
|
||||
cpp_new_line_before_open_brace_block=ignore
|
||||
cpp_new_line_before_open_brace_lambda=ignore
|
||||
cpp_new_line_scope_braces_on_separate_lines=false
|
||||
cpp_new_line_close_brace_same_line_empty_type=false
|
||||
cpp_new_line_close_brace_same_line_empty_function=false
|
||||
cpp_new_line_before_catch=true
|
||||
cpp_new_line_before_else=true
|
||||
cpp_new_line_before_while_in_do_while=false
|
||||
cpp_space_before_function_open_parenthesis=remove
|
||||
cpp_space_within_parameter_list_parentheses=false
|
||||
cpp_space_between_empty_parameter_list_parentheses=false
|
||||
cpp_space_after_keywords_in_control_flow_statements=true
|
||||
cpp_space_within_control_flow_statement_parentheses=false
|
||||
cpp_space_before_lambda_open_parenthesis=false
|
||||
cpp_space_within_cast_parentheses=false
|
||||
cpp_space_after_cast_close_parenthesis=false
|
||||
cpp_space_within_expression_parentheses=false
|
||||
cpp_space_before_block_open_brace=true
|
||||
cpp_space_between_empty_braces=false
|
||||
cpp_space_before_initializer_list_open_brace=false
|
||||
cpp_space_within_initializer_list_braces=true
|
||||
cpp_space_preserve_in_initializer_list=true
|
||||
cpp_space_before_open_square_bracket=false
|
||||
cpp_space_within_square_brackets=false
|
||||
cpp_space_before_empty_square_brackets=false
|
||||
cpp_space_between_empty_square_brackets=false
|
||||
cpp_space_group_square_brackets=true
|
||||
cpp_space_within_lambda_brackets=false
|
||||
cpp_space_between_empty_lambda_brackets=false
|
||||
cpp_space_before_comma=false
|
||||
cpp_space_after_comma=true
|
||||
cpp_space_remove_around_member_operators=true
|
||||
cpp_space_before_inheritance_colon=true
|
||||
cpp_space_before_constructor_colon=true
|
||||
cpp_space_remove_before_semicolon=true
|
||||
cpp_space_after_semicolon=false
|
||||
cpp_space_remove_around_unary_operator=true
|
||||
cpp_space_around_binary_operator=insert
|
||||
cpp_space_around_assignment_operator=insert
|
||||
cpp_space_pointer_reference_alignment=left
|
||||
cpp_space_around_ternary_operator=insert
|
||||
cpp_wrap_preserve_blocks=one_liners
|
||||
32
docs/README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Mintlify Starter Kit
|
||||
|
||||
Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including
|
||||
|
||||
- Guide pages
|
||||
- Navigation
|
||||
- Customizations
|
||||
- API Reference pages
|
||||
- Use of popular components
|
||||
|
||||
### Development
|
||||
|
||||
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
|
||||
|
||||
```
|
||||
npm i -g mintlify
|
||||
```
|
||||
|
||||
Run the following command at the root of your documentation (where docs.json is)
|
||||
|
||||
```
|
||||
mintlify dev
|
||||
```
|
||||
|
||||
### Publishing Changes
|
||||
|
||||
Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.
|
||||
|
||||
#### Troubleshooting
|
||||
|
||||
- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
|
||||
- Page loads as a 404 - Make sure you are running in a folder with `docs.json`
|
||||
107
docs/development.mdx
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
---
|
||||
title: 'Development'
|
||||
description: 'Preview changes locally to update your docs'
|
||||
---
|
||||
|
||||
<Info>
|
||||
**Prerequisite**: Please install Node.js (version 19 or higher) before proceeding. <br />
|
||||
Please upgrade to ```docs.json``` before proceeding and delete the legacy ```mint.json``` file.
|
||||
</Info>
|
||||
|
||||
Follow these steps to install and run Mintlify on your operating system:
|
||||
|
||||
**Step 1**: Install Mintlify:
|
||||
|
||||
<CodeGroup>
|
||||
|
||||
```bash npm
|
||||
npm i -g mintlify
|
||||
```
|
||||
|
||||
```bash yarn
|
||||
yarn global add mintlify
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
**Step 2**: Navigate to the docs directory (where the `docs.json` file is located) and execute the following command:
|
||||
|
||||
```bash
|
||||
mintlify dev
|
||||
```
|
||||
|
||||
A local preview of your documentation will be available at `http://localhost:3000`.
|
||||
|
||||
### Custom Ports
|
||||
|
||||
By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the `--port` flag. To run Mintlify on port 3333, for instance, use this command:
|
||||
|
||||
```bash
|
||||
mintlify dev --port 3333
|
||||
```
|
||||
|
||||
If you attempt to run Mintlify on a port that's already in use, it will use the next available port:
|
||||
|
||||
```md
|
||||
Port 3000 is already in use. Trying 3001 instead.
|
||||
```
|
||||
|
||||
## Mintlify Versions
|
||||
|
||||
Please note that each CLI release is associated with a specific version of Mintlify. If your local website doesn't align with the production version, please update the CLI:
|
||||
|
||||
<CodeGroup>
|
||||
|
||||
```bash npm
|
||||
npm i -g mintlify@latest
|
||||
```
|
||||
|
||||
```bash yarn
|
||||
yarn global upgrade mintlify
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
## Validating Links
|
||||
|
||||
The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:
|
||||
|
||||
```bash
|
||||
mintlify broken-links
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
<Tip>
|
||||
Unlimited editors available under the [Pro
|
||||
Plan](https://mintlify.com/pricing) and above.
|
||||
</Tip>
|
||||
|
||||
If the deployment is successful, you should see the following:
|
||||
|
||||
<Frame>
|
||||
<img src="/images/checks-passed.png" style={{ borderRadius: '0.5rem' }} />
|
||||
</Frame>
|
||||
|
||||
## Code Formatting
|
||||
|
||||
We suggest using extensions on your IDE to recognize and format MDX. If you're a VSCode user, consider the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title='Error: Could not load the "sharp" module using the darwin-arm64 runtime'>
|
||||
|
||||
This may be due to an outdated version of node. Try the following:
|
||||
1. Remove the currently-installed version of mintlify: `npm remove -g mintlify`
|
||||
2. Upgrade to Node v19 or higher.
|
||||
3. Reinstall mintlify: `npm install -g mintlify`
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Issue: Encountering an unknown error">
|
||||
|
||||
Solution: Go to the root of your device and delete the \~/.mintlify folder. Afterwards, run `mintlify dev` again.
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
Curious about what changed in the CLI version? [Check out the CLI changelog.](https://www.npmjs.com/package/mintlify?activeTab=versions)
|
||||
95
docs/docs.json
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
"$schema": "https://mintlify.com/docs.json",
|
||||
"theme": "mint",
|
||||
"name": "Sourcebot",
|
||||
"colors": {
|
||||
"primary": "#851EE7",
|
||||
"light": "#851EE7",
|
||||
"dark": "#851EE7"
|
||||
},
|
||||
"favicon": "/fav.svg",
|
||||
"styling": {
|
||||
"eyebrows": "section"
|
||||
},
|
||||
"navigation": {
|
||||
"anchors": [
|
||||
{
|
||||
"anchor": "Docs",
|
||||
"icon": "book-open",
|
||||
"groups": [
|
||||
{
|
||||
"group": "General",
|
||||
"pages": [
|
||||
"docs/overview",
|
||||
"docs/getting-started"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Connections",
|
||||
"pages": [
|
||||
"docs/connections/overview",
|
||||
"docs/connections/github",
|
||||
"docs/connections/gitlab"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Access Tokens",
|
||||
"pages": [
|
||||
"docs/access-tokens/overview",
|
||||
"docs/access-tokens/secrets"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"anchor": "Self Hosting",
|
||||
"icon": "server",
|
||||
"groups": [
|
||||
{
|
||||
"group": "Getting Started",
|
||||
"pages": [
|
||||
"self-hosting/overview"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Deployment",
|
||||
"pages": [
|
||||
"self-hosting/deployment/source"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"logo": {
|
||||
"light": "/logo/light.png",
|
||||
"dark": "/logo/dark.png"
|
||||
},
|
||||
"navbar": {
|
||||
"links": [
|
||||
{
|
||||
"label": "Support",
|
||||
"href": "mailto:team@sourcebot.dev"
|
||||
}
|
||||
],
|
||||
"primary": {
|
||||
"type": "button",
|
||||
"label": "Login",
|
||||
"href": "https://sourcebot.dev/login"
|
||||
}
|
||||
},
|
||||
"footer": {
|
||||
"socials": {
|
||||
"github": "https://github.com/sourcebot-dev/sourcebot"
|
||||
}
|
||||
},
|
||||
"integrations": {
|
||||
"posthog": {
|
||||
"apiKey": "phc_DBGufjG0rkj3OEhuTcZ04xfeZB6eDhO7dP8ZCnqH7K7"
|
||||
}
|
||||
},
|
||||
"appearance": {
|
||||
"default": "dark",
|
||||
"strict": true
|
||||
}
|
||||
}
|
||||
31
docs/docs/access-tokens/overview.mdx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: Access Tokens
|
||||
sidebarTitle: Access Tokens
|
||||
---
|
||||
|
||||
In order to search your private repos, you'll need to provide Sourcebot with an access token. Access tokens are provided as [secrets](/docs/access-tokens/secrets), which are encrypted at rest and in transit using [AES-256](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard)
|
||||
|
||||
<AccordionGroup>
|
||||
|
||||
<Accordion title="Create a GitHub Access Token">
|
||||
Navigate to the [personal access token (PAT) creation page](https://github.com/settings/tokens/new) (or the equivelent page if you're
|
||||
self hosting)
|
||||
|
||||
Ensure that the `repo` scope is enabled. This gives the PAT access to fetch your repos
|
||||
|
||||

|
||||
|
||||
Once you've created your GitHub PAT, add it as a [secret](access-tokens/secrets) in Sourcebot to use it within your connections
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Create a GitLab Access Token">
|
||||
Navigate to the [personal access token (PAT) creation page](https://gitlab.com/-/user_settings/personal_access_tokens) (or the equivelent page if you're
|
||||
self hosting), and press `Add new token`
|
||||
|
||||
Ensure that the `read_api` scope is enabled. This gives the PAT **read-only** access to fetch your repos
|
||||
|
||||

|
||||
|
||||
Once you've created your GitLab PAT, add it as a [secret](access-tokens/secrets) in Sourcebot to use it within your connections
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
22
docs/docs/access-tokens/secrets.mdx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: Secrets
|
||||
subtitle: Secrets
|
||||
---
|
||||
|
||||
Secrets are used to store sensitive data (ex. GitHub/GitLab access tokens), and can be referenced in [Connections](/connections/overview). The main use of secrets is to provide a connection with a personal access token to fetch private repositories.
|
||||
|
||||
### Create a secret
|
||||
|
||||
To create a secret, navigate to the `Secrets` page within `Settings`. Under `Import a new secret`, select the code host you're importing a secret for and follow the instructions presented.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Referencing a secret
|
||||
|
||||
After creating a secret, it'll be available to reference within a [connection](/connections/overview). On the connection creation page, **press the secret selection drop down to reference your secret**. This will automatically add the secret reference to the
|
||||
configuration schema:
|
||||
|
||||

|
||||

|
||||
181
docs/docs/connections/github.mdx
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
---
|
||||
title: GitHub Connection
|
||||
sidebarTitle: GitHub
|
||||
icon: github
|
||||
---
|
||||
|
||||
To search repos on GitHub, you'll create a GitHub Connection. Using this connection, you can:
|
||||
- Index individual GitHub repos
|
||||
- Index all of the repos in a GitHub organization
|
||||
- Index all of the repos from a GitHub user
|
||||
|
||||
<Note>If you want to index a private repo/org, make sure you provide an [access token](/docs/access-tokens/overview)</Note>
|
||||
|
||||

|
||||
|
||||
# Config Schema
|
||||
|
||||
For a detailed description of the schema, check out the schema file (TODO: link)
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Orgs">
|
||||
You can provide a list of orgs to index. Sourcebot will fetch all of the visible repos in these orgs.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"orgs": [
|
||||
"sourcebot-dev",
|
||||
"getsentry",
|
||||
"vercel"
|
||||
]
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Users">
|
||||
You can provide a list of users to index. Sourcebot will fetch all of the visible repos for these users.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"users": [
|
||||
"msukkari",
|
||||
"brendan-kellem",
|
||||
"torvalds"
|
||||
]
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Repos">
|
||||
You can provide a list of repos to index. These must be provided in the `<owner>/<repo_name>` syntax.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"repos": [
|
||||
"sourcebot-dev/sourcebot",
|
||||
"facebook/react"
|
||||
]
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Custom URL">
|
||||
If you're self-hosting you're own GitHub instance, you can provide a link to it:
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"url": {
|
||||
"https://my.custom.github.com"
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Token">
|
||||
If you'd like to index private repos, make sure you provide a token. You can do so by referencing the [secret](/docs/access-tokens/secrets) that contains your token.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"token": {
|
||||
"secret": "MY_SECRET"
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Filter Options
|
||||
|
||||
This connection type supports additional options for filtering which repos are indexed.
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Topics">
|
||||
You can provide a list of repository topics to include while fetching the repos. Only repos that match at least one of these topics will be fetched.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"topics": [
|
||||
"docs",
|
||||
"core"
|
||||
]
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude Forks">
|
||||
If enabled, forked repos will be ignored.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"exclude": {
|
||||
"forks": true
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude Archived">
|
||||
If enabled, archived repos will be ignored.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"exclude": {
|
||||
"archived": true
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude Repos">
|
||||
You can provide a list of repos to exclude. These must be provided in the `<owner>/<repo_name>` syntax.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"exclude": {
|
||||
"repos": [
|
||||
"sourcebot-dev/zoekt",
|
||||
"torvalds/linux"
|
||||
]
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude Topics">
|
||||
You can provide a list of topics to ignore. Repos that contain any of these topics will be ignored
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"exclude": {
|
||||
"topics": [
|
||||
"ci",
|
||||
"experimental"
|
||||
]
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude by Size">
|
||||
<Note>The disk usage is calculated by GitHub and may not reflect the actual disk usage when cloned</Note>
|
||||
Exclude repos based on their disk usage. Min/max numbers are in bytes.
|
||||
```json
|
||||
{
|
||||
"type": "github",
|
||||
"exclude": {
|
||||
"size": {
|
||||
"min": 1000
|
||||
"max": 1000000000
|
||||
}
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
175
docs/docs/connections/gitlab.mdx
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
---
|
||||
title: GitLab Connection
|
||||
sidebarTitle: GitLab
|
||||
icon: gitlab
|
||||
---
|
||||
|
||||
To search projects on GitLab, you'll create a GitLab Connection. Using this connection, you can:
|
||||
- Index individual GitLab projects
|
||||
- Index all of the projects in a GitLab group/sub-group
|
||||
- Index all of the projects from a GitLab user
|
||||
|
||||
<Note>If you want to index a private project/group, make sure you provide an [access token](/docs/access-tokens/overview)</Note>
|
||||
|
||||

|
||||
|
||||
# Config Schema
|
||||
|
||||
For a detailed description of the schema, check out the schema file (TODO: link)
|
||||
|
||||
<Tabs>
|
||||
<Tab title="All Visible">
|
||||
<Note>This flag only works if your GitLab instance url is set and not equal to https://gitlab.com. Make sure you provide a [secret](/docs/access-tokens/secrets) containing the necessary access token to fetch your projects.</Note>
|
||||
If you'd like to index all projects visible to your GitLab instance, you can use the `all` flag.
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"all": "true",
|
||||
"url": "https://gitlab.aperaturelabs.com" // This is required, and cannot be https://gitlab.com
|
||||
"token": {
|
||||
"secret": "MY_SECRET_KEY_NAME" // the name of the secret you created in Sourcebot
|
||||
}
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Groups">
|
||||
You can provide a list of groups (and recursive sub-groups) to index. Sourcebot will fetch all of the visible projects in these groups. Subgroups can be specified by providing the path to the subgroup (e.g. `my-group/sub-group-a`)
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"groups": [
|
||||
"gitlab-org/api",
|
||||
"veloren"
|
||||
]
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Users">
|
||||
You can provide a list of users to index. Sourcebot will fetch all of the visible projects for these users.
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"users": [
|
||||
"gnachman"
|
||||
]
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Projects">
|
||||
You can provide a list of projects to index. These must be provided in the `<owner>/<project_name>` syntax.
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"projects": [
|
||||
"inkscape/inkscape",
|
||||
"wireshark/wireshark"
|
||||
]
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Custom URL">
|
||||
If you're self-hosting you're own GitLab instance, you can provide a link to it:
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"url": {
|
||||
"https://gitlab.aperaturelabs.com"
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Token">
|
||||
If you'd like to index private projects, make sure you provide a token. You can do so by referencing the [secret](/docs/access-tokens/secrets) that contains your token.
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"token": {
|
||||
"secret": "MY_SECRET_KEY_NAME"
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Filter Options
|
||||
|
||||
This connection type supports additional options for filtering which projects are indexed.
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Topics">
|
||||
You can provide a list of repository topics to include while fetching the projects. Only projects that match at least one of these topics will be fetched.
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"topics": [
|
||||
"docs",
|
||||
"core"
|
||||
]
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude Forks">
|
||||
If enabled, forked projects will be ignored.
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"exclude": {
|
||||
"forks": true
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude Archived">
|
||||
If enabled, archived projects will be ignored.
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"exclude": {
|
||||
"archived": true
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude Projects">
|
||||
You can provide a list of projects to exclude. These must be provided in the `<owner>/<repo_name>` syntax.
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"exclude": {
|
||||
"projects": [
|
||||
"sourcebot-dev/zoekt",
|
||||
"torvalds/linux"
|
||||
]
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Exclude Topics">
|
||||
You can provide a list of topics to ignore. Projects that contain any of these topics will be ignored
|
||||
```json
|
||||
{
|
||||
"type": "gitlab",
|
||||
"exclude": {
|
||||
"topics": [
|
||||
"ci",
|
||||
"experimental"
|
||||
]
|
||||
// .. additional excludes ..
|
||||
}
|
||||
// .. additional configs ..
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
20
docs/docs/connections/overview.mdx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: "Connections"
|
||||
sidebarTitle: "Connections"
|
||||
icon: "plug"
|
||||
---
|
||||
|
||||
import ConnectionCards from '/snippets/connection-cards.mdx';
|
||||
|
||||
Connections are how you tell Sourcebot what repositories you want to index.
|
||||
|
||||
To index your code, you'll create a connection to your code host platform and tell Sourcebot which repos/users/orgs to fetch, as well as other information Sourcebot may need (ex. access tokens, instance URLs)
|
||||
|
||||
You can view your connections by pressing `Connections` in the nav menu:
|
||||
|
||||

|
||||
|
||||
# Platform Support
|
||||
|
||||
Sourcebot can index repositories across various different code host platforms
|
||||
<ConnectionCards/>
|
||||
52
docs/docs/getting-started.mdx
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
title: Getting started
|
||||
---
|
||||
|
||||
<Note>This page assumes that you're either using Sourcebot Cloud or have spun up your own Sourcebot
|
||||
self-hosted deployment. If you haven't, checkout out the [Overview](/overview) page.</Note>
|
||||
|
||||
This page will guide you through configuring Sourcebot with your teams repositories.
|
||||
|
||||
### Account Registration
|
||||
|
||||
When you visit a Sourcebot deployment for the first time (either Sourcebot Cloud or your own self-hosted deployment), you'll be presented with the following login page. Pick
|
||||
your login method of choice to register for a new account.
|
||||
|
||||
<Note>Some login options may not be visible if you haven't configured them in your self-hosted deployment</Note>
|
||||

|
||||
|
||||
### Organization Creation
|
||||
|
||||
After logging in, you'll be asked to create an organization. You'll invite your team members to this organization later so they can also use Sourcebot.
|
||||
|
||||

|
||||
|
||||
### Connection Creation
|
||||
|
||||
After creating an org, we jump right into creating a [connection](/connections/overview). Connections are how you tell Sourcebot which repositories you want to index.
|
||||
|
||||
<Note>If you're self-hosting Sourcebot, your source code never leaves your machine</Note>
|
||||

|
||||
|
||||
#### Create Connection
|
||||
After selecting a code host you want to connect to, you'll be presented with the connection creation page. This page has the following three inputs:
|
||||
- Connection name (required): The name of the connection within Sourcebot
|
||||
- Secret (optional): An [access token](/access-tokens/overview) that is used to fetch private repos
|
||||
- Configuration: The JSON configuration schema that defines the repos/orgs to fetch.
|
||||
|
||||
For a more detailed explenation of connections, check out the [Connections](/connections/overview) page.
|
||||
|
||||
The example below shows a connection named `sourcebot-org` that fetches all of the repos for the `sourcebot-dev` GitHub organization, but excludes the `sourcebot-dev/zoekt` repo
|
||||
|
||||
<Note>This page won't let you continue with an invalid connection schema. If you're hitting errors, make sure the input you're providing is a valid JSON</Note>
|
||||

|
||||
|
||||
### Search
|
||||
|
||||
Once you create your organization's first connection successfully, you'll be redirected to your org's main search page. From here, you can use the search bar to search across all
|
||||
of the repos you've indexed
|
||||
|
||||

|
||||
|
||||
Congrats, you've successfuly setup Sourcebot! Read on to learn more about the Sourcebot's capabilities
|
||||
- Checkout the [Connections](/connections/overview) page to learn how to control which repos Sourcebot fetches
|
||||
37
docs/docs/overview.mdx
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
title: "Overview"
|
||||
icon: "bookmark"
|
||||
iconType: "solid"
|
||||
---
|
||||
|
||||
import ConnectionCards from '/snippets/connection-cards.mdx';
|
||||
|
||||
Sourcebot is an open-source code search tool ([Github](https://github.com/sourcebot-dev/sourcebot)). It allows teams to index repositories across various different platforms, and provides a powerful interface to search across them.
|
||||
|
||||
We have a [public demo](https://sourcebot.dev/search) if you'd like to try Sourcebot out before registering.
|
||||
|
||||
There are two ways to get started using Sourcebot:
|
||||
<AccordionGroup>
|
||||
<Accordion title="Sourcebot Cloud">
|
||||
A fully managed version of Sourcebot that is hosted and maintained by the Sourcebot team: https://app.sourcebot.dev/
|
||||
|
||||
Best for teams who:
|
||||
- Have large indexing requirements (500+ repos)
|
||||
- Don't want to deal with the headache of managing their own Sourcebot deployment
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Self-host Sourcebot">
|
||||
Run Sourcebot within your own infrastructure. Check out our [self-hosting](/self-hosting/overview) guide to get started (it takes < 1 minute to spin up)
|
||||
|
||||
Best for teams who:
|
||||
- Want to try out Sourcebot without going through security review (everything stays on your machine)
|
||||
- Want full control over their Sourcebot deployment
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
Once you know which Sourcebot deployment you want to use, check out the [Getting Started](/getting-started) page
|
||||
# Platform Support
|
||||
|
||||
Sourcebot can index repositories across various different code host platforms
|
||||
|
||||
<ConnectionCards />
|
||||
9
docs/fav.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect width="100" height="100" fill="url(#pattern0_64_7)"/>
|
||||
<defs>
|
||||
<pattern id="pattern0_64_7" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||
<use xlink:href="#image0_64_7" transform="scale(0.03125)"/>
|
||||
</pattern>
|
||||
<image id="image0_64_7" width="32" height="32" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAADh0lEQVRYCe2VS0iUURTH7/m+sbI0KVGbsdHJRImwB7WIWkTWopX2JiIIKoSiRUFUotCQD6iIaOciMqIXtSisFgWRRRAtgh6gLSp1ypGyh6VU1sx3+59pzjfXZ0FCmznw45xz7/3u45xz76dUUpIRSEbgP0fAHmH98WgPxEmB7gMajLnQoBnnwj8IVoJUo+8t7PPgEOiR9lp/+CSR2ia+qbVWny1yQo6ybkQi6lgw7Htv9ottiQG9GTwCq4G5OFyVA/aAJ8AP/ijYWIZWVglOeMCToltqZnQWD/eRbKAQnY1AUvId9l3Ap34MRPJgnBbH1FpHv2iHbjPI1n1E4JP0k6YsO0IN4pvaE3c4jGJ/hb0API/3sdoLjsb9UuiZ4GXcjymy7NaqDu8KaQtmvUvzpEaaEIFl3OaQXhoMtE0Its/gw7kiixa6LUq9gG0uzl0nQAGQiHFhjirB7uy+urzwKQyKbYAUkqLUBDDsBj4as82GvQlw+EV+wtgpzt9rPUcpXhdJ0foJTu8WsMwhEbiAhop4I9fBOcC34Ra4B26CL2BE0UpPqfeHV/EATSpNa8LJ9daYr/QHm4jTPERkA83o2Q2OgHGApSjOLuh+cB3sBwNyDz8mKLQiLHzF9UmeDWoi266obMvhqzxEJKfcwXmeBxpANzCFH6a14BlYb3aYNqIQZXByJ9Guy1Q00lKfH16TaEtY5ga4tRXsANPAQrAPPAAi/D7wdfVKg6tJPawO5XqYqlCurW0VQPY5lRCa6jjqYt3016iJgSIb4OoUuGr4BPwo8dVbDMqAxHQS7FiuoUeU6jZfR2HIuwWLh3kQ7kCKIkvqzP2ON5AGvhksd3sTxjWY5k3JTnSNbG1QFNXacdOJm5A/eDQXIf9o2kEAsNQAPr37ksHmZzoTiHSIMZquz+tap5VT4o6xqIvtWn9nuUU0y9aRMxxuFvOlY/8zaAYcmdkgMcnv68gn6TF/Rii+Xly9p2jHa6Vt3IhcPD5+9l0hKkUmvUhmrDYQnVdSA8cx6Ko7UKkM2OVgIzAX5weJo9EDBggWS7dILWGQ8EVDF1d1eKrvRB09Xz4ksgpkA7g6sWu2HZrDLwUnY3thXAZ8Tbke/ixa/cA0bxylL2FDpVUdvmr+aJxHn5UflSZqlBQMnnAyGnxgIuDi6wR8+jGRw8Xd6U5/JLOy3ds+JhMmJ0lGIBmBf4nAL6uu/L35EfLvAAAAAElFTkSuQmCC"/>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/images/connect_code_host.png
Normal file
|
After Width: | Height: | Size: 284 KiB |
BIN
docs/images/connection_create_secret.png
Normal file
|
After Width: | Height: | Size: 221 KiB |
BIN
docs/images/connection_nav.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
docs/images/create_connection_example.png
Normal file
|
After Width: | Height: | Size: 270 KiB |
BIN
docs/images/demo.mp4
Normal file
BIN
docs/images/github_connection.png
Normal file
|
After Width: | Height: | Size: 210 KiB |
BIN
docs/images/github_pat_scopes.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
docs/images/gitlab_connection.png
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
docs/images/gitlab_pat_scopes.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
docs/images/login.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
docs/images/onboard_complete.png
Normal file
|
After Width: | Height: | Size: 402 KiB |
BIN
docs/images/onboard_invite.png
Normal file
|
After Width: | Height: | Size: 215 KiB |
BIN
docs/images/org_create.png
Normal file
|
After Width: | Height: | Size: 183 KiB |
BIN
docs/images/sb_interface.png
Normal file
|
After Width: | Height: | Size: 286 KiB |
BIN
docs/images/secret_dropdown.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
docs/images/secrets_page.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
docs/images/settings_nav.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
73
docs/introduction.mdx
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
---
|
||||
title: Introduction
|
||||
description: "Welcome to the home of your new documentation"
|
||||
---
|
||||
|
||||
<img
|
||||
className="block dark:hidden"
|
||||
src="/images/hero-light.png"
|
||||
alt="Hero Light"
|
||||
/>
|
||||
<img
|
||||
className="hidden dark:block"
|
||||
src="/images/hero-dark.png"
|
||||
alt="Hero Dark"
|
||||
/>
|
||||
|
||||
## Setting up
|
||||
|
||||
Test
|
||||
|
||||
The first step to world-class documentation is setting up your editing environments.
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card
|
||||
title="Edit Your Docs"
|
||||
icon="pen-to-square"
|
||||
href="https://mintlify.com/docs/quickstart"
|
||||
>
|
||||
Get your docs set up locally for easy development
|
||||
</Card>
|
||||
<Card
|
||||
title="Preview Changes"
|
||||
icon="image"
|
||||
href="https://mintlify.com/docs/development"
|
||||
>
|
||||
Preview your changes before you push to make sure they're perfect
|
||||
</Card>
|
||||
</CardGroup>
|
||||
|
||||
## Make it yours
|
||||
|
||||
Update your docs to your brand and add valuable content for the best user conversion.
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card
|
||||
title="Customize Style"
|
||||
icon="palette"
|
||||
href="https://mintlify.com/docs/settings/global"
|
||||
>
|
||||
Customize your docs to your company's colors and brands
|
||||
</Card>
|
||||
<Card
|
||||
title="Reference APIs"
|
||||
icon="code"
|
||||
href="https://mintlify.com/docs/api-playground/openapi"
|
||||
>
|
||||
Automatically generate endpoints from an OpenAPI spec
|
||||
</Card>
|
||||
<Card
|
||||
title="Add Components"
|
||||
icon="screwdriver-wrench"
|
||||
href="https://mintlify.com/docs/content/components/accordions"
|
||||
>
|
||||
Build interactive features and designs to guide your users
|
||||
</Card>
|
||||
<Card
|
||||
title="Get Inspiration"
|
||||
icon="stars"
|
||||
href="https://mintlify.com/customers"
|
||||
>
|
||||
Check out our showcase of our favorite documentation
|
||||
</Card>
|
||||
</CardGroup>
|
||||
BIN
docs/logo/dark.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
21
docs/logo/dark.svg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/logo/light.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
21
docs/logo/light.svg
Normal file
|
After Width: | Height: | Size: 12 KiB |
97
docs/quickstart.mdx
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
---
|
||||
title: 'Quickstart'
|
||||
description: 'Start building awesome documentation in under 5 minutes'
|
||||
---
|
||||
|
||||
## Setup your development
|
||||
|
||||
Learn how to update your docs locally and deploy them to the public.
|
||||
|
||||
### Edit and preview
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion icon="github" title="Clone your docs locally">
|
||||
During the onboarding process, we created a repository on your Github with
|
||||
your docs content. You can find this repository on our
|
||||
[dashboard](https://dashboard.mintlify.com). To clone the repository
|
||||
locally, follow these
|
||||
[instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
|
||||
in your terminal.
|
||||
</Accordion>
|
||||
<Accordion icon="rectangle-terminal" title="Preview changes">
|
||||
Previewing helps you make sure your changes look as intended. We built a
|
||||
command line interface to render these changes locally.
|
||||
1. Install the
|
||||
[Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the
|
||||
documentation changes locally with this command: ``` npm i -g mintlify ```
|
||||
2. Run the following command at the root of your documentation (where
|
||||
`docs.json` is): ``` mintlify dev ```
|
||||
<Note>
|
||||
If you’re currently using the legacy ```mint.json``` configuration file, please update the Mintlify CLI:
|
||||
|
||||
|
||||
```npm i -g mintlify@latest```
|
||||
And run the new upgrade command in your docs repository:
|
||||
|
||||
```mintlify upgrade```
|
||||
You should now be using the new ```docs.json``` configuration file. Feel free to delete the ```mint.json``` file from your repository.
|
||||
</Note>
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
### Deploy your changes
|
||||
|
||||
<AccordionGroup>
|
||||
|
||||
<Accordion icon="message-bot" title="Install our Github app">
|
||||
Our Github app automatically deploys your changes to your docs site, so you
|
||||
don't need to manage deployments yourself. You can find the link to install on
|
||||
your [dashboard](https://dashboard.mintlify.com). Once the bot has been
|
||||
successfully installed, there should be a check mark next to the commit hash
|
||||
of the repo.
|
||||
</Accordion>
|
||||
<Accordion icon="rocket" title="Push your changes">
|
||||
[Commit and push your changes to
|
||||
Git](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository#about-git-push)
|
||||
for your changes to update in your docs site. If you push and don't see that
|
||||
the Github app successfully deployed your changes, you can also manually
|
||||
update your docs through our [dashboard](https://dashboard.mintlify.com).
|
||||
</Accordion>
|
||||
|
||||
</AccordionGroup>
|
||||
|
||||
## Update your docs
|
||||
|
||||
Add content directly in your files with MDX syntax and React components. You can use any of our components, or even build your own.
|
||||
|
||||
<CardGroup>
|
||||
|
||||
<Card title="Add Content With MDX" icon="file" href="/essentials/markdown">
|
||||
Add content to your docs with MDX syntax.
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
title="Add Code Blocks"
|
||||
icon="square-code"
|
||||
href="/essentials/code"
|
||||
>
|
||||
Add code directly to your docs with syntax highlighting.
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
title="Add Images"
|
||||
icon="image"
|
||||
href="/essentials/images"
|
||||
>
|
||||
Add images to your docs to make them more engaging.
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
title="Add Custom Components"
|
||||
icon="puzzle-piece"
|
||||
href="/essentials/reusable-snippets"
|
||||
>
|
||||
Add templates to your docs to make them more reusable.
|
||||
</Card>
|
||||
|
||||
</CardGroup>
|
||||
43
docs/self-hosting/deployment/source.mdx
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
title: Build from Source
|
||||
sidebarTitle: Build from Source
|
||||
---
|
||||
|
||||
<Note>Building from source is only required if you're making changes. The recommended way to self-host Sourcebot is to use the [pre-built docker image](/self-hosting/overview)</Note>
|
||||
|
||||
<Steps>
|
||||
<Step title="Install build requirements">
|
||||
<Note>A NodeJS version of at least 21.1.0 is required.</Note>
|
||||
1. [go](https://go.dev/doc/install)
|
||||
2. [NodeJS](https://nodejs.org/)
|
||||
3. [ctags](https://github.com/universal-ctags/ctags)
|
||||
```bash
|
||||
// macOS:
|
||||
brew install universal-ctags
|
||||
|
||||
// Linux:
|
||||
snap install universal-ctags
|
||||
```
|
||||
</Step>
|
||||
<Step title="Clone the repository">
|
||||
```bash
|
||||
git clone --recurse-submodules https://github.com/sourcebot-dev/sourcebot.git
|
||||
```
|
||||
</Step>
|
||||
<Step title="Build dependencies">
|
||||
```bash
|
||||
cd sourcebot
|
||||
make
|
||||
```
|
||||
</Step>
|
||||
<Step title="Start Sourcebot">
|
||||
``` bash
|
||||
yarn dev
|
||||
```
|
||||
</Step>
|
||||
<Step title="Navigate to Sourcebot">
|
||||
Start searching at `http://localhost:3000`
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
Congrats, you're now running Sourcebot from source! Check out our [getting started](/docs/getting-started) page to dive in.
|
||||
31
docs/self-hosting/overview.mdx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: Self-host Sourcebot
|
||||
sidebarTitle: Overview
|
||||
---
|
||||
|
||||
<Note>Want to use Sourcebot without self-hosting? Checkout [Sourcebot Cloud](https://sourcebot.dev/login)</Note>
|
||||
|
||||
<Warning></Warning>
|
||||
|
||||
Sourcebot is open source and can be self-hosted using our official Docker images. To get started, run the following command:
|
||||
|
||||
``` bash
|
||||
docker run -p 3000:3000 --rm --name sourcebot ghcr.io/sourcebot-dev/sourcebot:staging
|
||||
```
|
||||
|
||||
Navigate to `localhost:3000` to see your Sourcebot deployment in action. Check out our [Getting Started](/getting-started) guide to learn how to index your repos and use the tool.
|
||||
|
||||
Making changes to Sourcebot? Checkout our guide on how to [build from source](/self-hosting/deployment/source).
|
||||
|
||||
|
||||
### 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 don't collect or transmit [any information related to your codebase](https://sourcebot.dev/search/search?query=captureEvent%20repo%3Asourcebot%20case%3Ano). In addition, all events are [sanitized](https://github.com/sourcebot-dev/sourcebot/blob/HEAD/packages/web/src/app/posthogProvider.tsx) to ensure that no sensitive details (ex. ip address, query info) 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:
|
||||
|
||||
```bash
|
||||
docker run -e SOURCEBOT_TELEMETRY_DISABLED=1 /* additional args */ ghcr.io/sourcebot-dev/sourcebot:latest
|
||||
```
|
||||
4
docs/snippets/connection-cards.mdx
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<CardGroup cols={2}>
|
||||
<Card title="GitHub" icon="github" href="/docs/connections/github"></Card>
|
||||
<Card title="GitLab" icon="gitlab" href="/docs/connections/gitlab"></Card>
|
||||
</CardGroup>
|
||||