by arumata
Generate meaningful commit messages via DeepSeek AI for Obsidian Git
AI Commit for Obsidian
Generate meaningful git commit messages via DeepSeek AI or a local Ollama model directly from Obsidian Git source control view.
Adds a sparkle button next to the Commit button. Click it to generate a commit message from staged changes.
Features
- One-click generation — button in Obsidian Git source control view, or via command palette
- Two providers — DeepSeek (cloud, V4 Flash/Pro) or Ollama (local, any pulled model), switchable in settings
- Model detection — auto-detect models installed in your local Ollama instance
- Customizable prompt — adjust language, style, and tone
- Timeout & retry — configurable timeout (10–120s) with automatic retries (3 attempts)
- Plain messages — no Conventional Commits prefixes (unless you configure them in custom instructions)
Requirements
- Obsidian Git plugin installed and configured
- Git available on the system
- Either:
- a DeepSeek API key, or
- a local Ollama install with at least one model pulled (
ollama pull llama3.1)
Installation
From Community Plugins
- Open Settings → Community Plugins
- Search "AI Commit"
- Install and enable
Manual (BRAT)
- Install BRAT plugin
- Add
arumata/obsidian-ai-commitas a beta plugin
Manual (direct)
cd /path/to/vault/.obsidian/plugins
git clone https://github.com/arumata/obsidian-ai-commit.git ai-commit
cd ai-commit && npm install && npm run build
Settings
| Setting | Default | Description |
|---|---|---|
| Provider | DeepSeek | DeepSeek (cloud) or Ollama (local) |
| API Key | — | (DeepSeek) API key (stored locally, never sent anywhere but DeepSeek) |
| Model | DeepSeek V4 Flash | (DeepSeek) V4 Flash (fast/cheap) or V4 Pro (more capable) |
| Ollama server URL | http://localhost:11434 | (Ollama) Base URL of your local Ollama server |
| Ollama model | llama3.1 | (Ollama) Name of a pulled model; use the refresh button to detect installed models |
| Timeout | 30s | API request timeout (10–120s) |
| Custom instructions | — | Extra prompt rules (e.g. "Always write in Russian") |
How It Works
- Stage files in Obsidian Git
- Click the ✨ button (or
Ctrl+P→ "Generate commit message") - The plugin runs
git diff --cached, sends the diff to DeepSeek or your local Ollama server - The generated message appears in the commit text area
- Review and click Commit
Using Ollama
- Install Ollama and pull a model, e.g.
ollama pull llama3.1 - Make sure the Ollama server is running (
ollama serve, or it's already running if you installed the desktop app) - In AI Commit settings, set Provider to "Ollama (local)"
- Click the refresh icon next to "Ollama model" to auto-detect installed models, or type a model name manually
- Requests go to the configured Ollama server. Generation stays on your machine when you use a local server with a local model. A remote server or cloud model can send your diff off the machine.
Development
Use Node.js 24 or later (nvm use reads .nvmrc). Obsidian 1.2.3 or later is required; the DOM helpers used by the plugin are already present in the Obsidian 1.1.13 API.
npm ci
npm run dev # Watch mode
npm run build # Production build
npm test # Request and settings regression checks
npm run check:release # Validate release metadata
The release workflow builds a draft release when a tag matching the plugin version is pushed (for example, 1.1.0, without v). Review its artifacts before publishing.
For UI regressions, run node tests/obsidian-regression.mjs against an isolated Obsidian instance with remote debugging on port 19222, this plugin and Obsidian Git, and a staged fixture in /tmp/obsidian-pr1-runtime/vault. The script rejects other vault paths.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.