feat(@scripts): ✨ add rsend cli tool for broadcasting messages
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
926b41941a
commit
d682cc61f4
1 changed files with 40 additions and 0 deletions
40
bin/rsend
Executable file
40
bin/rsend
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
# rsend — send a message into a Clare-managed conversation.
|
||||
#
|
||||
# Usage:
|
||||
# rsend <convo> <message...>
|
||||
#
|
||||
# <convo> A Clare project name, or @group, that has live Claude sessions
|
||||
# assigned to it (see `clare status`).
|
||||
# <message> 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 <convo> <msg> --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 <convo> <message...>
|
||||
|
||||
<convo> Clare project name or @group
|
||||
<message> 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
|
||||
Loading…
Add table
Reference in a new issue