Replace inline SKILL.md instructions with executable shell scripts for each setup phase (environment check, deps, container, auth, groups, channels, mounts, service, verify). Scripts emit structured status blocks for reliable parsing. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
575 B
Bash
Executable File
19 lines
575 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# 05b-list-groups.sh — Query WhatsApp groups from the database.
|
|
# Output: pipe-separated JID|name lines, most recent first.
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
|
|
DB_PATH="$PROJECT_ROOT/store/messages.db"
|
|
|
|
LIMIT="${1:-30}"
|
|
|
|
if [ ! -f "$DB_PATH" ]; then
|
|
echo "ERROR: database not found" >&2
|
|
exit 1
|
|
fi
|
|
|
|
sqlite3 "$DB_PATH" "SELECT jid, name FROM chats WHERE jid LIKE '%@g.us' AND jid <> '__group_sync__' AND name <> jid ORDER BY last_message_time DESC LIMIT $LIMIT"
|