Skip to content

Shell Helpers

When MCP is unavailable, source scripts/preqstation-api.sh and use the shell wrappers directly.

Setup

Terminal window
source /path/to/preqstation-skill/scripts/preqstation-api.sh

Read-only Helpers

preq_get_tasks

Signature:

Terminal window
preq_get_tasks [status] [engine] [label]

Arguments:

  • status (optional): inbox, todo, hold, ready, done, archived
  • engine (optional): claude-code, codex, gemini-cli
  • label (optional): label name

Examples:

Terminal window
preq_get_tasks todo
preq_get_tasks ready codex
preq_get_tasks hold claude-code backend

preq_get_task

Terminal window
preq_get_task <task_id>

preq_get_project_settings

Terminal window
preq_get_project_settings <project_key>

preq_resolve_branch_name

Returns the saved task branch or a fallback.

Terminal window
preq_resolve_branch_name <task_id> [fallback_branch]

Mutation Helpers

Valid engine values:

  • claude-code
  • codex
  • gemini-cli

preq_create_task

Terminal window
preq_create_task '<json_payload>'

Example:

Terminal window
preq_create_task '{
"title": "Implement rate limiting",
"repo": "https://github.com/acme/my-app",
"engine": "claude-code"
}'

preq_start_task

Claims execution and marks run_state=working.

Terminal window
preq_start_task <task_id> [engine]

Example:

Terminal window
preq_start_task PROJ-284 claude-code

preq_update_task_status

Manual status-only override.

Terminal window
preq_update_task_status <task_id> <status> [engine]

Status values:

  • inbox
  • todo
  • hold
  • ready
  • done
  • archived

Example:

Terminal window
preq_update_task_status PROJ-284 hold codex

preq_plan_task

Uploads plan markdown and moves inboxtodo.

Terminal window
preq_plan_task <task_id> <plan_markdown> [engine]

Example:

Terminal window
PLAN="## Plan\n\n1. Add middleware\n2. Write tests"
preq_plan_task PROJ-284 "$PLAN" claude-code

preq_complete_task

Uploads result metadata and moves todo or holdready.

Terminal window
preq_complete_task <task_id> <summary> [engine] [pr_url] [tests] [notes] [branch_name]

Example:

Terminal window
preq_complete_task PROJ-284 \
"Implemented rate limiting for login endpoint" \
claude-code \
"https://github.com/org/repo/pull/123" \
"npm test" \
"All checks passed" \
"preqstation/PROJ/rate-limit"

preq_review_task

Runs optional checks locally, then either moves readydone or blocks the task.

Terminal window
preq_review_task <task_id> [engine] [test_cmd] [build_cmd] [lint_cmd]

Example:

Terminal window
preq_review_task PROJ-284 codex "npm test" "npm run build" "npm run lint"

preq_block_task

Moves the task to hold with a reason.

Terminal window
preq_block_task <task_id> <reason> [engine]

Example:

Terminal window
preq_block_task PROJ-284 "Missing required Redis environment variables" gemini-cli

preq_delete_task

Terminal window
preq_delete_task <task_id>

Environment Variables

Set these before sourcing the script:

Terminal window
export PREQSTATION_API_URL="https://your-domain.vercel.app"
export PREQSTATION_TOKEN="preq_xxxxxxxxxxxxxxxxx"
export PREQSTATION_ENGINE="codex" # optional fallback

Direct REST Calls

If you need raw HTTP instead of shell wrappers, see the REST API reference.