Hooks

Four hooks run when a task changes status: start, continue, review, and done. Configure them per project.

Project settings with hooks and scripts

Lifecycle hooks

Configure these from the kanban column headers or Project Settings.

HookWhen it runsExample
StartTask moves from To Do to In Progressnpm install && claude "$OUIJIT_TASK_DESCRIPTION"
ContinueReopening a task already In Progressclaude -c
ReviewTask moves to In Reviewgh pr create --fill
DoneTask moves to Donegit push origin HEAD

Sandbox

Start, continue, review, and done run in the project's default sandbox setting unless a hook is set to run somewhere else, such as a done hook that pushes from the host. The hook dialog shows where it will run and can change that for one run.

Hook environment

Hooks receive the task's context as environment variables:

OUIJIT_PROJECT_PATH=/path/to/my-project
OUIJIT_WORKTREE_PATH=~/Ouijit/worktrees/my-project/T-42
OUIJIT_TASK_BRANCH=T-42
OUIJIT_TASK_NUMBER=42
OUIJIT_TASK_NAME="Add user auth"
OUIJIT_TASK_DESCRIPTION="implement oauth login"
OUIJIT_HOOK_TYPE=start

These come on top of the variables every Ouijit terminal gets. See CLI → Environment variables.

Run command

The run command is the project's dev server or whatever you run alongside a task, such as npm run dev. It is configured alongside the hooks but runs on demand, from the Run button, ⌘P, or a runner panel.

Editor

The editor command opens a task's worktree in your editor, from Open in → Editor on a task or terminal. It is configured like a hook (type editor, e.g. code or hx) but runs on demand rather than on a status change. The command runs inside a task terminal, so terminal editors like Helix and Vim get a real TTY, while GUI editors detach and leave a shell behind. File links in markdown panels use the same editor to open files at a specific line.