diff --git a/bin/rsend b/bin/rsend new file mode 100755 index 0000000..a2878c5 --- /dev/null +++ b/bin/rsend @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# rsend — send a message into a Clare-managed conversation. +# +# Usage: +# rsend +# +# A Clare project name, or @group, that has live Claude sessions +# assigned to it (see `clare status`). +# Free text. Joined with spaces and delivered as a user prompt to +# every assigned session. +# +# Examples: +# rsend roadmap "are we still blocked on auth?" +# rsend @backend "deploy is green, you can resume merges" +# +# Implementation: thin wrapper over `clare broadcast --yes`. +# Requires the `clare` CLI on $PATH (https://…/@clare). + +set -euo pipefail + +if [ $# -lt 2 ] || [ "${1:-}" = "-h" ] || [ "${1:-}" = "--help" ]; then + cat >&2 <<'USAGE' +usage: rsend + + Clare project name or @group + text to deliver (any number of args, joined with spaces) + +Lists live targets: clare status +USAGE + exit 2 +fi + +target="$1"; shift + +if ! command -v clare >/dev/null 2>&1; then + echo "rsend: 'clare' not found on PATH — install @clare first" >&2 + exit 127 +fi + +exec clare broadcast "$target" "$@" --yes