Skip to content

Terminal, editors and custom commands

⌘` opens a terminal panel under the history, in the folder of the repository or worktree you’re looking at.

  • ⌃⇧` or + opens another shell tab. ⇧⌘[ and ⇧⌘] switch tabs.
  • Double-click a tab to rename it. Drag tabs to reorder them. Closing a tab with a running program asks first.
  • The tab bar can sit at the bottom, top, left or right of the panel (its menu, or Settings → Editors).

While the terminal has the keyboard, every key goes to the shell except those four shortcuts.

The toolbar’s Open menu, a file’s menu and the palette open the repository or a file in VS Code, Cursor, Zed, Windsurf or Sublime Text; the repository in Ghostty, iTerm, Warp or Terminal; or show it in the file manager. Pick your defaults in Settings → Editors. ⌥T opens the terminal, ⌥O the file manager.

Run your own shell commands on the repository, a commit, a branch or a file. They appear in that item’s Custom Commands menu and in the palette.

Add them in Settings → Commands. A command runs in the terminal panel, or in the background with a toast saying how it went (and Show Output).

These placeholders are filled in, each quoted for the shell:

Placeholder Value
${repo} the repository’s folder
${sha}, ${short} the commit’s full and short SHA
${branch} the branch
${file} the file
${input:name} a value asked for when the command runs

Inputs can be text, a choice, a branch, or a checkbox that adds a flag. MyTwig shows the final command line before running it. In the background, the same values are in the environment as MYTWIG_REPO, MYTWIG_SHA, MYTWIG_BRANCH, MYTWIG_FILE and MYTWIG_INPUT_<NAME>.

A repository can include its own commands in .mytwig/commands.json:

{
"commands": [
{ "name": "Lint", "target": "repo", "run": "make lint", "background": true }
]
}

They run only after you trust the file. MyTwig lists every command and asks, and asks again whenever the file changes.