Skip to content

AI service backed by an external CLI (i.e. Claude Code, Codex, Gemini CLI, …) #2855

Open

Description

@IacopoSb

Today, the AI commit-message assistant only supports OpenAI-compatible HTTP endpoints. That works well for API keys and local servers (Ollama, LM Studio, LiteLLM, etc.), but a lot of users access models through subscriptions that are only usable via the vendor's official CLI, like:

  • Claude Pro/Max: Claude Code (claude)
  • ChatGPT Plus/Pro/Team: Codex CLI (codex)
  • Google account / Code Assist: Gemini CLI (gemini)
  • GitHub Copilot: Copilot CLI (copilot)
  • Cursor: Cursor CLI (cursor-agent)

If I'm not wrong, using the OAuth tokens of these subscriptions directly from a third-party app is generally not allowed by the vendors' terms (I know about Anthropic's TOS, not completely sure about the others).

Maybe it could be possible to add a second kind of AI service, "External command", next to the existing OpenAI-compatible one.

SourceGit could just run the command in the repository's working directory, building the same prompt as today (instructions, additional prompt, change list) and also including the staged diff, so the CLI doesn't need permission to run git or edit files. The commit message would just be read from stdout.

Maybe also an optional dropdown in Preferences could fill in the Command/Arguments for the most common CLIs.

Activity

  1. self-assigned this
    on Nov 6, 2026
  2. added
    suggestionWe are still considering whether it is necessary to add this feature
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

suggestionWe are still considering whether it is necessary to add this feature

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions