Files
work-queue-api/skill/bin/wq
Marcus A. c5be58c3c5
Some checks failed
ci / build-test-push (push) Failing after 29s
feat: add work-queue skill for Marcus and Steve
2026-04-11 14:48:08 -05:00

48 lines
842 B
Bash
Executable File

#!/bin/bash
# wq — Work Queue CLI wrapper
# Usage: wq <command> [options]
set -e
API_URL="${WORK_QUEUE_API_URL:-}"
if [[ -z "$API_URL" ]]; then
if [[ -f ~/.config/work_queue_api_url ]]; then
API_URL=$(cat ~/.config/work_queue_api_url)
else
echo "Error: WORK_QUEUE_API_URL not set and no ~/.config/work_queue_api_url" >&2
exit 1
fi
fi
CMD="$1"
shift || { echo "Usage: wq <command> [args]" >&2; exit 1; }
case "$CMD" in
add)
wq_add "$@"
;;
dispatch)
wq_dispatch "$@"
;;
update)
wq_update "$@"
;;
list)
wq_list "$@"
;;
get)
wq_get "$@"
;;
my-queue)
wq_my_queue "$@"
;;
stale-check)
wq_stale_check "$@"
;;
*)
echo "Unknown command: $CMD" >&2
echo "Commands: add, dispatch, update, list, get, my-queue, stale-check" >&2
exit 1
;;
esac