Read-only git insight for LM Studio: status, log, diff, blame, branches, stashes, and per-file history.

113 Downloads

1 star

README

Git Plugin for LM Studio — Natural Language Git History & Code Intelligence

Keywords: lm studio plugin, git ai, natural language git, local code history, git blame ai, repository analysis, offline git tool, private codebase ai

Real git data for your LLM. Log, diff, blame, status, branches — all from natural language.


What It Does

  • git_status — current branch, staged/unstaged changes, ahead/behind remote
  • git_log — commit history with filters (author, date, file, message search)
  • git_show — full diff and metadata for a specific commit
  • git_diff — diff between refs, branches, working tree, or staged changes
  • git_blame — line-by-line authorship for a file section
  • git_branch — all branches with last commit info
  • git_stash — list stashed changes
  • git_file_history — every commit that touched a specific file

Who This Is For

  • Developers who want to explore git history in plain English without memorizing git command flags
  • Code reviewers who want to understand what changed and why across a branch or commit range
  • Anyone onboarding to an unfamiliar repository who wants fast, natural language codebase archaeology
  • Engineers who want AI-assisted blame and file history without leaving their chat session

Installation

cd git-plugin
npm install
npm run build

Load the plugin folder in LM Studio.


Configuration

FieldDefaultDescription
Default Repository Path(blank)Absolute path to a git repo. Blank = LM Studio working directory
Max Log Entries20Default number of commits in git_log
Max Diff Lines500Truncate diffs beyond this to avoid context overflow

Set Default Repository Path to avoid passing repo_path on every tool call.


Example Queries

"What changed in the last 5 commits?" → git_log(limit=5) → git_show(hash=...) for relevant commits

"Who last touched src/auth.ts and why?" → git_blame(file_path="src/auth.ts", from_line=1, to_line=50) → git_show(hash=...)

"What's the diff between main and my feature branch?" → git_diff(from="main", to="feature/my-branch")

"What do I have staged?" → git_diff(staged=true)

"Show me the history of the config file" → git_file_history(file_path="config/settings.ts")

"What branches exist?" → git_branch()


Tool Reference

git_status

Current working tree state. Call first to establish context.

git_log

git_log(limit=10)
git_log(author="alice", since="2024-01-01")
git_log(file_path="src/api.ts", limit=5)
git_log(search="fix auth")

git_show

git_show(hash="abc1234")
git_show(hash="HEAD~2")

git_diff

git_diff()                                    — unstaged changes
git_diff(staged=true)                         — staged changes
git_diff(from="main", to="HEAD")              — branch comparison
git_diff(from="HEAD~3", file_path="app.ts")   — single file, last 3 commits

git_blame

git_blame(file_path="src/auth.ts", from_line=10, to_line=40)

git_file_history

git_file_history(file_path="package.json", limit=15)

💚 Support Development

This plugin is free and open source. If you find it useful, consider supporting development:

Ko-fi
TierAmountPerks
☕ Coffee$3Name in credits
🍔 Lunch$10+ Priority support
🍕 Pizza$25+ Name in README
🏆 Founding$50+ Lifetime support, consultation

Every coffee helps keep this project alive! ☕