An intelligent tool to generate custom Obsidian plugins based on user descriptions and answers.
Click the image above to watch the demo of using the Obsidian Plugin Generator.
- Navigate to the
obsidian_plugin_generator
directory - Install the required packages:
pip install -r requirements.txt
- Set up environment variables:
GROQ_API_KEY
: Your Groq API key (if using Groq)OLLAMA_MODEL
: Your preferred Ollama model (default is "llama3.1")
python obsidian_plugin_generator.py [plugin_name] [options]
--vault-path PATH
: Path to Obsidian vault (default: ~/Documents/ObsidianVault)--ai {ollama,groq,anthropic}
: AI service to use (default: ollama)--name
: Name of the plugin (default: "My Obsidian Plugin")
python obsidian_plugin_generator.py --name "My Custom Plugin"
python obsidian_plugin_generator.py --name "Task Tracker" --vault-path ~/Obsidian/MyVault
python obsidian_plugin_generator.py --name "Code Snippets" --ai groq
- AI-powered plugin generation based on user descriptions
- Supports multiple AI services: Ollama and Groq
- Automatically clones and modifies the Obsidian sample plugin
- Generates enhanced TypeScript code for the plugin
- Handles existing directories with options to overwrite, rename, or cancel
- Provides next steps for plugin development and testing
The script generates a new Obsidian plugin directory in your vault's .obsidian/plugins
folder, containing:
main.ts
: The main TypeScript file with AI-generated plugin codemanifest.json
: Plugin manifest file with updated metadatapackage.json
: Package configuration file with updated metadata- Other necessary files from the sample plugin
- Ensure you have Git installed and accessible from the command line
- The script requires an active internet connection to clone the sample plugin
- Review and complete any TODOs left in the generated code
- Follow the "Next Steps" provided after plugin generation for further development
- Python 3.6+
- Git
- Node.js and npm (for plugin development)