Automation

Create terminals on a schedule, inject prompts into existing sessions, run sequential workflows, or deliver messages through webhooks. Inspect rules and execution history in the UI.

Scheduled terminal creation

  • Open Settings > Automation and create a rule.
  • Set the workspace (or unbound HOME), startup command, and inline prompt or live Prompt Library reference.
  • Choose a five-field cron expression in the computer’s local timezone or a one-time date and time.
  • Optionally add a precheck command, inspect the next-run time, enable the schedule, and save. Use Run now to check it and inspect execution history.

Automation opens a new foreground terminal and sends its prompt after readiness checks. Failed prechecks skip that run and record the reason. Live prompt references resolve at run time in the selected workspace; prompt variables are unsupported. Sign-in, project-trust, and permission prompts still require your answer in the terminal.

Stopping tracking leaves the terminal open and prevents further automation input. Schedules need the desktop app running; they are not a hosted scheduler.

Keep-alive for existing sessions

Keep-alive injects a message into an existing session. Interval, idle, daily, and once schedules are available through the HTTP API. Idle mode waits for a local agent to be quiet for the configured threshold. One-shot input removes its rule after delivery.

The CLI exposes list, set, and rm for interval, idle, and daily rules. Use the HTTP API for a live Prompt Library reference, resolved on each trigger. Every trigger outcome is recorded in run history, including skipped slots.

termdock session keepalive set <id> --message "continue the review" --idle 15m --json
termdock session keepalive list <id> --json
termdock session keepalive rm <id> <rule-id> --json
Keep-alive API

Workflows

Use the Workflows panel to create a sequence of named prompt steps and select an eligible existing agent terminal. Each step sends a prompt and waits for the agent’s turn to finish before advancing. Inline prompts and Prompt Library references are supported.

Permission prompts pause the workflow for you to answer. Each step has a timeout; inspect paused or timed-out runs before choosing how to continue. Workflows can be bound to an existing target with interval or daily schedules. This differs from cron automation that creates a new terminal.

Webhooks

  • In Settings > Automation > Webhooks, choose a local workspace and an existing tab name.
  • Create the webhook and copy its URL immediately. The secret URL is shown only once.
  • POST a JSON body containing exactly message and submit. The target must be an agent waiting for input.
  • Revoke the URL in Settings when no longer needed.
curl -X POST "$WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{"message":"Review the new build result","submit":true}'

submit: false types without Enter; submit: true also sends Enter. Busy, missing, ambiguous, or unreadable targets reject the request without creating a session or queuing input. This URL can deliver only to its saved workspace and tab name, and does not grant general Terminal API access.

For an external sender, use your own HTTPS tunnel or reverse proxy and expose only /api/webhooks/.... Treat the URL as a password; never expose the rest of the local Terminal API.

Webhook parameters and responses