Skip to content

Repository buttons and setup

Give a repository one-click buttons for the commands you run all the time, and a setup step that runs on every new branch.

  1. Hover the repository’s name in the sidebar and click the gear. Repo settings opens.

    The gear next to the storefront repository heading, highlightedThe gear next to the storefront repository heading, highlighted
  2. Under commands/, click New command. Type the button’s name, for example Run dev server, and press Enter.

    Repo settings with Run dev server typed in the new command fieldRepo settings with Run dev server typed in the new command field
  3. The new script opens in the editor. Below the first lines, add the command to run, such as yarn dev. Press ⌘S to save, then Esc twice to close the editor and Repo settings.

    The editor with the run-dev-server.sh script: the name and icon lines, then yarn devThe editor with the run-dev-server.sh script: the name and icon lines, then yarn dev

    The # name: line is the button’s label. An # icon: line, like # icon: Play, picks its icon.

  4. The button appears next to the view tabs, in every session of this repository.

    The Run dev server button at the right of the Terminal and Diff tabs, highlightedThe Run dev server button at the right of the Terminal and Diff tabs, highlighted
  5. Click it. A terminal tab named after the button opens and runs the command.

    A Run dev server terminal tab next to Main Terminal, showing the dev server runningA Run dev server terminal tab next to Main Terminal, showing the dev server running
  1. In Repo settings, click worktree_after.sh under Setup, then click Create script.

    Repo settings with worktree_after.sh selected and the Create script button highlightedRepo settings with worktree_after.sh selected and the Create script button highlighted
  2. The script opens in the editor with common setup steps, all turned off. Remove the # in front of the lines you need, or add your own, like installing dependencies. Press ⌘S to save.

    The editor with the setup script template, every step commented outThe editor with the setup script template, every step commented out
  3. Open a new branch. Before its session opens, the script runs in the new branch’s folder, and Open branch shows what it prints.

    The Open branch dialog showing the setup script's output while it runsThe Open branch dialog showing the setup script's output while it runs
  • Buttons and the setup script are saved in the repository’s .claudio folder. Commit it, and your teammates get them too.
  • To change a button later, open Repo settings, click it under commands/ and click Edit.