TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/cline/kanban/llms.txt
Use this file to discover all available pages before exploring further.
kanban hooks command provides subcommands for emitting hook events into the Kanban runtime from agent integrations. Use these commands inside agent hooks (Claude Code, Gemini CLI, Codex) to update task state and activity on the board in real time.
Synopsis
Environment variables
Allhooks subcommands read the following environment variables automatically:
| Variable | Description |
|---|---|
KANBAN_TASK_ID | The ID of the task currently being worked on. |
KANBAN_WORKSPACE_ID | The ID of the Kanban workspace. |
hooks ingest
Ingest a hook event into the Kanban runtime. Exits with a non-zero code if the event fails to deliver. Usehooks ingest in situations where you want explicit error reporting — for example, in a CI script or a hook that must confirm delivery.
The event type to emit. Accepted values:
to_review— signal that the agent has finished and the task is ready for reviewto_in_progress— signal that the agent has resumed or started workingactivity— report an activity update (tool use, command, message) shown on the task card
A short identifier for the hook source, e.g.
claude, codex, gemini. Shown alongside the activity on the task card. Maximum 64 characters.A short summary of the current activity, displayed on the task card. Maximum 200 characters.
The name of the tool currently being used by the agent.
The agent’s final message when transitioning to review. Shown as the task’s last activity.
The original lifecycle event name from the agent hook system (e.g.
PreToolUse, PostToolUse, Stop).The notification type from the agent, e.g.
permission_prompt.A base64-encoded JSON object containing metadata fields. Use this as an alternative to passing individual flags when the payload is constructed programmatically.
An optional positional JSON payload argument. If stdin is not a TTY, the payload can also be piped in via stdin. The order of precedence is:
--metadata-base64 > stdin JSON > positional argument.hooks notify
Same ashooks ingest but never throws — errors are silently swallowed. Use hooks notify inside agent hooks where a delivery failure must not interrupt the agent’s workflow.
hooks ingest.
Example — best-effort notification inside a Claude Code hook:
hooks gemini-hook
A Gemini CLI hook entrypoint. Configure this as the hook binary in your Gemini CLI config and Kanban will receive board notifications whenever Gemini acts on a task.- Reads a JSON payload from stdin (required by the Gemini hook protocol).
- Writes
{}to stdout immediately (also required by Gemini). - Maps Gemini lifecycle events to Kanban hook events:
BeforeAgent→to_in_progressAfterAgent→to_reviewBeforeTool,AfterTool,Notification→activity
- Fires the Kanban notification asynchronously so it does not block the agent.
KANBAN_TASK_ID and KANBAN_WORKSPACE_ID must be set in the environment when gemini-hook runs. Kanban sets these automatically when it launches a Gemini task session.hooks codex-wrapper
A wrapper around the Codex binary that watches the Codex session log and emits Kanban hook notifications as events occur.The absolute path to the actual
codex binary. The wrapper passes all other arguments and stdin/stdout through to this binary unchanged.Any additional arguments to forward to the Codex binary (e.g. the task prompt, model flags, or Codex-specific options).
- Sets
CODEX_TUI_RECORD_SESSION=1so Codex writes a session log. - Polls the session log file and translates Codex events (
task_started,task_complete,approval_request,exec_command_begin, etc.) into Kanban hook events. - Forwards all signals (
SIGINT,SIGTERM) to the child Codex process. - Exits with the same exit code as Codex.
Claude Code integration example
Add the following to your Claude Code hooks configuration (.claude/settings.json) to send Kanban notifications from every Claude hook event:
activityText and other metadata fields automatically from the hook payload that Claude Code pipes to the command’s stdin.
The
KANBAN_TASK_ID and KANBAN_WORKSPACE_ID environment variables are injected by Kanban when it starts the Claude Code agent. You do not need to set them in the hook command itself.