Files
ai-ops-agent/relay/client.sh
2025-09-18 14:37:09 -04:00

12 lines
347 B
Bash

#!/usr/bin/env bash
# Simple CLI to talk to the relay
# Usage: ./client.sh "scale weblabs_php to 3"
set -euo pipefail
PROMPT="${1:-}"
if [ -z "$PROMPT" ]; then
echo "Usage: $0 "your request"" >&2
exit 1
fi
curl -s -X POST http://localhost:8090/chat -H 'Content-Type: application/json' -d "$(jq -n --arg p "$PROMPT" '{prompt:$p}')" | jq .