A Generative AI-based assistant for Obsidian.
Go to Community Plugins and search 'AIssist'.
- Clone this repo into your
plugins
directory in your Obsidian vault - Verify you have NodeJS installed, or install it with
brew install node
. - Run
npm i
andnpm run build
in the command line under the plugin folder.
Obsidian Settings
> Community plugins
> AIssist
:
- Insert your OpenAI API Key
- Enter your preferred OpenAI Chat API Model (default: "gpt-4o")
Obsidian Settings
> Hotkeys
:
- (optional) Configure a hotkey for the
Chat
and/orPrompt
commands
Press Ctrl + p
(or your hotkey of choice) to invoke the Command Palette. The following commands are available for AIssist:
- Prompt
- Chat
For all commands, the prompt that will be passed to the LLM is either
- the currently highlighted text, or
- the text between a double slash ("//", can be changed in Settings) and the cursor position.
Queries the LLM and returns its answer. The LLM does not consider the contents of the Note as context and instead threats the query as an independent request, regardless of other ones already stored in the Note.
Queries the LLM and returns its answer. In providing the answer, the LLM considers the contents of the Note as context, similar to ChatGPT's behavior.
- Add Status bar items
- Add OpenAI Stop command
- Make user emoji a Setting
- [Bugfix] Inserting a prompt in the middle of text with "selection" method works, but with the prompt delimiter (e.g. "//") doesn't.
- Verify you have NodeJS installed, or install it with
brew install node
. - Copy
main.ts
,settings.ts
,manifest.json
,esbuild.config.mjs
over to your vault (VaultFolder/.obsidian/plugins/your-plugin-name/
). - Run
npm init -y
to create apackage.json
file - In
package.json
, replace:- the
"scripts"
section inpackage.json
with
"scripts": { "dev": "node esbuild.config.mjs", "build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production", "version": "node version-bump.mjs && git add manifest.json versions.json" },
- "index.js" with "main.ts"
- the
- Run
npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint esbuild typescript builtin-modules obsidian
to install the required packages - Run
npm run dev
to start compilation in watch mode.