AI Commit

approvedunreviewed

by arumata

Generate meaningful commit messages via DeepSeek AI for Obsidian Git

★ 1 stars↓ 229 downloadsUpdated 27d agoMIT

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:

Installation

From Community Plugins

  1. Open Settings → Community Plugins
  2. Search "AI Commit"
  3. Install and enable

Manual (BRAT)

  1. Install BRAT plugin
  2. Add arumata/obsidian-ai-commit as 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

SettingDefaultDescription
ProviderDeepSeekDeepSeek (cloud) or Ollama (local)
API Key—(DeepSeek) API key (stored locally, never sent anywhere but DeepSeek)
ModelDeepSeek V4 Flash(DeepSeek) V4 Flash (fast/cheap) or V4 Pro (more capable)
Ollama server URLhttp://localhost:11434(Ollama) Base URL of your local Ollama server
Ollama modelllama3.1(Ollama) Name of a pulled model; use the refresh button to detect installed models
Timeout30sAPI request timeout (10–120s)
Custom instructions—Extra prompt rules (e.g. "Always write in Russian")

How It Works

  1. Stage files in Obsidian Git
  2. Click the ✨ button (or Ctrl+P → "Generate commit message")
  3. The plugin runs git diff --cached, sends the diff to DeepSeek or your local Ollama server
  4. The generated message appears in the commit text area
  5. Review and click Commit

Using Ollama

  1. Install Ollama and pull a model, e.g. ollama pull llama3.1
  2. Make sure the Ollama server is running (ollama serve, or it's already running if you installed the desktop app)
  3. In AI Commit settings, set Provider to "Ollama (local)"
  4. Click the refresh icon next to "Ollama model" to auto-detect installed models, or type a model name manually
  5. 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.