Migrate to using docusaurus, rather than docsify for documentation (#603)

* Add docusaurus documentation (to replace the docsify setup
* Remove older docs
* Specify documentation as the gh pages build action working directory
This commit is contained in:
sabaimran 2024-01-07 20:28:15 +05:30 committed by GitHub
parent 98081bc0d3
commit 9b991eb4fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 15749 additions and 398 deletions

View file

@ -0,0 +1,37 @@
name: build and deploy github pages for documentation
on:
push:
branches:
- 'master'
jobs:
deploy:
environment:
name: github-pages
url: https://docs.khoj.dev
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# 👇 Build steps
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- name: Install dependencies
working-directory: documentation
run: yarn install --frozen-lockfile --non-interactive
- name: Build
run: yarn build
# 👆 Build steps
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# 👇 Specify build output path
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

View file

@ -1 +0,0 @@
docs.khoj.dev

View file

@ -1,14 +0,0 @@
<!-- _coverpage.md -->
![logo](./assets/khoj-logo-sideways-200.png)
> An open source, AI personal assistant for your notes
- Lightning fast search
- Multi-turn chat
- Keeps you in control of your data
[GitHub](https://github.com/khoj-ai/khoj)
[Get Started](#khoj)
![color](#f9f5de)

View file

@ -1,23 +0,0 @@
- Get Started
- [Overview](README.md)
- [Self-Host](setup.md)
- [Demos](demos.md)
- Use
- [Features](features.md)
- [Chat](chat.md)
- [Search](search.md)
- Clients
- [Desktop](desktop.md)
- [Obsidian](obsidian.md)
- [Emacs](emacs.md)
- [Web](web.md)
- Online Data Sources
- [Github](github_integration.md)
- [Notion](notion_integration.md)
- Contributing
- [Development](development.md)
- Miscellaneous
- [Telemetry](telemetry.md)
- [Advanced](advanced.md)
- [Performance](performance.md)
- [Credits](credits.md)

View file

@ -1,32 +0,0 @@
# Installing the Desktop Application [Deprecated -- for 0.11.4 and below]
We have beta desktop images available for download with new releases. This is recommended if you don't want to bother with the command line. Download the latest release from [here](https://github.com/khoj-ai/khoj/releases). You can find the latest release under the `Assets` section.
## MacOS
1. Download the latest release from [here](https://github.com/khoj-ai/khoj/releases).
- If your Mac uses one of the Silicon chips, then download the `Khoj_<version>_arm64.dmg` file. Otherwise, download the `Khoj_<version>_amd64.dmg` file.
2. Open the downloaded file and drag the Khoj app to your Applications folder.
## Windows
Make sure you meet the prerequisites for Windows installation. You can find them [here](windows_install.md#prerequisites).
1. Download the latest release from [here](https://github.com/khoj-ai/khoj/releases). You'll want the `khoj_<version>_amd64.exe` file.
2. Open the downloaded file and double click to install.
## Linux
For the Linux installation, you have to have `glibc` version 2.35 or higher. You can check your version with `ldd --version`.
1. Download the latest release from [here](https://github.com/khoj-ai/khoj/releases). You'll want the `khoj_<version>_amd64.deb` file.
2. In your downloads folder, run `sudo dpkg -i khoj_<version>_amd64.deb` to install Khoj.
# Uninstall
If you decide you want to uninstall the application, you can uninstall it like any other application on your system. For example, on MacOS, you can drag the application to the trash. On Windows, you can uninstall it from the `Add or Remove Programs` menu. On Linux, you can uninstall it with `sudo apt remove khoj`.
In addition to that, you might want to `rm -rf` the following directories:
- `~/.khoj`
- `~/.cache/gpt4all`

View file

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<!-- Open Graph metadata -->
<meta property="og:title" content="Khoj Documentation">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Khoj Documentation">
<meta property="og:description" content="Quickly get started with using or self-hosting Khoj">
<meta property="og:image" content="https://khoj-web-bucket.s3.amazonaws.com/link_preview_docs.png">
<meta property="og:url" content="https://docs.khoj.dev">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/buble.css" />
<link rel="icon" href="./assets/favicon-128x128.ico">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'Khoj',
repo: 'https://github.com/khoj-ai/khoj',
loadSidebar: true,
themeColor: '#c2a600',
auto2top: true,
// coverpage: true,
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-diff.min.js"></script>
<script defer data-domain="khoj.dev" src="https://plausible.io/js/script.js"></script>
</body>
<style>
video {
max-width: 800px;
}
</style>
</html>

View file

@ -1,23 +0,0 @@
# Windows Installation
These steps can be used to setup Khoj on a clean, new Windows 11 machine. It has been tested on a Windows VM
## Prerequisites
1. Ensure you have Visual Studio C++ Build tools installed. You can download it [from Microsoft here](https://visualstudio.microsoft.com/visual-cpp-build-tools/). At the minimum, you should have the following configuration:
<img width="1152" alt="Screenshot 2023-07-12 at 3 56 25 PM" src="https://github.com/khoj-ai/khoj/assets/65192171/b506a858-2f5e-4c85-946b-5422d83f112a">
2. Ensure you have Python installed. You can check by running `python --version`. If you don't, install the latest version [from here](https://www.python.org/downloads/).
- Ensure you have pip installed: `py -m ensurepip --upgrade`.
## Quick start
1. Open a PowerShell terminal.
2. Run `pip install khoj-assistant`
3. Start Khoj with `khoj`
## Installation in a Virtual Environment
Use this if you want to install with a virtual environment. This will make it much easier to manage your dependencies. You can read more about [virtual environments](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/) here.
1. Open a PowerShell terminal with the `Run as Administrator` privileges.
2. Create a virtual environment: `mkdir khoj && cd khoj && py -m venv .venv`
3. Activate the virtual environment: `.\.venv\Scripts\activate`. If you get a permissions error, then run `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned`.
4. Run `pip install khoj-assistant`
5. Start Khoj with `khoj`

20
documentation/.gitignore vendored Normal file
View file

@ -0,0 +1,20 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

41
documentation/README.md Normal file
View file

@ -0,0 +1,41 @@
# Website
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
### Installation
```
$ yarn
```
### Local Development
```
$ yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Using SSH:
```
$ USE_SSH=true yarn deploy
```
Not using SSH:
```
$ GIT_USER=<Your GitHub username> yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

View file

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 200 KiB

View file

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<path style="fill:#FFFFFF;" d="M494.933,384c0,61.184-49.749,110.933-110.933,110.933S273.067,445.184,273.067,384
S322.816,273.067,384,273.067S494.933,322.816,494.933,384z"/>
<path style="fill:#F0F0F0;" d="M384,273.067c-24.568,0-47.215,8.115-65.613,21.683c9.992-2.961,20.54-4.617,31.479-4.617
c61.184,0,110.933,49.749,110.933,110.933c0,36.617-17.894,69.043-45.321,89.25c45.884-13.602,79.454-56.073,79.454-106.317
C494.933,322.816,445.184,273.067,384,273.067z"/>
<path d="M435.2,349.867h-8.55c0-1.161,0.017-8.533,0.017-8.533c0-23.526-19.14-42.667-42.667-42.667s-42.667,19.14-42.667,42.667
v8.533H332.8c-14.114,0-25.6,11.486-25.6,25.6v51.2c0,14.114,11.486,25.6,25.6,25.6h102.4c14.114,0,25.6-11.486,25.6-25.6v-51.2
C460.8,361.353,449.314,349.867,435.2,349.867z M358.4,341.333c0-14.114,11.486-25.6,25.6-25.6c14.114,0,25.6,11.486,25.6,25.6
c0,0-0.017,7.356-0.017,8.533H358.4V341.333z M443.733,426.667c0,4.702-3.831,8.533-8.533,8.533H332.8
c-4.702,0-8.533-3.831-8.533-8.533v-51.2c0-4.702,3.831-8.533,8.533-8.533h17.067h68.267H435.2c4.702,0,8.533,3.831,8.533,8.533
V426.667z"/>
<path d="M392.533,384h-17.067c-4.71,0-8.533,3.823-8.533,8.533s3.823,8.533,8.533,8.533v8.533c0,4.71,3.823,8.533,8.533,8.533
s8.533-3.823,8.533-8.533v-8.533c4.71,0,8.533-3.823,8.533-8.533S397.244,384,392.533,384z"/>
<path d="M384,256c-70.579,0-128,57.421-128,128s57.421,128,128,128s128-57.421,128-128S454.579,256,384,256z M384,494.933
c-61.167,0-110.933-49.766-110.933-110.933S322.833,273.067,384,273.067S494.933,322.833,494.933,384S445.167,494.933,384,494.933z"
/>
<path d="M264.533,477.867H25.6c-3.866,0-8.533-3.806-8.533-8.533v-25.6c0-4.71-3.823-8.533-8.533-8.533S0,439.023,0,443.733v25.6
c0,13.636,11.964,25.6,25.6,25.6h238.933c4.71,0,8.533-3.823,8.533-8.533S269.244,477.867,264.533,477.867z"/>
<path d="M8.533,384c4.71,0,8.533-3.823,8.533-8.533V140.621c1.135-1.451,4.523-4.087,8.533-4.087h443.733
c4.702,0,8.533,3.831,8.533,8.533v119.467c0,4.71,3.823,8.533,8.533,8.533s8.533-3.823,8.533-8.533V145.067
c0-14.114-11.486-25.6-25.6-25.6V76.8c0-14.114-11.486-25.6-25.6-25.6H261.692c-1.835,0-3.652-0.606-5.12-1.707L197.402,5.12
C192.998,1.818,187.546,0,182.042,0H51.2C37.086,0,25.6,11.486,25.6,25.6v93.867c-13.79,0-25.6,10.948-25.6,19.908v236.092
C0,380.177,3.823,384,8.533,384z M409.6,119.467H85.333v-8.533c0-4.702,3.831-8.533,8.533-8.533h307.2
c4.702,0,8.533,3.831,8.533,8.533V119.467z M42.667,25.6c0-4.702,3.831-8.533,8.533-8.533h130.842c1.835,0,3.652,0.606,5.12,1.707
l59.17,44.373c4.403,3.302,9.856,5.12,15.36,5.12h182.042c4.702,0,8.533,3.831,8.533,8.533v42.667h-25.6v-8.533
c0-14.114-11.486-25.6-25.6-25.6h-307.2c-14.114,0-25.6,11.486-25.6,25.6v8.533h-25.6V25.6z"/>
<path d="M102.4,59.733c4.71,0,8.533-3.823,8.533-8.533s-3.823-8.533-8.533-8.533H68.267c-4.71,0-8.533,3.823-8.533,8.533
s3.823,8.533,8.533,8.533H102.4z"/>
<path d="M170.667,59.733h8.533c4.71,0,8.533-3.823,8.533-8.533s-3.823-8.533-8.533-8.533h-8.533c-4.71,0-8.533,3.823-8.533,8.533
S165.956,59.733,170.667,59.733z"/>
<circle cx="136.533" cy="51.2" r="8.533"/>
<circle cx="8.533" cy="409.6" r="8.533"/>
<path d="M128,324.267c4.71,0,8.533-3.823,8.533-8.533c0-46.473,22.588-70.221,30.976-78.635c3.738,1.075,7.612,1.835,11.691,1.835
c4.079,0,7.953-0.759,11.691-1.835c8.388,8.414,30.976,32.162,30.976,78.635c0,4.71,3.823,8.533,8.533,8.533
s8.533-3.823,8.533-8.533c0-47.787-21.018-74.863-32.375-86.997c9.276-7.834,15.309-19.405,15.309-32.469
c0-23.526-19.14-42.667-42.667-42.667s-42.667,19.14-42.667,42.667c0,13.065,6.033,24.636,15.309,32.469
c-11.358,12.134-32.375,39.211-32.375,86.997C119.467,320.444,123.29,324.267,128,324.267z M179.2,170.667
c14.114,0,25.6,11.486,25.6,25.6c0,14.114-11.486,25.6-25.6,25.6c-14.114,0-25.6-11.486-25.6-25.6
C153.6,182.153,165.086,170.667,179.2,170.667z"/>
<path d="M281.6,162.133c-18.825,0-34.133,15.309-34.133,34.133c0,8.602,3.302,16.367,8.567,22.374
c-8.465,10.146-8.567,20.42-8.567,28.826c0,4.71,3.823,8.533,8.533,8.533c4.71,0,8.533-3.823,8.533-8.533
c0-7.68,0.043-13.278,5.683-19.166c3.575,1.28,7.373,2.099,11.383,2.099s7.808-0.819,11.383-2.099
c5.641,5.888,5.683,11.486,5.683,19.166c0,4.71,3.823,8.533,8.533,8.533s8.533-3.823,8.533-8.533c0-8.405-0.102-18.679-8.567-28.826
c5.265-6.007,8.567-13.773,8.567-22.374C315.733,177.442,300.425,162.133,281.6,162.133z M281.6,213.333
c-9.412,0-17.067-7.654-17.067-17.067S272.188,179.2,281.6,179.2c9.412,0,17.067,7.654,17.067,17.067S291.012,213.333,281.6,213.333
z"/>
<path d="M76.8,162.133c-18.825,0-34.133,15.309-34.133,34.133c0,8.602,3.302,16.367,8.567,22.374
c-8.465,10.146-8.567,20.42-8.567,28.826c0,4.71,3.823,8.533,8.533,8.533s8.533-3.823,8.533-8.533c0-7.68,0.043-13.278,5.683-19.166
c3.575,1.28,7.373,2.099,11.383,2.099c4.011,0,7.808-0.819,11.383-2.099c5.641,5.888,5.683,11.486,5.683,19.166
c0,4.71,3.823,8.533,8.533,8.533c4.71,0,8.533-3.823,8.533-8.533c0-8.405-0.102-18.679-8.567-28.826
c5.265-6.007,8.567-13.773,8.567-22.374C110.933,177.442,95.625,162.133,76.8,162.133z M76.8,213.333
c-9.412,0-17.067-7.654-17.067-17.067S67.388,179.2,76.8,179.2s17.067,7.654,17.067,17.067S86.212,213.333,76.8,213.333z"/>
<g>
<path style="fill:#CC004E;" d="M300.629,252.928c-15.189,10.496-29.696,4.864-37.803-0.341c1.024-1.451,1.707-3.243,1.707-5.12
c0-7.68,0-13.312,5.717-19.2c3.499,1.28,7.339,2.133,11.349,2.133s7.851-0.853,11.349-2.133c5.717,5.888,5.717,11.52,5.717,19.2
C298.667,249.515,299.435,251.477,300.629,252.928z"/>
<circle style="fill:#CC004E;" cx="281.6" cy="196.267" r="17.067"/>
</g>
<g>
<path style="fill:#0F7BE4;" d="M229.12,324.181c-11.008,34.219-88.832,34.219-99.84,0c4.096-0.683,7.253-4.181,7.253-8.448
c0-46.507,22.613-70.229,30.976-78.677c3.755,1.109,7.595,1.877,11.691,1.877s7.936-0.768,11.691-1.877
c8.363,8.448,30.976,32.171,30.976,78.677C221.867,320,225.024,323.499,229.12,324.181z"/>
<circle style="fill:#0F7BE4;" cx="179.2" cy="196.267" r="25.6"/>
</g>
<path style="fill:#FDB50D;" d="M409.6,110.933v8.533H85.333v-8.533c0-4.693,3.84-8.533,8.533-8.533h307.2
C405.76,102.4,409.6,106.24,409.6,110.933z"/>
<path style="fill:#AFAFAF;" d="M477.867,264.533V145.067c0-4.693-3.84-8.533-8.533-8.533H25.6c-4.693,0-8.533,3.84-8.533,8.533
v230.4c0,4.693-3.84,8.533-8.533,8.533v17.067c4.693,0,8.533,3.84,8.533,8.533c0,4.693-3.84,8.533-8.533,8.533V435.2
c4.693,0,8.533,3.84,8.533,8.533v25.6c0,4.693,4.693,8.533,8.533,8.533h238.933c4.693,0,8.533,3.84,8.533,8.533h34.219
C276.139,463.019,256,425.813,256,384c0-70.571,57.429-128,128-128c41.813,0,79.019,20.139,102.4,51.285v-34.219
C481.707,273.067,477.867,269.227,477.867,264.533z M110.933,247.467c0,4.693-3.84,8.533-8.533,8.533
c-2.645,0-4.949-1.195-6.571-3.072c-15.189,10.496-29.696,4.864-37.803-0.341C56.491,254.635,54.016,256,51.2,256
c-4.693,0-8.533-3.84-8.533-8.533c0-8.363,0.085-18.688,8.533-28.843c-5.205-5.973-8.533-13.739-8.533-22.357
c0-18.859,15.275-34.133,34.133-34.133s34.133,15.275,34.133,34.133c0,8.619-3.328,16.384-8.533,22.357
C110.848,228.779,110.933,239.104,110.933,247.467z M230.4,324.267c-0.427,0-0.853,0-1.28-0.085
c-11.008,34.219-88.832,34.219-99.84,0c-0.427,0.085-0.853,0.085-1.28,0.085c-4.693,0-8.533-3.84-8.533-8.533
c0-47.787,20.992-74.837,32.341-87.04c-9.216-7.765-15.275-19.371-15.275-32.427c0-23.552,19.115-42.667,42.667-42.667
s42.667,19.115,42.667,42.667c0,13.056-6.059,24.661-15.275,32.427c11.349,12.203,32.341,39.253,32.341,87.04
C238.933,320.427,235.093,324.267,230.4,324.267z M315.733,247.467c0,4.693-3.84,8.533-8.533,8.533
c-2.645,0-4.949-1.195-6.571-3.072c-15.189,10.496-29.696,4.864-37.803-0.341C261.291,254.635,258.816,256,256,256
c-4.693,0-8.533-3.84-8.533-8.533c0-8.363,0.085-18.688,8.533-28.843c-5.205-5.973-8.533-13.739-8.533-22.357
c0-18.859,15.275-34.133,34.133-34.133c18.859,0,34.133,15.275,34.133,34.133c0,8.619-3.328,16.384-8.533,22.357
C315.648,228.779,315.733,239.104,315.733,247.467z"/>
<g>
<circle style="fill:#CC004E;" cx="76.8" cy="196.267" r="17.067"/>
<path style="fill:#CC004E;" d="M95.829,252.928c-15.189,10.496-29.696,4.864-37.803-0.341c1.024-1.451,1.707-3.243,1.707-5.12
c0-7.68,0-13.312,5.717-19.2c3.499,1.28,7.339,2.133,11.349,2.133c4.011,0,7.851-0.853,11.349-2.133
c5.717,5.888,5.717,11.52,5.717,19.2C93.867,249.515,94.635,251.477,95.829,252.928z"/>
</g>
<path style="fill:#7E939E;" d="M477.867,264.448V144.981c0-4.693-3.84-8.533-8.533-8.533h-25.6v111.019
c-12.117-5.12-25.344-8.107-39.168-8.533c-1.195-0.085-2.304-0.085-3.499-0.085c-15.104,0-29.525,3.072-42.667,8.533h-0.085
c-13.653,5.717-25.941,14.08-36.096,24.491c5.035-2.816,10.325-5.291,15.701-7.339c14.251-5.547,29.781-8.619,46.08-8.619
c21.589,0,41.899,5.376,59.733,14.848c16.811,8.789,31.317,21.333,42.667,36.437v-34.219
C481.707,272.981,477.867,269.141,477.867,264.448z"/>
<path style="fill:#F6981E;" d="M401.067,102.4h-34.133c4.693,0,8.533,3.84,8.533,8.533v8.533H409.6v-8.533
C409.6,106.24,405.76,102.4,401.067,102.4z"/>
<g>
<path style="fill:#215EFF;" d="M179.2,170.667c-0.137,0-0.273,0.043-0.41,0.043c10.103,3.43,17.476,12.919,17.476,24.149
c0,13.935-11.298,25.327-25.19,25.557c2.569,0.87,5.274,1.451,8.124,1.451c14.08,0,25.6-11.52,25.6-25.6
S193.28,170.667,179.2,170.667z"/>
<path style="fill:#215EFF;" d="M215.014,325.794c0,4.745,3.14,8.619,7.228,9.463c3.132-3.174,5.521-6.861,6.878-11.076
c-4.096-0.683-7.253-4.181-7.253-8.448c0-46.507-22.613-70.229-30.976-78.677c-2.022,0.597-4.079,1.067-6.178,1.399
C193.997,249.02,215.014,275.635,215.014,325.794z"/>
</g>
<g>
<path style="fill:#9B0045;" d="M291.337,247.467c0,1.724,2.21,6.332,3.644,8.678c1.869-0.845,3.755-1.903,5.658-3.217
c-1.203-1.451-1.971-3.413-1.971-5.461c0-7.68,0-13.312-5.717-19.2c-1.451,0.529-2.987,0.93-4.54,1.28
C291.635,234.854,291.337,241.041,291.337,247.467z"/>
<path style="fill:#9B0045;" d="M282.223,179.26c5.658,2.782,9.617,8.567,9.617,15.266c0,9.387-7.68,17.067-17.067,17.067
c-0.213,0-0.418-0.06-0.623-0.06c2.261,1.118,4.77,1.801,7.45,1.801c9.387,0,17.067-7.68,17.067-17.067
C298.667,187.093,291.319,179.601,282.223,179.26z"/>
<path style="fill:#9B0045;" d="M86.537,247.467c0,1.724,2.21,6.332,3.644,8.678c1.869-0.845,3.755-1.903,5.658-3.217
c-1.203-1.451-1.971-3.413-1.971-5.461c0-7.68,0-13.312-5.717-19.2c-1.451,0.529-2.987,0.93-4.54,1.28
C86.835,234.854,86.537,241.041,86.537,247.467z"/>
<path style="fill:#9B0045;" d="M77.423,179.26c5.658,2.782,9.617,8.567,9.617,15.266c0,9.387-7.68,17.067-17.067,17.067
c-0.213,0-0.418-0.06-0.623-0.06c2.261,1.118,4.77,1.801,7.45,1.801c9.387,0,17.067-7.68,17.067-17.067
C93.867,187.093,86.519,179.601,77.423,179.26z"/>
</g>
<path style="fill:#7E939E;" d="M443.733,68.267H261.717c-5.547,0-11.008-1.792-15.36-5.12l-59.221-44.373
c-1.451-1.109-3.243-1.707-5.12-1.707H51.2c-4.693,0-8.533,3.84-8.533,8.533v93.867h25.6v-8.533c0-14.08,11.52-25.6,25.6-25.6h307.2
c14.08,0,25.6,11.52,25.6,25.6v8.533h25.6V76.8C452.267,72.107,448.427,68.267,443.733,68.267z M102.4,59.733H68.267
c-4.693,0-8.533-3.84-8.533-8.533s3.84-8.533,8.533-8.533H102.4c4.693,0,8.533,3.84,8.533,8.533S107.093,59.733,102.4,59.733z
M136.533,59.733c-4.693,0-8.533-3.84-8.533-8.533s3.84-8.533,8.533-8.533s8.533,3.84,8.533,8.533S141.227,59.733,136.533,59.733z
M179.2,59.733h-8.533c-4.693,0-8.533-3.84-8.533-8.533s3.84-8.533,8.533-8.533h8.533c4.693,0,8.533,3.84,8.533,8.533
S183.893,59.733,179.2,59.733z"/>
<path style="fill:#FDB50D;" d="M435.2,366.933H332.8c-4.693,0-8.533,3.84-8.533,8.533v51.2c0,4.693,3.84,8.533,8.533,8.533h102.4
c4.693,0,8.533-3.84,8.533-8.533v-51.2C443.733,370.773,439.893,366.933,435.2,366.933z M392.533,401.067v8.533
c0,4.693-3.84,8.533-8.533,8.533s-8.533-3.84-8.533-8.533v-8.533c-4.693,0-8.533-3.84-8.533-8.533s3.84-8.533,8.533-8.533h17.067
c4.693,0,8.533,3.84,8.533,8.533S397.227,401.067,392.533,401.067z"/>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

Before

Width:  |  Height:  |  Size: 350 KiB

After

Width:  |  Height:  |  Size: 350 KiB

View file

Before

Width:  |  Height:  |  Size: 298 KiB

After

Width:  |  Height:  |  Size: 298 KiB

View file

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 302 KiB

View file

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 394 KiB

View file

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 358 KiB

View file

Before

Width:  |  Height:  |  Size: 544 KiB

After

Width:  |  Height:  |  Size: 544 KiB

View file

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View file

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 333 KiB

View file

Before

Width:  |  Height:  |  Size: 445 KiB

After

Width:  |  Height:  |  Size: 445 KiB

View file

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 333 KiB

View file

Before

Width:  |  Height:  |  Size: 420 KiB

After

Width:  |  Height:  |  Size: 420 KiB

View file

Before

Width:  |  Height:  |  Size: 478 KiB

After

Width:  |  Height:  |  Size: 478 KiB

View file

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 268 KiB

View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 511.999 511.999" xml:space="preserve">
<path style="fill:#C7CFE2;" d="M213.243,401.37v51.307c0,9.445,7.658,17.102,17.102,17.102h51.307
c9.445,0,17.102-7.658,17.102-17.102V401.37H213.243z"/>
<path style="fill:#AFB9D2;" d="M247.447,401.37h-34.204v51.307c0,9.445,7.658,17.102,17.102,17.102h34.204
c-9.445,0-17.102-7.658-17.102-17.102V401.37z"/>
<path style="fill:#959CB5;" d="M238.896,469.779v17.102c0,9.445,7.658,17.102,17.102,17.102s17.102-7.658,17.102-17.102v-17.102
H238.896z"/>
<path style="fill:#FFF082;" d="M427.02,179.042c0-97.508-81.603-175.957-180.242-170.779
c-88.466,4.643-160.002,78.719-161.766,167.29c-1.436,72.031,41.682,134.154,103.661,160.724c9.599,4.115,16.02,13.301,16.02,23.744
v24.247c0,9.446,7.656,17.102,17.102,17.102h68.409c9.446,0,17.102-7.656,17.102-17.102v-24.24c0-10.454,6.438-19.641,16.046-23.761
C384.313,310.119,427.02,249.575,427.02,179.042z"/>
<circle style="fill:#FFF8C1;" cx="255.997" cy="179.039" r="136.818"/>
<circle style="fill:#FFFCE6;" cx="255.997" cy="179.039" r="94.062"/>
<g>
<path style="fill:#9BF57D;" d="M366.118,125.236c0.581-2.991-2.017-5.59-5.008-5.008c-13.716,2.668-47.514,10.981-67.413,30.879
c-14.031,14.031-16.106,34.705-4.634,46.176c11.471,11.471,32.145,9.397,46.176-4.634
C355.139,172.75,363.45,138.952,366.118,125.236z"/>
<path style="fill:#9BF57D;" d="M145.88,176.543c-0.581-2.991,2.017-5.59,5.008-5.008c13.716,2.668,47.514,10.981,67.413,30.879
c14.031,14.031,16.106,34.705,4.634,46.176c-11.471,11.471-32.145,9.397-46.176-4.634
C156.859,224.057,148.548,190.259,145.88,176.543z"/>
</g>
<g>
<path style="fill:#8CE16E;" d="M176.759,243.956c14.03,14.03,34.705,16.105,46.176,4.634l-75.891-75.891
c-0.951,0.951-1.455,2.348-1.164,3.844C148.548,190.259,156.859,224.057,176.759,243.956z"/>
<path style="fill:#8CE16E;" d="M361.111,120.228c-13.716,2.668-47.514,10.98-67.413,30.879
c-14.03,14.03-16.105,34.705-4.634,46.176l75.891-75.891C364.003,120.442,362.606,119.937,361.111,120.228z"/>
</g>
<path style="fill:#FFDC64;" d="M281.652,401.37l-7.36-44.161c-0.687-4.124-4.254-7.146-8.435-7.146H246.14
c-4.18,0-7.747,3.022-8.435,7.146l-7.36,44.161"/>
<path d="M379.215,49.147C343.24,15.01,296.05-2.353,246.358,0.257c-44.808,2.352-86.977,21.744-118.741,54.606
c-31.749,32.847-49.727,75.652-50.62,120.53c-0.726,36.442,9.43,71.705,29.371,101.979c19.418,29.483,46.787,52.4,79.146,66.272
c6.781,2.907,11.162,9.335,11.162,16.376v24.247c0,7.507,3.315,14.25,8.551,18.857v49.551c0,13.851,11.268,25.119,25.119,25.119
h0.534v9.086c0,13.851,11.268,25.119,25.119,25.119c13.851,0,25.119-11.268,25.119-25.119v-9.086h0.534
c13.851,0,25.119-11.268,25.119-25.119v-25.581c0-0.02,0-0.041,0-0.06v-23.91c5.236-4.607,8.551-11.35,8.551-18.857v-24.24
c0-7.044,4.392-13.479,11.189-16.395c65.928-28.276,108.526-92.882,108.526-164.591C435.037,129.436,415.212,83.305,379.215,49.147z
M265.084,486.881c0,5.01-4.076,9.086-9.086,9.086s-9.086-4.076-9.086-9.086v-9.086h18.171V486.881z M290.737,452.677
c0,5.01-4.076,9.086-9.086,9.086h-51.307c-5.01,0-9.086-4.076-9.086-9.086v-1.979l69.478-13.896V452.677z M221.26,434.346v-24.96
h69.478v11.065L221.26,434.346z M221.26,408.414v-0.012C221.271,408.401,221.27,408.406,221.26,408.414z M239.809,393.354
l5.804-34.826c0.044-0.259,0.265-0.447,0.527-0.447h19.717c0.263,0,0.484,0.188,0.527,0.447l5.804,34.826H239.809z M320.192,328.898
c-12.697,5.446-20.902,17.665-20.902,31.129v24.24c0,5.01-4.076,9.086-9.086,9.086h-1.759l-6.243-37.462
c-1.337-8.022-8.21-13.844-16.342-13.844h-1.842v-90.447c0-11.563,4.503-22.435,12.679-30.611l13.093-13.093
c5.403,3.188,11.646,4.764,18.122,4.764c11.407,0,23.528-4.872,32.999-14.342c27.007-27.007,33.918-75.985,34.199-78.057
c0.336-2.481-0.506-4.976-2.276-6.746s-4.265-2.611-6.746-2.276c-2.071,0.281-51.051,7.193-78.057,34.199
c-14.847,14.847-18.381,36.197-9.576,51.117L265.36,209.65c-11.205,11.205-17.376,26.102-17.376,41.948v10.701l-14.437-14.437
c8.804-14.922,5.271-36.271-9.576-51.117c-27.007-27.007-75.985-33.918-78.057-34.199c-2.478-0.337-4.976,0.505-6.746,2.276
c-1.77,1.77-2.611,4.265-2.276,6.746c0.281,2.072,7.193,51.05,34.199,78.057c9.471,9.471,21.59,14.342,32.999,14.342
c6.475,0,12.718-1.577,18.121-4.764l25.773,25.773v57.072h-1.842c-8.132,0-15.005,5.822-16.342,13.844l-6.243,37.462h-1.759
c-5.01,0-9.086-4.076-9.086-9.086v-24.247c0-13.463-8.195-25.676-20.879-31.112c-29.464-12.631-54.387-33.502-72.074-60.356
c-18.149-27.554-27.391-59.658-26.73-92.84c0.81-40.82,17.19-79.781,46.117-109.707c28.935-29.935,67.309-47.6,108.053-49.737
c2.973-0.156,5.936-0.234,8.886-0.234c41.976,0,81.494,15.706,112.095,44.744c32.774,31.099,50.825,73.1,50.825,118.264
C419.004,244.33,380.218,303.152,320.192,328.898z M330.077,156.271c-3.131-3.131-8.207-3.131-11.337,0l-28.227,28.227
c-2.59-8.462,0.591-19.459,8.855-27.723c16.029-16.028,42.665-24.045,57.686-27.481c-3.436,15.021-11.453,41.658-27.481,57.686
c-8.264,8.264-19.26,11.445-27.723,8.855l28.227-28.227C333.207,164.477,333.207,159.402,330.077,156.271z M181.921,218.914
l28.227,28.227c-8.462,2.59-19.459-0.591-27.723-8.855c-16.028-16.029-24.045-42.665-27.481-57.686
c15.021,3.436,41.658,11.453,57.686,27.481c8.264,8.264,11.445,19.26,8.855,27.723l-28.226-28.227
c-3.131-3.131-8.207-3.131-11.337,0C178.791,210.709,178.791,215.784,181.921,218.914z"/>
</svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<polygon style="fill:#7F9058;" points="227.05,206.165 318.749,343.212 273.738,343.212 148.078,183.794 226.848,206.3 "/>
<polygon style="fill:#95AC66;" points="213.074,220.073 273.738,343.212 273.738,498.871 0,343.209 0,309.451 69.118,206.165
69.309,206.3 148.078,183.794 "/>
<polygon style="fill:#8CE6FE;" points="227.05,206.165 226.848,206.3 213.074,220.073 148.078,183.828 148.078,88.146 "/>
<polygon style="fill:#D9F7FF;" points="148.078,88.146 213.074,220.073 187.463,245.685 148.078,206.3 108.694,245.685
69.309,206.3 69.118,206.165 "/>
<polygon style="fill:#59473C;" points="442.888,206.158 512,309.449 512,343.209 363.916,421.975 363.916,183.788 442.685,206.293
"/>
<polygon style="fill:#875B51;" points="428.912,220.067 489.576,343.205 341.416,421.975 193.257,343.205 284.956,206.158
285.147,206.293 363.916,183.788 "/>
<polygon style="fill:#8CE6FE;" points="442.888,206.158 442.685,206.293 428.912,220.067 363.916,183.82 363.916,88.139 "/>
<polygon style="fill:#D9F7FF;" points="363.916,88.139 428.912,220.067 403.301,245.678 363.916,206.293 324.531,245.678
285.147,206.293 284.956,206.158 "/>
<polygon style="fill:#CAED73;" points="512,376.967 256,466.989 0,376.967 0,343.209 512,343.209 "/>
<polygon style="fill:#55B9D3;" points="512,376.967 512,436.044 500.747,444.484 512,452.923 512,469.802 500.747,478.242
512,486.681 512,512 478.242,512 433.231,444.484 478.242,376.967 "/>
<polygon style="fill:#8CE6FE;" points="478.242,376.967 478.242,512 0,512 0,419.165 11.253,410.725 0,402.286 0,376.967 "/>
<g>
<path style="fill:#FFFFFF;" d="M421.978,402.286H0v16.879h421.978c4.662,0,8.44-3.779,8.44-8.44
C430.418,406.064,426.64,402.286,421.978,402.286z"/>
<path style="fill:#FFFFFF;" d="M225.055,436.044c-4.662,0-8.44,3.779-8.44,8.44c0,4.661,3.778,8.44,8.44,8.44H512v-16.879H225.055z
"/>
<path style="fill:#FFFFFF;" d="M191.297,452.923H90.022c-4.662,0-8.44-3.779-8.44-8.44c0-4.661,3.778-8.44,8.44-8.44h101.275
c4.662,0,8.44,3.779,8.44,8.44C199.736,449.144,195.959,452.923,191.297,452.923z"/>
<path style="fill:#FFFFFF;" d="M410.725,469.802c-4.662,0-8.44,3.779-8.44,8.44s3.778,8.44,8.44,8.44H512v-16.879H410.725z"/>
</g>
<path style="fill:#FFA850;" d="M256,0v101.275c27.963,0,50.637-22.674,50.637-50.637S283.963,0,256,0z"/>
<path style="fill:#FECB69;" d="M256,0c12.434,0,22.505,22.674,22.505,50.637S268.434,101.275,256,101.275
c-27.963,0-50.637-22.674-50.637-50.637S228.037,0,256,0z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};

View file

@ -0,0 +1,8 @@
{
"label": "Clients",
"position": 4,
"link": {
"type": "generated-index",
"description": "Different ways for indexing data with the Khoj backend"
}
}

View file

@ -1,4 +1,11 @@
<h1><img src="./assets/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo"> Desktop</h1>
---
sidebar_position: 1
---
# Desktop
Get started with using the Desktop app to index any supported files with Khoj.
<h1><img src="/img/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo" /> Desktop</h1>
> An AI copilot for your Second Brain
@ -19,5 +26,6 @@
4. [Optional] Add any files, folders you'd like Khoj to be aware of on the *Settings* page and Click *Save*
## Interface
![](./assets/khoj_chat_on_desktop.png ':size=600px')
![](./assets/khoj_search_on_desktop.png ':size=600px')
| Chat | Search |
|:----:|:------:|
| ![](/img/khoj_chat_on_desktop.png) | ![](/img/khoj_search_on_desktop.png) |

View file

@ -1,12 +1,20 @@
<h1><img src="./assets/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo"> Emacs</h1>
---
sidebar_position: 2
---
# Emacs
Use Khoj with Emacs to search your Second Brain from within Emacs.
<h1><img src="/img/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo" /> Emacs</h1>
> An AI copilot for your Second Brain in Emacs
<img src="https://stable.melpa.org/packages/khoj-badge.svg" width="150" alt="Melpa Stable Badge">
<img src="https://melpa.org/packages/khoj-badge.svg" width="150" alt="Melpa Badge">
<img src="https://stable.melpa.org/packages/khoj-badge.svg" width="150" alt="Melpa Stable Badge" />
<img src="https://melpa.org/packages/khoj-badge.svg" width="150" alt="Melpa Badge" />
<img src="https://github.com/khoj-ai/khoj/actions/workflows/build_khoj_el.yml/badge.svg" width="150" alt="Build Badge">
<img src="https://github.com/khoj-ai/khoj/actions/workflows/test_khoj_el.yml/badge.svg" width="150" alt="Test Badge">
<img src="https://github.com/khoj-ai/khoj/actions/workflows/build_khoj_el.yml/badge.svg" width="150" alt="Build Badge" />
<img src="https://github.com/khoj-ai/khoj/actions/workflows/test_khoj_el.yml/badge.svg" width="150" alt="Test Badge" />
## Features
@ -19,19 +27,16 @@
- **Incremental**: Incremental search for a fast, search-as-you-type experience
## Interface
#### Search
![khoj search on emacs](./assets/khoj_search_on_emacs.png ':size=400px')
#### Chat
![khoj chat on emacs](./assets/khoj_chat_on_emacs.png ':size=400px')
| Search | Chat |
|:------:|:----:|
| ![khoj search on emacs](/img/khoj_search_on_emacs.png) | ![khoj chat on emacs](/img/khoj_chat_on_emacs.png) |
## Setup
1. Generate an API key on the [Khoj Web App](https://app.khoj.dev/config#clients)
2. Add below snippet to your Emacs config file, usually at `~/.emacs.d/init.el`
<!-- tabs:start -->
#### **Direct Install**
*Khoj will index your org-agenda files, by default*
@ -83,16 +88,15 @@ M-x package-install khoj
khoj-org-files '("~/docs/todo.org" "~/docs/work.org")))
```
<!-- tabs:end -->
## Use
### Search
See [Khoj Search](search.md) for details
See [Khoj Search](/features/search.md) for details
1. Hit `C-c s s` (or `M-x khoj RET s`) to open khoj search
2. Enter your query in natural language<br/>
E.g *"What is the meaning of life?"*, *"My life goals for 2023"*
### Chat
See [Khoj Chat](chat.md) for details
See [Khoj Chat](/features/chat.md) for details
1. Hit `C-c s c` (or `M-x khoj RET c`) to open khoj chat
2. Ask questions in a natural, conversational style<br/>
E.g *"When did I file my taxes last year?"*
@ -113,7 +117,7 @@ This feature finds entries similar to the one you are currently on.
- Note: If you have [speed keys](https://orgmode.org/manual/Speed-Keys.html) enabled, `o 2` will also work
### Khoj Menu
![](./assets/khoj_emacs_menu.png)
![](/img/khoj_emacs_menu.png)
Hit `C-c s` (or `M-x khoj`) to open the khoj menu above. Then:
- Hit `t` until you preferred content type is selected in the khoj menu
`Content Type` specifies the content to perform `Search`, `Update` or `Find Similar` actions on

View file

@ -1,4 +1,12 @@
<h1><img src="./assets/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo"> Obsidian</h1>
---
sidebar_position: 3
---
# Obsidian
Connect Obsidian to Khoj to search your notes and the web, and chat with your Second Brain.
<h1><img src="/img/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo" /> Obsidian</h1>
> An AI copilot for your Second Brain in Obsidian
@ -12,8 +20,10 @@
- **Incremental**: Incremental search for a fast, search-as-you-type experience
## Interface
![](./assets/khoj_search_on_obsidian.png ':size=400px')
![](./assets/khoj_chat_on_obsidian.png ':size=400px')
| Search | Chat |
|:------:|:----:|
| ![](/img/khoj_search_on_obsidian.png) | ![](/img/khoj_chat_on_obsidian.png) |
## Setup
@ -30,7 +40,7 @@ See the official [Obsidian Plugin Docs](https://help.obsidian.md/Extending+Obsid
Run *Khoj: Chat* from the [Command Palette](https://help.obsidian.md/Plugins/Command+palette) and ask questions in a natural, conversational style.<br />
E.g *"When did I file my taxes last year?"*
See [Khoj Chat](/chat) for more details
See [Khoj Chat](/docs/features/chat) for more details
### Find Similar Notes
To see other notes similar to the current one, run *Khoj: Find Similar Notes* from the [Command Palette](https://help.obsidian.md/Plugins/Command+palette)
@ -38,7 +48,7 @@ To see other notes similar to the current one, run *Khoj: Find Similar Notes* fr
### Search
Click the *Khoj search* icon 🔎 on the [Ribbon](https://help.obsidian.md/User+interface/Workspace/Ribbon) or run *Khoj: Search* from the [Command Palette](https://help.obsidian.md/Plugins/Command+palette)
See [Khoj Search](/search) for more details. Use [query filters](/advanced#query-filters) to limit entries to search
See [Khoj Search](/docs/features/search) for more details. Use [query filters](/docs/miscellaneous/advanced#query-filters) to limit entries to search
[search_demo](https://user-images.githubusercontent.com/6413477/218801155-cd67e8b4-a770-404a-8179-d6b61caa0f93.mp4 ':include :type=mp4')

View file

@ -1,4 +1,12 @@
<h1><img src="./assets/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo"> Web</h1>
---
sidebar_position: 4
---
# Web
Without any desktop clients, you can get started with using Khoj on the web for chat. Bear in mind you do need one of the desktop clients in order to index and sync your data with Khoj.
<h1><img src="/img/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo" /> Web</h1>
> An AI copilot for your Second Brain
@ -15,5 +23,7 @@
No setup required. The Khoj web app is the default interface to Khoj. You can access it from any web browser. Try it on [Khoj Cloud](https://app.khoj.dev)
## Interface
![](./assets/khoj_search_on_web.png ':size=400px')
![](./assets/khoj_chat_on_web.png ':size=400px')
| Search | Chat |
|:------:|:----:|
| ![](/img/khoj_search_on_web.png) | ![](/img/khoj_chat_on_web.png) |

View file

@ -0,0 +1,8 @@
{
"label": "Contributing",
"position": 2,
"link": {
"type": "generated-index",
"description": "Development Setup"
}
}

View file

@ -1,3 +1,7 @@
---
sidebar_position: 0
---
# Development
Welcome to the development docs of Khoj! Thanks for you interesting in being a contributor ❤️. Open source contributors are a corner-store of the Khoj community. We welcome all contributions, big or small.
@ -11,13 +15,15 @@ If you're looking for a place to get started, check out the list of [Github Issu
## Local Server Installation
### Using Pip
#### 1. Install
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
<!-- tabs:start -->
#### **MacOS**
```shell
```mdx-code-block
<Tabs>
<TabItem value="macos" label="MacOS">
```shell
# Get Khoj Code
git clone https://github.com/khoj-ai/khoj && cd khoj
@ -26,11 +32,10 @@ python3 -m venv .venv && source .venv/bin/activate
# For MacOS or zsh users run this
pip install -e '.[dev]'
```
#### **Windows**
```shell
```
</TabItem>
<TabItem value="win" label="Windows">
```shell
# Get Khoj Code
git clone https://github.com/khoj-ai/khoj && cd khoj
@ -39,13 +44,11 @@ python3 -m venv .venv && .venv\Scripts\activate
# Install Khoj for Development
pip install -e .[dev]
```
#### **Linux**
```shell
# Get Khoj Code
```
</TabItem>
<TabItem value="unix" label="Linux">
```shell
# Get Khoj Code
git clone https://github.com/khoj-ai/khoj && cd khoj
# Create, Activate Virtual Environment
@ -53,15 +56,15 @@ python3 -m venv .venv && source .venv/bin/activate
# Install Khoj for Development
pip install -e .[dev]
```
</TabItem>
</Tabs>
```
<!-- tabs:end -->
#### 2. Run
1. Start Khoj
```shell
```bash
khoj -vv
```
2. Configure Khoj
@ -115,7 +118,9 @@ In whichever clients you're using for testing, you'll need to update the server
### Before Creating PR
!> **Note**: You should be in an active virtual environment for Khoj in order to run the unit tests and linter.
:::tip[Note]
You should be in an active virtual environment for Khoj in order to run the unit tests and linter.
:::
1. Ensure that you have a [Github Issue](https://github.com/khoj-ai/khoj/issues) that can be linked to the PR. If not, create one. Make sure you've tagged one of the maintainers to the issue. This will ensure that the maintainers are notified of the PR and can review it. It's best discuss the code design on an existing issue or Discord thread before creating a PR. This helps get your PR merged faster.
1. Run unit tests.
@ -129,7 +134,7 @@ In whichever clients you're using for testing, you'll need to update the server
4. Think about how to add unit tests to verify the functionality you're adding in the PR. If you're not sure how to do this, ask for help in the Github issue or on Discord's `#contributors` channel.
### After Creating PR
1. Automated [validation workflows](.github/workflows) should run for every PR. Tag one of the maintainers in the PR to trigger it.
1. Automated [validation workflows](https://github.com/khoj-ai/khoj/tree/master/.github/workflows) should run for every PR. Tag one of the maintainers in the PR to trigger it.
## Obsidian Plugin Development
### Plugin development setup
@ -163,14 +168,14 @@ Follow the steps below to [release](https://github.com/debanjum/khoj/releases/)
## Architecture
![](./assets/khoj_architecture.png)
![](/img/khoj_architecture.png)
## Visualize Codebase
*[Interactive Visualization](https://mango-dune-07a8b7110.1.azurestaticapps.net/?repo=debanjum%2Fkhoj)*
![](./assets/khoj_codebase_visualization_0.2.1.png)
![](/img/khoj_codebase_visualization_0.2.1.png)
## Visualize Khoj Obsidian Plugin Codebase
![](./assets/khoj_obsidian_codebase_visualization_0.2.1.png)
![](/img/khoj_obsidian_codebase_visualization_0.2.1.png)

View file

@ -0,0 +1,8 @@
{
"label": "Features",
"position": 3,
"link": {
"type": "generated-index",
"description": "Features supported by Khoj"
}
}

View file

@ -1,10 +1,16 @@
## Features
---
sidebar_position: 1
---
#### [Search](search.md)
# Features
Khoj supports a variety of features, including search and chat with a wide range of data sources and interfaces.
#### [Search](/docs/features/search.md)
- **Local**: Your personal data stays local. All search and indexing is done on your machine.
- **Incremental**: Incremental search for a fast, search-as-you-type experience
#### [Chat](chat.md)
#### [Chat](/docs/features/chat.md)
- **Faster answers**: Find answers faster, smoother than search. No need to manually scan through your notes to find answers.
- **Iterative discovery**: Iteratively explore and (re-)discover your notes
- **Assisted creativity**: Smoothly weave across answers retrieval and content generation
@ -13,22 +19,17 @@
- **Natural**: Advanced natural language understanding using Transformer based ML Models
- **Pluggable**: Modular architecture makes it easy to plug in new data sources, frontends and ML models
- **Multiple Sources**: Index your Org-mode and Markdown notes, PDF files, Github repositories, and Photos
- **Multiple Interfaces**: Interact from your [Web Browser](./web.md), [Emacs](./emacs.md) or [Obsidian](./obsidian.md)
- **Multiple Interfaces**: Interact from your [Web Browser](/docs/clients/web.md), [Emacs](/docs/clients/emacs) or [Obsidian](/docs/clients/obsidian)
### Supported Interfaces
[![Khoj on Emacs](https://img.shields.io/badge/Emacs-%237F5AB6.svg?&style=for-the-badge&logo=gnu-emacs&logoColor=white)](./emacs.md)
[![Khoj on Emacs](https://img.shields.io/badge/Emacs-%237F5AB6.svg?&style=for-the-badge&logo=gnu-emacs&logoColor=white)](/docs/clients/emacs)
<span>&nbsp;</span>
[![Khoj on Obsidian](https://img.shields.io/badge/Obsidian-%23483699.svg?style=for-the-badge&logo=obsidian&logoColor=white)](./obsidian.md)
[![Khoj on Obsidian](https://img.shields.io/badge/Obsidian-%23483699.svg?style=for-the-badge&logo=obsidian&logoColor=white)](/docs/clients/obsidian)
### Supported Data Sources
- markdown*
- org-mode*
- pdf*
- images*
- [github](./github_integration.md)
- [notion](./notion_integration.md)
\* These data sources are offline only.
If you're using Github or Notion, you can get on a waitlist for [Khoj Cloud](https://khoj.dev).
- markdown
- org-mode
- pdf
- [github](/docs/online-data-sources/github_integration.md)
- [notion](/docs/online-data-sources/notion_integration.md)

View file

@ -1,4 +1,11 @@
## Khoj Chat
---
sidebar_position: 2
---
# Chat
You can configure Khoj to chat with you about anything. When relevant, it'll use any notes or documents you shared with it to respond.
### Overview
- Creates a personal assistant for you to inquire and engage with your notes
- You can choose to use Online or Offline Chat depending on your requirements
@ -18,12 +25,17 @@ Offline chat stays completely private and works without internet using open-sour
1. Open your [Khoj offline settings](http://localhost:42110/server/admin/database/offlinechatprocessorconversationconfig/) and click *Enable* on the Offline Chat configuration.
2. Open your [Chat model options](http://localhost:42110/server/admin/database/chatmodeloptions/) and add a new option for the offline chat model you want to use. Make sure to use `Offline` as its type. We currently only support offline models that use the [Llama chat prompt](https://replicate.com/blog/how-to-prompt-llama#wrap-user-input-with-inst-inst-tags) format. We recommend using `mistral-7b-instruct-v0.1.Q4_0.gguf`.
!> **Note**: Offline chat is not supported for a multi-user scenario. The host machine will encounter segmentation faults if multiple users try to use offline chat at the same time.
:::tip[Note]
Offline chat is not supported for a multi-user scenario. The host machine will encounter segmentation faults if multiple users try to use offline chat at the same time.
:::
#### Online Chat
Online chat requires internet to use ChatGPT but is faster, higher quality and less compute intensive.
!> **Warning**: This will enable Khoj to send your chat queries and query relevant notes to OpenAI for processing
:::danger[Warning]
This will enable Khoj to send your chat queries and query relevant notes to OpenAI for processing.
:::
1. Get your [OpenAI API Key](https://platform.openai.com/account/api-keys)
2. Open your [Khoj Online Chat settings](http://localhost:42110/server/admin/database/openaiprocessorconversationconfig/). Add a new setting with your OpenAI API key, and click *Save*. Only one configuration will be used, so make sure that's the only one you have.
@ -34,9 +46,9 @@ Online chat requires internet to use ChatGPT but is faster, higher quality and l
- **On Web**: Open [/chat](https://app.khoj.dev/chat) in your web browser
- **On Obsidian**: Search for *Khoj: Chat* in the [Command Palette](https://help.obsidian.md/Plugins/Command+palette)
- **On Emacs**: Run `M-x khoj <user-query>`
2. Enter your queries to chat with Khoj. Use [slash commands](#commands) and [query filters](./advanced.md#query-filters) to change what Khoj uses to respond
2. Enter your queries to chat with Khoj. Use [slash commands](#commands) and [query filters](/docs/miscellaneous/advanced.md#query-filters) to change what Khoj uses to respond
![](./assets/khoj_chat_on_web.png ':size=400px')
![](/img/khoj_chat_on_web.png ':size=400px')
#### Details
1. Your query is used to retrieve the most relevant notes, if any, using Khoj search
@ -47,4 +59,6 @@ Slash commands allows you to change what Khoj uses to respond to your query
- **/notes**: Limit chat to only respond using your notes, not just Khoj's general world knowledge as reference
- **/general**: Limit chat to only respond using Khoj's general world knowledge, not using your notes as reference
- **/default**: Allow chat to respond using your notes or it's general knowledge as reference. It's the default behavior when no slash command is used
- **/online**: Use online information and incorporate it in the prompt to the LLM to send you a response.
- **/image**: Generate an image in response to your query.
- **/help**: Use /help to get all available commands and general information about Khoj

View file

@ -1,10 +1,17 @@
## Khoj Search
---
sidebar_position: 3
---
# Search
Take advantage of super fast search to find relevant notes and documents from your Second Brain.
### Use
1. Open Khoj Search
- **On Web**: Open <https://app.khoj.dev/> in your web browser
- **On Web**: Open https://app.khoj.dev/ in your web browser
- **On Obsidian**: Click the *Khoj search* icon 🔎 on the [Ribbon](https://help.obsidian.md/User+interface/Workspace/Ribbon) or Search for *Khoj: Search* in the [Command Palette](https://help.obsidian.md/Plugins/Command+palette)
- **On Emacs**: Run `M-x khoj <user-query>`
2. Query using natural language to find relevant entries from your knowledge base. Use [query filters](./advanced.md#query-filters) to limit entries to search
2. Query using natural language to find relevant entries from your knowledge base. Use [query filters](/docs/miscellaneous/advanced.md#query-filters) to limit entries to search
### Demo
![](./assets/khoj_search_on_web.png ':size=400px')
![](/img/khoj_search_on_web.png ':size=400px')

View file

@ -0,0 +1,8 @@
{
"label": "Get Started",
"position": 1,
"link": {
"type": "generated-index",
"description": "Learn how to get started with using Khoj"
}
}

View file

@ -1,22 +1,22 @@
## Demos
---
sidebar_position: 2
---
# Demos
Check out a couple of demos and screenshots of Khoj in action.
### Screenshots
#### Web
![](./assets/khoj_search_on_web.png ':size=300px')
![](./assets/khoj_chat_on_web.png ':size=300px')
#### Obsidian
![](./assets/khoj_search_on_obsidian.png ':size=300px')
![](./assets/khoj_chat_on_obsidian.png ':size=300px')
#### Emacs
![](./assets/khoj_search_on_emacs.png ':size=300px')
![](./assets/khoj_chat_on_emacs.png ':size=400px')
| Web | Obsidian | Emacs |
|:---:|:--------:|:-----:|
| ![](/img/khoj_search_on_web.png ':size=300px') | ![](/img/khoj_search_on_obsidian.png ':size=300px') | ![](/img/khoj_search_on_emacs.png ':size=300px') |
| ![](/img/khoj_chat_on_web.png ':size=300px') | ![](/img/khoj_chat_on_obsidian.png ':size=300px') | ![](/img/khoj_chat_on_emacs.png ':size=400px') |
### Videos
#### Khoj in Obsidian
[KhojObsidian](https://github-production-user-asset-6210df.s3.amazonaws.com/6413477/240061700-3e33d8ea-25bb-46c8-a3bf-c92f78d0f56b.mp4 ':include :type=mp4')
[Link to Video](https://github-production-user-asset-6210df.s3.amazonaws.com/6413477/240061700-3e33d8ea-25bb-46c8-a3bf-c92f78d0f56b.mp4)
##### Installation
@ -33,7 +33,7 @@
- Jump to the [search result](https://marcus.se.net/obsidian-plugin-docs/publishing/submit-your-plugin)
#### Khoj in Emacs, Browser
[KhojEmacs](https://user-images.githubusercontent.com/6413477/184735169-92c78bf1-d827-4663-9087-a1ea194b8f4b.mp4 ':include :type=mp4')
[Link to Video](https://user-images.githubusercontent.com/6413477/184735169-92c78bf1-d827-4663-9087-a1ea194b8f4b.mp4)
##### Installation

View file

@ -1,4 +1,12 @@
<p align="center"><img src="./assets/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo"></p>
---
sidebar_position: 0
---
# Overview
Learn about Khoj and its features.
<p align="center"><img src="/img/khoj-logo-sideways-500.png" width="200" alt="Khoj Logo"></img></p>
<div align="center">
@ -27,26 +35,26 @@
Welcome to the Khoj Docs! This is the best place to get setup and explore Khoj's features.
- Khoj is an open source, personal AI
- You can [chat](chat.md) with it about anything. When relevant, it'll use any notes or documents you shared with it to respond
- Quickly [find](search.md) relevant notes and documents using natural language
- It understands pdf, plaintext, markdown, org-mode files, [notion pages](notion_integration.md) and [github repositories](github_integration.md)
- Access it from your [Emacs](emacs.md), [Obsidian](obsidian.md), [Web browser](web.md) or the [Khoj Desktop app](desktop.md)
- You can [chat](/features/chat.md) with it about anything. When relevant, it'll use any notes or documents you shared with it to respond
- Quickly [find](/features/search.md) relevant notes and documents using natural language
- It understands pdf, plaintext, markdown, org-mode files, [notion pages](/online-data-sources/notion_integration.md) and [github repositories](/online-data-sources/github_integration.md)
- Access it from your [Emacs](/clients/emacs.md), [Obsidian](/clients/obsidian.md), [Web browser](/clients/web.md) or the [Khoj Desktop app](/clients/desktop.md)
- You can self-host Khoj on your consumer hardware or share it with your family, friends or team from your private cloud
## Quickstart
- [Try Khoj Cloud](https://app.khoj.dev) to get started quickly
- [Read these instructions](./setup.md) to self-host a private instance of Khoj
- [Read these instructions](/get-started/setup.mdx) to self-host a private instance of Khoj
## Overview
<img src="https://docs.khoj.dev/assets/khoj_search_on_web.png" width="400px">
## At a Glance
<img src="https://docs.khoj.dev/assets/khoj_search_on_web.png" width="400px" />
<span>&nbsp;&nbsp;</span>
<img src="https://docs.khoj.dev/assets/khoj_chat_on_web.png" width="400px">
<img src="https://docs.khoj.dev/assets/khoj_chat_on_web.png" width="400px" />
#### [Search](search.md)
#### [Search](/features/search.md)
- **Natural**: Use natural language queries to quickly find relevant notes and documents.
- **Incremental**: Incremental search for a fast, search-as-you-type experience
#### [Chat](chat.md)
#### [Chat](/features/chat.md)
- **Faster answers**: Find answers faster, smoother than search. No need to manually scan through your notes to find answers.
- **Iterative discovery**: Iteratively explore and (re-)discover your notes
- **Assisted creativity**: Smoothly weave across answers retrieval and content generation

View file

@ -1,10 +1,22 @@
---
sidebar_position: 1
---
# Self-Host
Learn about how to self-host Khoj on your own machine.
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
## Setup
These are the general setup instructions for Khoj.
- Make sure [python](https://realpython.com/installing-python/) and [pip](https://pip.pypa.io/en/stable/installation/) are installed on your machine
- Check the [Khoj Emacs docs](/emacs?id=setup) to setup Khoj with Emacs<br />
- Check the [Khoj Emacs docs](/docs/clients/emacs?id=setup) to setup Khoj with Emacs<br />
It's simpler as it can skip the server *install*, *run* and *configure* step below.
- Check the [Khoj Obsidian docs](/obsidian?id=_2-setup-plugin) to setup Khoj with Obsidian<br />
- Check the [Khoj Obsidian docs](/docs/clients/obsidian?id=_2-setup-plugin) to setup Khoj with Obsidian<br />
Its simpler as it can skip the *configure* step below.
For Installation, you can either use Docker or install Khoj locally.
@ -33,63 +45,49 @@ Khoj should now be running at http://localhost:42110. You can see the web UI in
Khoj uses the `pgvector` package to store embeddings of your index in a Postgres database. In order to use this, you need to have Postgres installed.
<!-- tabs:start -->
#### **MacOS**
```mdx-code-block
<Tabs groupId="operating-systems">
<TabItem value="macos" label="MacOS">
Install [Postgres.app](https://postgresapp.com/). This comes pre-installed with `pgvector` and relevant dependencies.
#### **Windows**
1. Use the [recommended installer](https://www.postgresql.org/download/windows/)
2. Follow instructions to [Install PgVector](https://github.com/pgvector/pgvector#windows) in case you need to manually install it. Windows support is experimental for `pgvector` currently, so we recommend using Docker.
#### **Linux**
From [official instructions](https://wiki.postgresql.org/wiki/Apt)
```bash
sudo apt install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt install postgres-16 postgresql-16-pgvector
</TabItem>
<TabItem value="win" label="Windows">
1. Use the [recommended installer](https://www.postgresql.org/download/windows/).
2. Follow instructions to [Install PgVector](https://github.com/pgvector/pgvector#windows) in case you need to manually install it. Windows support is experimental for pgvector currently, so we recommend using Docker.
</TabItem>
<TabItem value="unix" label="Linux">
From [official instructions](https://wiki.postgresql.org/wiki/Apt)
</TabItem>
<TabItem value="source" label="From Source">
1. Follow instructions to [Install Postgres](https://www.postgresql.org/download/)
2. Follow instructions to [Install PgVector](https://github.com/pgvector/pgvector#installation) in case you need to manually install it.
</TabItem>
</Tabs>
```
##### **From Source**
1. Follow instructions to [Install Postgres](https://www.postgresql.org/download/)
2. Follow instructions to [Install PgVector](https://github.com/pgvector/pgvector#installation) in case you need to manually install it. Reproduced instructions below for convenience.
```bash
cd /tmp
git clone --branch v0.5.1 https://github.com/pgvector/pgvector.git
cd pgvector
make
make install # may need sudo
```
<!-- tabs:end -->
##### Create the Khoj database
Make sure to update your environment variables to match your Postgres configuration if you're using a different name. The default values should work for most people. When prompted for a password, you can use the default password `postgres`, or configure it to your preference. Make sure to set the environment variable `POSTGRES_PASSWORD` to the same value as the password you set here.
<!-- tabs:start -->
#### **MacOS**
```bash
```mdx-code-block
<Tabs groupId="operating-systems">
<TabItem value="macos" label="MacOS">
```shell
createdb khoj -U postgres --password
```
#### **Windows**
```bash
```
</TabItem>
<TabItem value="win" label="Windows">
```shell
createdb -U postgres khoj --password
```
#### **Linux**
```bash
```
</TabItem>
<TabItem value="unix" label="Linux">
```shell
sudo -u postgres createdb khoj --password
```
</TabItem>
</Tabs>
```
<!-- tabs:end -->
#### Install package
@ -98,64 +96,54 @@ sudo -u postgres createdb khoj --password
Run the following command in your terminal to install the Khoj backend.
<!-- tabs:start -->
#### **MacOS**
```shell
```mdx-code-block
<Tabs groupId="operating-systems">
<TabItem value="macos" label="MacOS">
```shell
python -m pip install khoj-assistant
```
#### **Windows**
```shell
py -m pip install khoj-assistant
```
For more detailed Windows installation and troubleshooting, see [Windows Install](./windows_install.md).
#### **Linux**
```shell
```
</TabItem>
<TabItem value="win" label="Windows">
```shell
py -m pip install khoj-assistant
```
</TabItem>
<TabItem value="unix" label="Linux">
```shell
python -m pip install khoj-assistant
```
</TabItem>
</Tabs>
```
<!-- tabs:end -->
##### Local Server Start
Before getting started, configure the following environment variables in your terminal for the first run
<!-- tabs:start -->
#### **MacOS**
```shell
export KHOJ_ADMIN_EMAIL=<your-email>
export KHOJ_ADMIN_PASSWORD=<your-password>
```mdx-code-block
<Tabs groupId="operating-systems">
<TabItem value="macos" label="MacOS">
```shell
export KHOJ_ADMIN_EMAIL=<your-email>
export KHOJ_ADMIN_PASSWORD=<your-password>
```
</TabItem>
<TabItem value="win" label="Windows">
If you're using PowerShell:
```shell
$env:KHOJ_ADMIN_EMAIL="<your-email>"
$env:KHOJ_ADMIN_PASSWORD="<your-password>"
```
</TabItem>
<TabItem value="unix" label="Linux">
```shell
export KHOJ_ADMIN_EMAIL=<your-email>
export KHOJ_ADMIN_PASSWORD=<your-password>
```
</TabItem>
</Tabs>
```
#### **Windows**
If you're using PowerShell:
```shell
$env:KHOJ_ADMIN_EMAIL="<your-email>"
$env:KHOJ_ADMIN_PASSWORD="<your-password>"
```
If you're using a Unix shell:
```shell
export KHOJ_ADMIN_EMAIL="<your-email>"
export KHOJ_ADMIN_PASSWORD="<your-password>"
```
#### **Linux**
```shell
export KHOJ_ADMIN_EMAIL=<your-email>
export KHOJ_ADMIN_PASSWORD=<your-password>
```
<!-- tabs:end -->
Run the following command from your terminal to start the Khoj backend and open Khoj in your browser.
@ -183,21 +171,24 @@ To use the desktop client, you need to go to your Khoj server's settings page (h
1. Go to http://localhost:42110/server/admin and login with your admin credentials.
1. Go to [OpenAI settings](http://localhost:42110/server/admin/database/openaiprocessorconversationconfig/) in the server admin settings to add an Open AI processor conversation config. This is where you set your API key. Alternatively, you can go to the [offline chat settings](http://localhost:42110/server/admin/database/offlinechatprocessorconversationconfig/) and simply create a new setting with `Enabled` set to `True`.
2. Go to the ChatModelOptions if you want to add additional models for chat. For example, you can specify `gpt-4` if you're using OpenAI or `mistral-7b-instruct-v0.1.Q4_0.gguf` if you're using offline chat. Make sure to configure the `type` field to `OpenAI` or `Offline` respectively.
1. Select files and folders to index [using the desktop client](./setup.md?id=_2-download-the-desktop-client). When you click 'Save', the files will be sent to your server for indexing.
1. Select files and folders to index [using the desktop client](/docs/get-started/setup?id=_2-download-the-desktop-client). When you click 'Save', the files will be sent to your server for indexing.
- Select Notion workspaces and Github repositories to index using the web interface.
> Note: Using Safari on Mac? You might not be able to login to the admin panel. Try using Chrome or Firefox instead.
:::tip[Note]
Using Safari on Mac? You might not be able to login to the admin panel. Try using Chrome or Firefox instead.
:::
### 4. Install Client Plugins (Optional)
Khoj exposes a web interface to search, chat and configure by default.<br />
The optional steps below allow using Khoj from within an existing application like Obsidian or Emacs.
- **Khoj Obsidian**:<br />
[Install](/obsidian?id=_2-setup-plugin) the Khoj Obsidian plugin
[Install](/docs/clients/obsidian?id=_2-setup-plugin) the Khoj Obsidian plugin
- **Khoj Emacs**:<br />
[Install](/emacs?id=setup) khoj.el
[Install](/docs/clients/emacs?id=setup) khoj.el
#### Setup host URL
To configure your host URL on your clients when self-hosting, use `http://127.0.0.1:42110`. This is the default value for the `KHOJ_HOST` environment variable. Note that `localhost` will not work.
@ -209,65 +200,63 @@ You can head to http://localhost:42110 to use the web interface. You can also us
## Upgrade
### Upgrade Khoj Server
<!-- tabs:start -->
#### **Local Setup**
```shell
pip install --upgrade khoj-assistant
```mdx-code-block
<Tabs groupId="environment">
<TabItem value="localsetup" label="Local Setup">
```shell
pip install --upgrade khoj-assistant
```
*Note: To upgrade to the latest pre-release version of the khoj server run below command*
</TabItem>
<TabItem value="docker" label="Docker">
From the same directory where you have your `docker-compose` file, this will fetch the latest build and upgrade your server.
```shell
docker-compose up --build
```
</TabItem>
<TabItem value="emacs" label="Emacs">
- Use your Emacs Package Manager to Upgrade
- See [khoj.el package setup](/docs/clients/emacs?id=setup) for details
</TabItem>
<TabItem value="obsidian" label="Obsidian">
- Upgrade via the Community plugins tab on the settings pane in the Obsidian app
- See the [khoj plugin setup](/docs/clients/obsidian?id=_2-setup-plugin) for details
</TabItem>
</Tabs>
```
*Note: To upgrade to the latest pre-release version of the khoj server run below command*
```shell
# Maps to the latest commit on the master branch
pip install --upgrade --pre khoj-assistant
```
#### **Docker**
From the same directory where you have your `docker-compose` file, this will fetch the latest build and upgrade your server.
```shell
docker-compose up --build
```
<!-- tabs:end -->
### Upgrade Khoj on Emacs
- Use your Emacs Package Manager to Upgrade
- See [khoj.el package setup](/emacs?id=setup) for details
### Upgrade Khoj on Obsidian
- Upgrade via the Community plugins tab on the settings pane in the Obsidian app
- See the [khoj plugin setup](/obsidian.md?id=_2-setup-plugin) for details
## Uninstall
### Uninstall Khoj Server
<!-- tabs:start -->
```mdx-code-block
<Tabs groupId="environment">
<TabItem value="localsetup" label="Local Setup">
```shell
# uninstall khoj server
pip uninstall khoj-assistant
#### **Local**
# delete khoj postgres db
dropdb khoj -U postgres
```
</TabItem>
<TabItem value="docker" label="Docker">
From the same directory where you have your `docker-compose` file, run the command below to remove the server to delete its containers, networks, images and volumes.
```shell
# uninstall khoj server
pip uninstall khoj-assistant
# delete khoj postgres db
dropdb khoj -U postgres
```shell
docker-compose down --volumes
```
</TabItem>
<TabItem value="emacs" label="Emacs">
Uninstall the khoj Emacs, or desktop client in the standard way from Emacs or your OS respectively
You can also `rm -rf ~/.khoj` to remove the Khoj data directory if did a local install.
</TabItem>
<TabItem value="obsidian" label="Obsidian">
Uninstall the khoj Obisidan, or desktop client in the standard way from Obsidian or your OS respectively
You can also `rm -rf ~/.khoj` to remove the Khoj data directory if did a local install.
</TabItem>
</Tabs>
```
#### **Docker**
From the same directory where you have your `docker-compose` file, run the command below to remove the server to delete its containers, networks, images and volumes.
```shell
docker-compose down --volumes
```
<!-- tabs:end -->
### Uninstall Khoj Clients
Uninstall the khoj emacs, obsidian or desktop client in the standard way from Emacs, Obsidian or your OS respectively
## Troubleshoot
#### Install fails while building Tokenizer dependency

View file

@ -0,0 +1,8 @@
{
"label": "Miscellaneous",
"position": 6,
"link": {
"type": "generated-index",
"description": "Additional resources for learning about Khoj"
}
}

View file

@ -1,5 +1,8 @@
---
sidebar_position: 3
---
## Advanced Usage
# Advanced Usage
### Search across Different Languages (Self-Hosting)
To search for notes in multiple, different languages, you can use a [multi-lingual model](https://www.sbert.net/docs/pretrained_models.html#multi-lingual-models).<br />

View file

@ -1,4 +1,9 @@
## Credits
---
sidebar_position: 4
---
# Credits
Many Open Source projects are used to power Khoj. Here's a few of them:
- [Multi-QA MiniLM Model](https://huggingface.co/sentence-transformers/multi-qa-MiniLM-L6-cos-v1), [All MiniLM Model](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) for Text Search. See [SBert Documentation](https://www.sbert.net/examples/applications/retrieve_rerank/README.html)
- [OpenAI CLIP Model](https://github.com/openai/CLIP) for Image Search. See [SBert Documentation](https://www.sbert.net/examples/applications/image-search/README.html)

View file

@ -1,4 +1,10 @@
## Performance
---
sidebar_position: 2
---
# Performance
Here are some top-level performance metrics for Khoj. These are rough estimates and will vary based on your hardware and data.
### Search performance

View file

@ -1,4 +1,8 @@
# Telemetry (self-hosting)
---
sidebar_position: 1
---
# Telemetry
We collect some high level, anonymized metadata about usage of Khoj. This includes:
- Client (Web, Emacs, Obsidian)

View file

@ -0,0 +1,8 @@
{
"label": "Online Data Sources",
"position": 5,
"link": {
"type": "generated-index",
"description": "Online data sources for indexing via Khoj"
}
}

View file

@ -1,4 +1,4 @@
# 🧑🏾‍💻 Setup the Github integration
# Setup the Github integration
The Github integration allows you to index as many repositories as you want. It's currently default configured to index Issues, Commits, and all Markdown/Org files in each repository. For large repositories, this takes a fairly long time, but it works well for smaller projects.

View file

@ -1,6 +1,6 @@
## 📜 Notion Integration
# Notion Integration
Khoj now supports search/chat with pages in your Notion workspaces. [Notion](notion.so/) is a platform people use for taking notes, especially for collaboration.
The Notion integration allows you to search/chat with your Notion workspaces. [Notion](https://notion.so/) is a platform people use for taking notes, especially for collaboration.
We haven't setup a fancy integration with OAuth yet, so this integration still requires some effort on your end to generate an API key.

View file

@ -0,0 +1,158 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Khoj AI',
tagline: 'Merge AI with your brain.',
staticDirectories: ['assets'],
favicon: 'img/favicon-128x128.ico',
// Set the production url of your site here
url: 'https://docs.khoj.dev',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'khoj-ai', // Usually your GitHub org/user name.
projectName: 'khoj', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/khoj-logo-sideways-500.png',
announcementBar: {
backgroundColor: '#fcc50b',
content: "Give us a star on <a target='_blank' rel='noopener noreferrer' href='https://github.com/khoj-ai/khoj'>GitHub</a>!"
},
metadata: [
{name: 'keywords', content: 'khoj, khoj ai, chatgpt, open ai, open source, productivity'},
{name: 'og:title', content: 'Khoj Documentation'},
{name: 'og:type', content: 'website'},
{name: 'og:site_name', content: 'Khoj Documentation'},
{name: 'og:description', content: 'Quickly get started with using or self-hosting Khoj'},
{name: 'og:image', content: 'https://khoj-web-bucket.s3.amazonaws.com/link_preview_docs.png'},
{name: 'og:url', content: 'https://docs.khoj.dev'},
{name: 'keywords', content: 'khoj, khoj ai, chatgpt, open ai, open source, productivity'}
],
navbar: {
title: 'Khoj',
logo: {
alt: 'Khoj AI',
src: 'img/favicon-128x128.ico',
},
items: [
{
type: 'docSidebar',
position: 'left',
label: 'Docs',
sidebarId: 'tutorialSidebar',
},
// {to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/khoj-ai/khoj',
label: 'Khoj',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Get Started',
to: '/docs/get-started/overview',
},
],
},
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/BDgyabRM6e',
},
{
label: 'Twitter',
href: 'https://twitter.com/sabaimran_go',
},
{
label: 'LinkedIn',
href: 'https://www.linkedin.com/company/khoj-ai/'
}
],
},
{
title: 'More',
items: [
// {
// label: 'Blog',
// to: '/blog',
// },
{
label: 'GitHub',
href: 'https://github.com/khoj-ai/khoj',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Khoj, Inc.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};
export default config;

14629
documentation/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,44 @@
{
"name": "documentation",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.1.0",
"@docusaurus/preset-classic": "3.1.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.1.0",
"@docusaurus/types": "3.1.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
}
}

33
documentation/sidebars.js Normal file
View file

@ -0,0 +1,33 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
*/
};
export default sidebars;

View file

@ -0,0 +1,61 @@
import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
const FeatureList = [
{
title: 'Connect your knowledge',
Svg: require('@site/assets/img/mountains-lake.svg').default,
description: (
<>
Khoj can understand your PDFs, markdown, org, and other plaintext files. Connect your knowledge base using one of our <a href="https://khoj.dev/downloads">desktop apps</a> or <a href="/docs/category/clients">other client apps</a>.
</>
),
},
{
title: 'Simplify your thinking',
Svg: require('@site/assets/img/lightbulb-plant.svg').default,
description: (
<>
Get your knowledge base out of your head and into Khoj. Khoj is a tool for thinking, learning, and making things.
</>
),
},
{
title: 'Run privately',
Svg: require('@site/assets/img/folder_security.svg').default,
description: (
<>
You can run Khoj on your own computer, or on your own server. All of our code is open source, and you can <a href="/docs/get-started/setup">set it up</a> in minutes.
</>
),
},
];
function Feature({Svg, title, description}) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}

View file

@ -0,0 +1,11 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}
.featureSvg {
height: 200px;
width: 200px;
}

View file

@ -0,0 +1,30 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #fcc50b;
--ifm-color-primary-dark: #fcc50b;
--ifm-color-primary-darker: #fcc50b;
--ifm-color-primary-darkest: #fcc50b;
--ifm-color-primary-light: #fcc50b;
--ifm-color-primary-lighter: #fcc50b;
--ifm-color-primary-lightest: #fcc50b;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #fcc50b;
--ifm-color-primary-dark: #fcc50b;
--ifm-color-primary-darker: #fcc50b;
--ifm-color-primary-darkest: #fcc50b;
--ifm-color-primary-light: #fcc50b;
--ifm-color-primary-lighter: #fcc50b;
--ifm-color-primary-lightest: #fcc50b;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

View file

@ -0,0 +1,43 @@
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import Heading from '@theme/Heading';
import styles from './index.module.css';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/get-started/overview">
Get Started
</Link>
</div>
</div>
</header>
);
}
export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`👋🏽 from ${siteConfig.title}`}
description="Get started with the Khoj Documentation">
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}

View file

@ -0,0 +1,23 @@
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.heroBanner {
padding: 4rem 0;
text-align: center;
position: relative;
overflow: hidden;
}
@media screen and (max-width: 996px) {
.heroBanner {
padding: 2rem;
}
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
}

View file

@ -0,0 +1,7 @@
---
title: Markdown page example
---
# Markdown page example
You don't need React to write simple standalone pages.