m0370306 downloadsChat with multiple LLMs (Claude, GPT, Gemini) in your vault. Mobile-first design with secure API key management.
Chat with multiple LLMs (Claude, GPT, Gemini) in your vault. Mobile-first design with RAG-powered vault search and secure API key management.
Works on all platforms — iPhone / iPad / Mac / Windows / Android.
| Provider | Example Models | API Key | Streaming | Notes |
|---|---|---|---|---|
| OpenAI | GPT-5, GPT-5.2 | Required | Yes | |
| Anthropic | Claude Opus 4.6, Sonnet 4.6, Haiku 4.5 | Required | Chunked | Uses requestUrl() due to CORS |
| Google Gemini | Gemini 2.5 Flash/Pro | Required | Yes | |
| OpenRouter | Claude, GPT, Llama, DeepSeek, etc. | Required | Yes | Unified access to multiple provider models |
| Ollama | Llama 3.3, Gemma 3, Qwen 3 | Not required | Yes | Desktop only, local execution |
| Custom | User-specified | Optional | Yes | Connect to any OpenAI-compatible API |
New to LLM APIs? See the Getting Started Guide for step-by-step setup instructions. Google Gemini offers a free tier — no credit card required.
Ctrl/Cmd + P) and run "BRAT: Add a beta plugin for testing"m0370/obsidian-llm-assistantmain.jsstyles.cssmanifest.json.obsidian/plugins/llm-assistant/ in your vaultEnter or the send button to send (Shift + Enter for new line)RAG automatically indexes your vault and injects relevant notes as context when you chat.
Settings:
Embedding search adds semantic understanding on top of TF-IDF text search, enabling the LLM to find conceptually related notes even when different words are used.
Embedding providers:
| Provider | Model | Dimensions | Cost |
|---|---|---|---|
| OpenAI | text-embedding-3-small | 1536 | $0.02 / 1M tokens |
| OpenAI | text-embedding-3-large | 3072 | $0.13 / 1M tokens |
| Google Gemini | gemini-embedding-001 | 3072 | Free tier available (100 RPM) |
| Ollama | nomic-embed-text | 1024 | Free (local) |
Options:
Attach vault notes as context for LLM conversations:
Attached notes appear in the context bar with token counts. Remove individually with the x button.
Select text in the editor and right-click (or long-press on mobile) to access:
| Action | Description |
|---|---|
| LLM: Summarize | Summarize selected text concisely |
| LLM: Translate to English | Translate to English |
| LLM: Translate to Japanese | Translate to Japanese |
| LLM: Proofread | Check grammar and suggest corrections |
| LLM: Explain | Explain in an easy-to-understand way |
| LLM: Expand | Elaborate on the selected text |
| Command | Description |
|---|---|
| Open Chat Panel | Open the chat interface |
| Build RAG Index | Manually rebuild the full-text search index |
| Build Embedding Index | Manually rebuild the embedding vector index |
Select a preset from the dropdown in settings:
| Preset | Purpose |
|---|---|
| Default | No preset |
| Polite Japanese Assistant | Responds politely in Japanese |
| Technical Writer | Technical documentation support |
| Creative Writer | Creative writing assistance |
| Translator | Professional translation with nuance preservation |
| Code Reviewer | Code quality and security review |
| Category | Setting | Description |
|---|---|---|
| LLM | Provider | Select the LLM provider |
| Model | Select the model | |
| Security | API key storage | SecretStorage (recommended) / WebCrypto encryption |
| Master password | Shown only for WebCrypto. Kept in memory for session only | |
| API Keys | Per-provider API keys | With test and delete buttons |
| Custom Endpoint | Endpoint URL | URL of an OpenAI-compatible API |
| Model ID | Model identifier to use | |
| Display | Font size | Small / Medium / Large |
| Streaming mode | Real-time response display (on/off) | |
| Temperature | Generation creativity (0.0-1.0) | |
| Preset | System prompt template selection | |
| System prompt | Default instruction to LLM (free text) | |
| RAG | Enable RAG | Toggle vault search indexing |
| Top-K / Score threshold | Search result count and relevance filter | |
| Chunk strategy / Max tokens | How vault files are split for indexing | |
| Exclude folders | Folders to skip during indexing | |
| Embedding | Enable Embedding Search | Toggle semantic vector search |
| Embedding provider / model | Choose embedding API and model | |
| Compact mode | Reduce dimensions for memory savings | |
| Background auto-embedding | Auto-generate embeddings during idle |
API key storage has 2 levels:
| Level | Method | Description |
|---|---|---|
| Recommended | SecretStorage API | Uses OS-level secure storage (macOS Keychain, etc.). Requires Obsidian v1.11.4+ |
| Alternative | WebCrypto encryption | PBKDF2 (100k iterations) + AES-256-GCM encryption. Requires master password (session-only) |
If you previously installed the plugin under the ID obsidian-llm-assistant (via BRAT or manually), you need to rename the plugin folder:
.obsidian/plugins/obsidian-llm-assistant/ to .obsidian/plugins/llm-assistant/Your conversation history and settings will be preserved.
# Install dependencies
npm install
# Build
npm run build
# Development mode (file watching)
npm run dev
# Run tests
npm test
# Mobile compatibility check
npm run check-mobile
Obsidian上でLLM(大規模言語モデル)を活用し、ノート執筆支援やVault内ファイルの理解を行うプラグインです。RAGによるVault検索とEmbeddingセマンティック検索で、関連するノートを自動的にコンテキストとして活用できます。
モバイルファースト設計 — iPhone / iPad / Mac / Windows / Android の全プラットフォームで動作します。
既存のObsidian向けLLMプラグインの多くは、機能過多でUIが煩雑になり、プロンプト入力画面や出力結果の表示スペースが狭いという課題がありました。また、iPhoneやiPadでは動作しないプラグインも少なくありません。
LLM Assistantは以下の方針で設計されています:
| プロバイダー | モデル例 | APIキー | ストリーミング | 備考 |
|---|---|---|---|---|
| OpenAI | GPT-5, GPT-5.2 | 必要 | 対応 | |
| Anthropic | Claude Opus 4.6, Sonnet 4.6, Haiku 4.5 | 必要 | 段階描画 | CORS非対応のためrequestUrl()使用 |
| Google Gemini | Gemini 2.5 Flash/Pro | 必要 | 対応 | |
| OpenRouter | Claude, GPT, Llama, DeepSeek等 | 必要 | 対応 | 複数プロバイダーのモデルを統合アクセス |
| Ollama | Llama 3.3, Gemma 3, Qwen 3 等 | 不要 | 対応 | デスクトップ専用、ローカル実行 |
| カスタム | ユーザー指定 | 任意 | 対応 | OpenAI互換APIの任意URLに接続 |
LLMのAPIを使うのがはじめての方へ: はじめてのセットアップガイド にステップごとの手順をまとめています。Google Gemini なら無料枠でお試しできます(クレジットカード不要)。
BRAT(Beta Reviewer's Auto-update Tool) を使えば、コミュニティプラグインに未登録のプラグインもインストールできます。
Ctrl/Cmd + P)を開き、「BRAT: Add a beta plugin for testing」を実行m0370/obsidian-llm-assistant を入力main.jsstyles.cssmanifest.json.obsidian/plugins/llm-assistant/ フォルダを作成.obsidian/plugins/llm-assistant/ フォルダを削除し、Obsidianを再起動してください。
会話履歴データは
.obsidian/plugins/llm-assistant/conversations/に保存されています。プラグイン削除時に一緒に削除されます。
以前 obsidian-llm-assistant というIDでプラグインをインストールしていた場合(BRAT経由や手動インストール)、プラグインフォルダのリネームが必要です:
.obsidian/plugins/obsidian-llm-assistant/ を .obsidian/plugins/llm-assistant/ にリネーム会話履歴と設定はそのまま引き継がれます。
Enter キーまたは送信ボタンで送信(Shift + Enter で改行)RAGを有効にすると、チャット時にVault内の関連ノートが自動的にコンテキストとして注入されます。
設定項目:
Embedding検索は、TF-IDFテキスト検索に加えてセマンティックな理解を追加します。異なる言葉が使われていても、概念的に関連するノートを見つけることができます。
Embeddingプロバイダー:
| プロバイダー | モデル | 次元数 | コスト |
|---|---|---|---|
| OpenAI | text-embedding-3-small | 1536 | $0.02 / 100万トークン |
| OpenAI | text-embedding-3-large | 3072 | $0.13 / 100万トークン |
| Google Gemini | gemini-embedding-001 | 3072 | 無料枠あり(100リクエスト/分) |
| Ollama | nomic-embed-text | 1024 | 無料(ローカル実行) |
オプション:
Vault内のノートをコンテキストとしてLLMに送信できます。
添付されたノートはコンテキストバーに表示され、トークン数も確認できます。xボタンで個別に削除できます。
エディタでテキストを選択し、右クリック(モバイルでは長押し)メニューから以下のアクションを実行できます:
| アクション | 説明 |
|---|---|
| LLM: 要約する | 選択テキストを簡潔に要約 |
| LLM: 英語に翻訳 | 英語に翻訳 |
| LLM: 日本語に翻訳 | 日本語に翻訳 |
| LLM: 校正する | 文法・表現を校正し修正点を説明 |
| LLM: 解説する | わかりやすく解説 |
| LLM: 詳しく書く | テキストをより詳しく展開 |
選択テキストがプロンプトに追加され、チャットパネルに送信されます。
| コマンド | 説明 |
|---|---|
| チャットパネルを開く | チャットインターフェースを開く |
| RAGインデックスを構築 | 全文検索インデックスを手動で再構築 |
| Embeddingインデックスを構築 | Embeddingベクトルインデックスを手動で再構築 |
設定画面の「プリセット」ドロップダウンから、用途に応じたシステムプロンプトを選択できます:
| プリセット名 | 用途 |
|---|---|
| デフォルト | プリセットなし |
| 丁寧な日本語アシスタント | 日本語で丁寧に回答 |
| テクニカルライター | 技術文書の執筆支援 |
| クリエイティブライター | 創造的な文章作成支援 |
| 翻訳者 | プロの翻訳(ニュアンス保持) |
| コードレビュアー | コード品質・セキュリティレビュー |
プリセットを選択するとシステムプロンプト欄に自動入力されます。カスタマイズも可能です。
| カテゴリ | 設定項目 | 説明 |
|---|---|---|
| LLM | プロバイダー | 使用するLLMプロバイダーを選択 |
| モデル | 使用するモデルを選択 | |
| セキュリティ | API鍵の保存方式 | SecretStorage(推奨)/ WebCrypto暗号化 |
| マスターパスワード | WebCrypto選択時のみ表示。セッション中のみ保持 | |
| APIキー | 各プロバイダーのAPIキー | テスト・削除ボタン付き |
| カスタムエンドポイント | エンドポイントURL | OpenAI互換APIのURL |
| モデルID | 使用するモデルの識別子 | |
| 表示 | フォントサイズ | 小 / 中 / 大 |
| ストリーミングモード | レスポンスのリアルタイム表示(オン/オフ) | |
| Temperature | 生成の創造性(0.0〜1.0) | |
| プリセット | システムプロンプトのテンプレート選択 | |
| システムプロンプト | LLMへのデフォルト指示(自由記述) | |
| RAG | RAGを有効化 | Vault検索のインデックスを有効化 |
| 検索結果数 / スコア閾値 | 検索件数と関連性フィルタ | |
| チャンク戦略 / 最大トークン | ファイルの分割方法 | |
| 除外フォルダ | インデックスから除外するフォルダ | |
| Embedding | Embedding検索を有効化 | セマンティックベクトル検索の有効化 |
| プロバイダー / モデル | Embedding APIとモデルの選択 | |
| 省メモリモード | 次元数を削減してメモリを節約 | |
| バックグラウンド自動Embedding | アイドル時にEmbeddingを自動生成 |
API鍵の保管方法は2段階から選択できます:
| レベル | 方式 | 説明 |
|---|---|---|
| 推奨 | SecretStorage API | OSレベルのセキュアストレージ(macOS Keychain等)を利用。Obsidian v1.11.4以上で利用可能 |
| 代替 | WebCrypto暗号化 | PBKDF2(10万回反復)+ AES-256-GCMで暗号化。マスターパスワードが必要(セッション中のみ保持) |
# 依存関係のインストール
npm install
# ビルド
npm run build
# 開発モード(ファイル監視)
npm run dev
# テスト
npm test
# モバイル互換性チェック
npm run check-mobile