diff --git a/.env.secret b/.env.secret index 00e529c..d4e172f 100644 Binary files a/.env.secret and b/.env.secret differ diff --git a/.gitsecret/keys/pubring.kbx b/.gitsecret/keys/pubring.kbx index c7ae599..55935ee 100644 Binary files a/.gitsecret/keys/pubring.kbx and b/.gitsecret/keys/pubring.kbx differ diff --git a/README.md b/README.md index fcc3477..5389cff 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # kotaemon Quick and easy AI components to build Kotaemon - applicable in client -project. +projects. [Documentation](https://docs.bleh-internal.cinnamon.is/) @@ -52,7 +52,7 @@ pip install kotaemon@git+ssh://git@github.com/Cinnamon/kotaemon.git This repo uses [git-secret](https://sobolevn.me/git-secret/) to share credentials, which internally uses `gpg` to encrypt and decrypt secret files. -This repo uses `python-dotenv` to manage credentials stored as environment variable. +This repo also uses `python-dotenv` to manage credentials stored as environment variables. Please note that the use of `python-dotenv` and credentials are for development purposes only. Thus, it should not be used in the main source code (i.e. `kotaemon/` and `tests/`), but can be used in `examples/`. @@ -66,7 +66,7 @@ For users who don't have sudo privilege to install packages, follow the `Manual #### Gaining access -In order to gain access to the secret files, you must provide your gpg public file to anyone who has access and ask them to ask your key to the keyring. For a quick tutorial on generating your gpg key pair, you can refer to the `Using gpg` section from the [git-secret main page](https://sobolevn.me/git-secret/). +In order to gain access to the secret files, you must provide your gpg public file to anyone who has access and ask them to add your key to the keyring. For a quick tutorial on generating your gpg key pair, you can refer to the `Using gpg` section from the [git-secret main page](https://sobolevn.me/git-secret/). #### Decrypt the secret file @@ -84,43 +84,47 @@ git-secret reveal [filename] #### For Windows users -git-secret is currently not available for Windows, thus the easiest way is to use it in WSL (please use the latest version of WSL2). From there you have 2 options: +git-secret is currently not available for Windows, thus the easiest way is to use it in WSL (please use the latest version of WSL2). From there you can: -1. Using the gpg of WSL. +- Use the `gpg` and `git-secret` in WSL. - This is the most straight-forward option since you would use WSL just like any other unix environment. However, the downside is that you have to make WSL your main environment, which means WSL must have write permission on your repo. To achieve this, you must either: + This is the most straight-forward option since you would use WSL just like any other Unix environment. However, the downside is that you have to make WSL your main environment, which means WSL must have write permission on your repo. To achieve this, you must either: - - Clone and store your repo inside WSL's file system. - - Provide WSL with necessary permission on your Windows file system. This can be achieve by setting `automount` options for WSL. To do that, add these content to `/etc/wsl.conf` and then restart your sub-system. + - Clone and store your repo inside WSL's file system. + - Provide WSL with the necessary permission on your Windows file system. This can be achieved by setting `automount` options for WSL. To do that, add this content to `/etc/wsl.conf` and then restart your sub-system. - ```shell - [automount] - options = "metadata,umask=022,fmask=011" - ``` + ```shell + [automount] + options = "metadata,umask=022,fmask=011" + ``` - This enables all permissions for user owner. + This enables all permissions for user owner. -2. Using the gpg of Windows but with git-secret from WSL. +- (Optional) use `git-secret` and `gpg` from WSL in Windows. - For those who use Windows as the main environment, having to switch back and forth between Windows and WSL will be inconvenient. You can instead stay within your Windows environment and apply some tricks to use `git-secret` from WSL. + For those who use Windows as the main environment, having to switch back and forth between Windows and WSL will be inconvenient. You can instead stay within your Windows environment and apply some tricks to use `git-secret` from WSL. - - Install and setup `gpg` on Windows. - - Install `git-secret` on WSL. Now in Windows, you can invoke `git-secret` using `wsl git-secret`. - - Alternatively you can setup alias in CMD to shorten the syntax. Please refer to [this SO answer](https://stackoverflow.com/a/65823225) for the instruction. Some recommended aliases are: + - Install and setup `gpg` on WSL. Now in Windows you can invoke WSL's `gpg` + using `wsl gpg`. + - Install `git-secret` on WSL. Now in Windows you can invoke `git-secret` using `wsl git-secret`. + - Additionally, you can set up aliases in CMD to shorten the syntax. Please refer to [this SO answer](https://stackoverflow.com/a/65823225) for the instruction. Some recommended aliases are: - ```bat - @echo off + ```bat + @echo off - :: Commands - DOSKEY ls=dir /B $* - DOSKEY ll=dir /a $* - DOSKEY git-secret=wsl git-secret $* - DOSKEY gs=wsl git-secret $* - ``` + :: Commands + DOSKEY ls=dir /B $* + DOSKEY ll=dir /a $* + DOSKEY git-secret=wsl git-secret $* + DOSKEY gs=wsl git-secret $* + DOSKEY gpg=wsl gpg $* + ``` - Now you can invoke `git-secret` in CMD using `git-secret` or `gs`. + Now you can invoke `git-secret` in CMD using `git-secret` or `gs`. - - For Powershell users, similar behaviours can be achieved using `Set-Alias` and `profile.ps1`. Please refer this [SO thread](https://stackoverflow.com/questions/61081434/how-do-i-create-a-permanent-alias-file-in-powershell-core) as an example. + - For Powershell users, similar behaviours can be achieved using + `Set-Alias` and `profile.ps1`. Please refer to [this SO thread](https://stackoverflow.com/questions/61081434/how-do-i-create-a-permanent-alias-file-in-powershell-core) + as an example. ### Code base structure