Skip to main content
Hooks run shell commands at specific points during a task. Configure them in .tembo.json at your repository root.

Available hooks

postClone - Runs after Tembo clones your repo, before it starts working. prePush - Runs after Tembo makes changes, before pushing and opening a PR.

Example

{
  "hooks": {
    "postClone": [
      "npm ci",
      "cp .env.example .env.local"
    ],
    "prePush": [
      "npm run lint",
      "npm run test",
      "npm run build"
    ]
  },
  "autoFix": true
}

Auto-fix

Set "autoFix": true to let Tembo analyze hook failures and attempt to fix issues before retrying.

Details

  • Commands run sequentially in the repository root
  • If a command fails, the hook stops
  • Hooks run in the same sandbox as the task
  • Shell features (piping, redirects, &&) are supported