AI Companion

by Kowshik
5
4
3
2
1
Score: 50/100

Description

The AI Companion plugin adds an in-note AI assistant that can be summoned instantly using a simple slash command. It allows users to ask questions, get written responses, and pull content from existing notes to shape more relevant answers. Context handling is central here. You can attach one or more pages before asking, which makes the output grounded in your own material instead of generic text. Responses are not locked inside a modal either; they can be inserted straight into the current note with a single action, keeping the writing flow intact. The plugin relies on OpenAI's language models, so behaviour and quality are consistent with that ecosystem.

Reviews

No reviews yet.

Stats

0
stars
357
downloads
0
forks
136
days
135
days
141
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

RequirementsExperimental

  • openai api key

Latest Version

5 months ago

Changelog

v1.0.9: Fix modal freeze issue, simplify codebase, update naming Changes:

  • Fix modal freeze when clicking close button
  • Remove custom dragging functionality that caused issues
  • Simplify modal to use Obsidian's built-in Modal class properly
  • Update naming from 'Obsidian AI Assistant' to 'AI Companion'
  • Update LICENSE copyright
  • Remove unused styles-extra.css
  • Remove unused openai dependency
  • Fix CSS to not override core Obsidian styles
  • Remove document-level keydown listener
  • Clean up settings tab (remove redundant heading)

README file from

Github

AI Companion Plugin

An AI assistant plugin for Obsidian that allows you to ask questions, get responses, and include page content as context.

Features

  • Quick access with /ai command: Simply type /ai in any note and press Enter to open the assistant.
  • Context-aware responses: Add notes as context to get more relevant answers.
  • Insert into notes: Insert AI responses directly into your notes with a single click.
  • OpenAI integration: Powered by OpenAI's advanced language models.

Usage

  1. Type /ai in any note and press Enter to summon the AI assistant.
  2. Type your question in the text area.
  3. (Optional) Add context from other notes by clicking "Add Page to Context".
  4. Click "Ask" or press Ctrl/Cmd+Enter to get a response.
  5. Click "Insert to Note" to add the AI's response to your current note.

Requirements

  • An OpenAI API key (Configure in the plugin settings)

Demo Video

Watch the video

First time developing plugins?

Quick starting guide for new plugin devs:

  • Check if someone already developed a plugin for what you want! There might be an existing plugin similar enough that you can partner up with.
  • Make a copy of this repo as a template with the "Use this template" button (login to GitHub if you don't see it).
  • Clone your repo to a local development folder. For convenience, you can place this folder in your .obsidian/plugins/your-plugin-name folder.
  • Install NodeJS, then run npm i in the command line under your repo folder.
  • Run npm run dev to compile your plugin from main.ts to main.js.
  • Make changes to main.ts (or create new .ts files). Those changes should be automatically compiled into main.js.
  • Reload Obsidian to load the new version of your plugin.
  • Enable plugin in settings window.
  • For updates to the Obsidian API run npm update in the command line under your repo folder.

Releasing new releases

  • Update your manifest.json with your new version number, such as 1.0.1, and the minimum Obsidian version required for your latest release.
  • Update your versions.json file with "new-plugin-version": "minimum-obsidian-version" so older versions of Obsidian can download an older version of your plugin that's compatible.
  • Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix v. See here for an example: https://github.com/obsidianmd/obsidian-sample-plugin/releases
  • Upload the files manifest.json, main.js, styles.css as binary attachments. Note: The manifest.json file must be in two places, first the root path of your repository and also in the release.
  • Publish the release.

You can simplify the version bump process by running npm version patch, npm version minor or npm version major after updating minAppVersion manually in manifest.json. The command will bump version in manifest.json and package.json, and add the entry for the new version to versions.json

Adding your plugin to the community plugin list

How to use

  • Clone this repo.
  • Make sure your NodeJS is at least v16 (node --version).
  • npm i or yarn to install dependencies.
  • npm run dev to start compilation in watch mode.

Manually installing the plugin

  • Copy over main.js, styles.css, manifest.json to your vault VaultFolder/.obsidian/plugins/your-plugin-id/.

Improve code quality with eslint (optional)

  • ESLint is a tool that analyzes your code to quickly find problems. You can run ESLint against your plugin to find common bugs and ways to improve your code.
  • To use eslint with this project, make sure to install eslint from terminal:
    • npm install -g eslint
  • To use eslint to analyze this project use this command:
    • eslint main.ts
    • eslint will then create a report with suggestions for code improvement by file and line number.
  • If your source code is in a folder, such as src, you can use eslint with this command to analyze all files in that folder:
    • eslint ./src/

Funding URL

You can include funding URLs where people who use your plugin can financially support it.

The simple way is to set the fundingUrl field to your link in your manifest.json file:

{
    "fundingUrl": "https://buymeacoffee.com"
}

If you have multiple URLs, you can also do:

{
    "fundingUrl": {
        "Buy Me a Coffee": "https://buymeacoffee.com",
        "GitHub Sponsor": "https://github.com/sponsors",
        "Patreon": "https://www.patreon.com/"
    }
}

API Documentation

See https://github.com/obsidianmd/obsidian-api

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
AI Commander
3 years ago by Simon Yang
AI for Templater
2 years ago by TfTHacker
Extends Templater with AI Chat commands using the OpenAI Client Library
AI Helper
a year ago by David Connolly
AI Image OCR
8 months ago by Rootiest
Obsidian plugin for AI-powered text extraction from images
AI Notes Summary
3 years ago by R. Ian Bull (irbull)
An Obsidian plugin that uses ChatGPT to generate a summary of referenced notes
AI Transcriber
3 months ago by Musashino Software
AI-powered speech-to-text transcription using OpenAI GPT-4o and Whisper APIs
AI-AnkiSync
a year ago by goev
ai-writer
2 years ago by Donovan Ye
A plugin for Obsidian that uses AI to help you write better and faster.
Aloud
2 years ago by Adrian Lyjak
Obsidian TTS Plugin
Atomizer
a year ago by Zac Bagley
An AI-Driven Obsidian plugin designed to turn lengthy text into insightful atomic notes. Perfect for turning source notes into ideas in a Zettelkasten workflow.
Auto Tag
3 years ago by Control Alt
Easily generate relevant tags for your Obsidian notes.
brAIn
3 years ago by lusob
Canvas LLM Extender
2 years ago by Pasi Saarinen
Let the OpenAI LLM add nodes to your Obsidian canvas
CAO
a year ago by Godot
Claude AI for Obsidian
CoCo AskAI
2 years ago by Yukee
CoCo-AskAI is an Obsidian plugin that enables AI-powered note assistance, enhancing the writing experience with customizable functions.
deepseek-ai-assistant
9 months ago by algernon
Explain Selection With AI
2 years ago by Ben Wurster
This is my first go at making an Obsidian plugin to elaborate on and describe selected bits of information and their context.
Gene 🧬
3 years ago by Matiss Jurevics
An AI assistant plugin for Obsidian
hello nemesis
a year ago by Dian
Intelligence
2 years ago by John Mavrick
Large Language Models
a year ago by eharris128, r-mahoney, & jsmorabito
The LLM plugin gives Obsidian users access to local and web-based, large language models via several chat interfaces: modal, widget, FAB window, and commands.
LLM docs
10 months ago by Shane Lamb
Chat with LLM in regular markdown files in Obsidian
MantouAI
2 years ago by Morino Pan
MantouAI—— 让Obsidian变身智能助手
Notes Refresher
2 years ago by Connor Park
Obsidian plugin for AI-generated note refreshers
NoteSmith
8 months ago by csteamengine
Pieces for Developers
3 years ago by Pieces For Developers
Pieces' powerful extension for Obsidian-MD that allows users to access their code snippets directly within the Obsidian workspace
Publish Note to Mowen Note
9 months ago by ziyou
This is a mowen plugin for Obsidian (https://obsidian.md)
Rapid AI
2 years ago by Rapid AI
AI Assistant for selected text and generating content with Markdown. Shortcuts and quick action buttons provide instant AI assistance. It provides a high availability API for unlimited Chat GPT request rates, so you can ensure smooth work for any workload.
Research Quest
a year ago by Nathan Arthur
Ring a secretary
3 years ago by vorotamoroz
Semantic Search
3 years ago by bbawj
Semantic search for Obsidian.md
Silicon AI
3 years ago by deepfates
Add some intelligence to your notes with Silicon AI for Obsidian
Text Generator
4 years ago by Noureddine Haouari
Text Generator is a versatile plugin for Obsidian that allows you to generate text content using various AI providers, including OpenAI, Anthropic, Google and local models.
text2anki-openai
3 years ago by Mani Batra
Vault LLM Assistant
a year ago by Brians Tjipto
An obsidian notebook plugin that uses LLM (OpenAI or Gemini) to answer questions and create new notes about your vault
WeWrite
a year ago by Learner Chen
Obsidian plugin to render note as WeChat MP article.
You and Your Research
2 years ago by Neo Zhang