Skip to content

AI help

MyTwig can use an AI model of your choice. Requests go straight from your computer to that provider. Nothing passes through any MyTwig server.

Open Settings → AI and choose one:

  • With an API key: Anthropic, Google Gemini, OpenAI, DeepSeek, Qwen (Alibaba Cloud Model Studio), Kimi (Moonshot AI), OpenRouter, Microsoft Foundry, or any service that speaks OpenAI’s chat completions API. Your key is kept in the system keychain.
  • On your computer: Ollama, LM Studio, or a LiteLLM proxy. No key needed.
  • With a command line tool you’ve signed in to: claude, codex, GitHub Copilot’s copilot, or gemini. MyTwig runs it with no tools, in an empty folder.

List Models asks the service which models it has. Test sends a short request to check everything works.

Task Where
Generate Commit Message The ✨ button in the commit box, or the palette. Uses your staged changes, or all changes if none are staged, and follows the style of your recent commits. Stop and Put Back restore what you’d typed.
Explain Commit A commit’s menu, or the palette.
Explain Changes The palette, or a file’s Explain in the working tree. Explain Changes Against Branch… explains everything since another branch.
Pull request title and description The Create Pull Request and Submit Stack dialogs, using your commits, diff and the repository’s template.
Split with AI Groups changes into commits with messages, for you to check before splitting. See Split a commit.
Suggest resolutions The conflict editor suggests a resolution for one conflict or all of them, for you to review.

Explanations stream in as formatted text with headings, lists, tables and highlighted code, and flowcharts or sequence diagrams are drawn in place. ⇧⌘F maximizes the explanation.

If a diff is too long to send whole, MyTwig trims each file to its share and tells you.

Settings → AI → Prompts shows the prompt for each task. Edit it, or Reset to Default. Placeholders like {{diff}}, {{language}}, {{branch}}, {{recent}} and {{template}} are filled in; each prompt lists the ones it can use. {{#name}}…{{/name}} keeps text only when name has a value, and a line of --- separates the system prompt from the material.

A repository can share its own prompts in .mytwig/prompts.json:

{
"commitMessage": "…",
"pullRequest": "…",
"explainCommit": "…",
"explainChanges": "…",
"splitChanges": "…"
}

Any of them overrides yours for that repository. They only change what’s sent to the model; they don’t run anything.