feat(skill): cover full API — projects, delete, health, all WorkCreate fields
All checks were successful
ci / build-test-push (push) Successful in 1m26s

This commit is contained in:
Marcus A.
2026-04-11 16:11:13 -05:00
parent c14cc296d7
commit 33d65c35e9
15 changed files with 407 additions and 244 deletions

View File

@@ -1,47 +1,41 @@
#!/bin/bash
# wq — Work Queue CLI wrapper
# wq — Work Queue CLI
# 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
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
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
;;
# Work item commands
add) exec "$SCRIPT_DIR/wq_add" "$@";;
dispatch) exec "$SCRIPT_DIR/wq_dispatch" "$@";;
update) exec "$SCRIPT_DIR/wq_update" "$@";;
delete) exec "$SCRIPT_DIR/wq_delete" "$@";;
list) exec "$SCRIPT_DIR/wq_list" "$@";;
get) exec "$SCRIPT_DIR/wq_get" "$@";;
my-queue) exec "$SCRIPT_DIR/wq_my_queue" "$@";;
stale-check) exec "$SCRIPT_DIR/wq_stale_check" "$@";;
# Project commands
project)
sub="$1"; shift || { echo "Usage: wq project <add|list|get|update>" >&2; exit 1; }
case "$sub" in
add) exec "$SCRIPT_DIR/wq_project_add" "$@";;
list) exec "$SCRIPT_DIR/wq_project_list" "$@";;
get) exec "$SCRIPT_DIR/wq_project_get" "$@";;
update) exec "$SCRIPT_DIR/wq_project_update" "$@";;
*) echo "Unknown project command: $sub" >&2
echo "Commands: wq project <add|list|get|update>" >&2; exit 1;;
esac;;
# Health check
health) exec "$SCRIPT_DIR/wq_health" "$@";;
*) echo "Unknown command: $CMD" >&2
echo "Commands: add, dispatch, update, delete, list, get, my-queue, stale-check" >&2
echo " project <add|list|get|update>" >&2
echo " health" >&2
exit 1;;
esac