Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add ai-powered commit message helpers #2696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yasunogithub wants to merge 3 commits into gitui-org:master
base: master
Choose a base branch
Loading
from yasunogithub:add-ai-commit-message-helper

Conversation

Copy link

@yasunogithub yasunogithub commented Aug 21, 2025
edited
Loading

This Pull Request fixes/closes #{issue_num}.

It changes the following:

  • Add commit helper with a configurable
    RON-based commit helper system supporting multiple helpers
  • Add helper selection UI with keyboard navigation, hotkeys, and
    smooth spinner animations for background execution
  • Implement template variables ({staged_diff}, {staged_files},
    {branch_name}) for flexible command customization and improved
    error handling
    I followed the checklist:
  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

Copy link
Collaborator

@yasunogithub Do you know how other CLI tools interface with LLMs? Is your approach in this PR inspired by similar approaches in other tools?

Copy link
Author

@yasunogithub Do you know how other CLI tools interface with LLMs? Is your approach in this PR inspired by similar approaches in other tools?

@cruessler
Honestly, I don't have deep knowledge of how other CLI tools specifically interface with LLMs. But based on what I researched, there seem
to be a few common patterns:

  1. Direct API calls - Tools like aicommits make HTTP requests directly to OpenAI/Anthropic
  2. Local model integration - Tools use ollama or similar for local LLMs
  3. Shell command execution - Some tools spawn subprocesses to call LLM CLIs

Our approach is simple but flexible - we execute any shell command you configure. So you could:

  • Call curl to hit OpenAI API directly
  • Use ollama run llama3.2 for local models
  • Run custom Python/Node scripts
  • Chain multiple commands with pipes

The template variables like {staged_diff} give the commands git context, and the RON config lets you set up multiple helpers with hotkeys.

I chose this approach because any CLI command works - users aren't locked into specific LLM providers or APIs. Want to try a new AI
service? Just update your config file.

cruessler reacted with thumbs up emoji

Copy link
Collaborator

Thanks for the context! I was mainly asking in order to avoid reinventing the wheel in case there are already existing patterns out there.

Copy link
Author

Thanks for the context! I was mainly asking in order to avoid reinventing the wheel in case there are already existing patterns out there.

Thanks, I agree—this implementation is simple but still consistent with the common patterns, so I don't feel like reinventing the wheel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@cruessler cruessler Awaiting requested review from cruessler

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /