
obsidian steward
一个 Obsidian 插件,通过命令与 AI 助手交互,支持文件操作、搜索和计算。
Repository Info
About This Server
一个 Obsidian 插件,通过命令与 AI 助手交互,支持文件操作、搜索和计算。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Steward
Steward is a plugin that utilizes Large Language Models (LLMs) to interact with your Obsidian Vault. It provides commands like search, move, copy, create, etc, as building blocks to create your own sophisticated commands, prompt chaining, and automation for your specific tasks.
Features
- Built-in Search Engine: A TF-IDF based search with relevant scoring and typo tolerance that is significantly faster than the native Obsidian search
- Command-based Interaction: Support for standard commands like search, create, update, delete, move, audio, image generation, and user-defined commands
- Multi-language Support: Use Steward in your preferred language
- Privacy-focused: Most actions are executed in the front-end using Obsidian API to avoid exposing your data to LLMs (except for your queries)
- Interactive and Adaptive Chat UI: A chat interface made of the slash
/leveraging Obsidian's editor features and is adaptable to your current themes. - Model Flexibility: Use your favorite AI models including OpenAI, DeepSeek, and Ollama local models
- Intent Caching: Utilizes embeddings to cache similar queries so subsequent requests don't require LLM processing
- User-Defined Commands: Create your own command workflows by combining multiple commands with specific LLM models and settings of your choice.
Standard (Built-In) Commands
Steward can be used through the command palette directly in the editor or by opening the chat interface.
Usage
- Click the "Open Steward chat" icon to open the chat
- Type after the
/in the chat or the active editor to interact or type/ ?to see available commands - To add a new line in the command input, press
Shift+Enter(uses 2-space indentation)
Example Commands
- /search Notes tagged #Todo in the root folder
- / Add tag #Done to all notes of the search results and move them to the Archived folder
- / Write a poem about Angular in a new note then move it to the Generated folder
- / Update the list above to a numbered list
- /audio "project" as a noun and a verb using 11Labs
Showcases
Update directly in the editor:
Image read:
Read and extract content in a note:
User-Defined Commands
You can create your own User-Defined Commands to automate workflows and combine multiple built-in or other User-Defined commands into a single, reusable command.
How It Works
- User-Defined Commands are defined as YAML blocks in markdown files inside the
Steward/Commandsfolder. - Each command can specify a sequence of built-in or user-defined commands to execute.
- You can specify if user input is required for your command using the
query_requiredfield. - These commands are available with autocomplete and are processed just like built-in commands.
Example: User-Defined Command YAML
command_name: clean_up
description: Clean up the vault
query_required: false
model: gpt-4o # Optional: Specify a default model for all commands
commands:
- name: search
query: 'Notes name starts with Untitled or with tag #delete'
- name: delete_from_artifact
query: Delete them
model: gpt-3.5-turbo # Optional: Override the model for this specific step
command_name: The name you will use to invoke the command (e.g.,/clean_up)query_required: (optional, boolean) If true, the command requires user input after the prefixmodel: (optional, string) The model to use for all commands in this user-defined commandcommands: The sequence of built-in or user-defined commands to executesystem_prompt: The system prompts that allows you to add additional guidelines to LLMs to the current commandquery: (required if thequery_requiredis true, string) The query to send to LLMs, put the$from_useras a placeholder for your inputmodel: (optional, string) The model to use for this specific command step (overrides the command-level model)
Using Links in System Prompts
You can reference the content of other notes in your vault by using Obsidian links in the system_prompt array:
command_name: search_with_context
description: Search with predefined context
query_required: true
commands:
- name: search
system_prompt:
- '[[My Context Note]]'
- Additional instructions
query: $from_user
When the command is executed:
- The link
[[My Context Note]]will be replaced with the actual content of that note - This allows you to maintain complex prompts or contexts in separate notes
- You can update the linked notes independently of your command definition
Usage
- Create a note in
Steward/Commandsand add your command YAML in a code block. - In any note or the Chat, type your command (e.g.,
/clean_up #Todo) and press Enter. - The command will execute the defined sequence, using your input if required.
Validation
- The system validates your User-Defined Command YAML:
command_namemust be a stringcommandsmust be a non-empty array- If present,
query_requiredmust be a boolean - Each command step must have a
name(string) andquery(string)
- If validation fails, the command will not be loaded and an error will be logged.
Creating Commands with LLM Assistance
You can ask Steward to help create user-defined commands using natural language, even without knowing YAML syntax:
- Simply share the User-Defined Command Guidelines with Steward
- Describe what you want your command to do in plain language
- Steward will create commands with the proper YAML structure for you
- Review, modify if needed, and save to your Commands folder
User-Defined command creation with LLM helps:
Another Real-World User-Defined command:
Command Flow Visualization
The following diagram illustrates how commands are processed in Steward:
Folder Structure
Steward creates the following folder structure in your vault:
Steward/
├── Commands/ # Stores user-defined command definitions
├── Conversations/ # Archives past conversations
└── Steward Chat.md # Current active conversation
Installation
From Obsidian Community Plugins
- Download the plugin from the Obsidian Community Plugins browser
- Enable the plugin in your Obsidian settings
- Configure your API keys in the plugin settings
Using BRAT (Beta Reviewer's Auto-update Tool)
- Install BRAT from the Obsidian Community Plugins
- Open BRAT settings and add the beta plugin:
googlicius/obsidian-steward - Enable the plugin in your Obsidian settings
- Configure your API keys in the plugin settings
Manual Installation
- Download the latest release from the releases page
- Extract the zip file into your Obsidian vault's
.obsidian/pluginsfolder - Enable the plugin in your Obsidian settings
- Configure your API keys in the plugin settings
Settings
-
API Keys:
- OpenAI API Key (for OpenAI models and embeddings)
- ElevenLabs API Key (for audio generation)
- DeepSeek API Key (for DeepSeek models)
-
LLM Settings:
- Chat Model: Choose between various models from OpenAI, DeepSeek, or Ollama
- Temperature: Controls randomness in the output (0.0 to 1.0)
- Ollama Base URL: For local Ollama models (default: http://localhost:11434)
-
Steward Folder: The folder where Steward' related notes will be stored (default:
Steward) -
Debug Mode: Enable detailed logging for troubleshooting
Development
This plugin uses TypeScript and follows the Obsidian plugin architecture.
Building
- Clone this repository
- Run
npm installto install dependencies - Run
npm run buildto build the production version
Contributing
Contributions to Steward are welcome! Here's how you can contribute:
Code Contributions
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
User-Defined Commands
You can contribute your User-Defined Commands (UDCs) to help the community:
- Create your UDC following the guidelines in the User-Defined Command section
- Test your UDC thoroughly to ensure it works as expected
- Add your UDC to the
community-UDCsfolder with a descriptive name - Include clear documentation in your UDC file explaining:
- What the command does
- How to use it
- Any prerequisites or dependencies
- Example usage scenarios
Check out existing commands in the community-UDCs folder like flashcard-assist.md for reference.
License
MIT
TODOs
- Multiple lines command.
- Reminder.
- Steward can provide information about its functionalities, limitations,...
- Provide any information, usage, and guidance about Obsidian.
- Autocompletion and automation.
- User-defined commands and actions
- Traceability
- MCP support.
Quick Start
Clone the repository
git clone https://github.com/googlicius/obsidian-stewardInstall dependencies
cd obsidian-steward
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.