Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .claude/commands/buddy-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
description: Generate a shareable PNG card of your Buddy's current status.
---

Generate a snapshot PNG of the current Buddy companion card.

If `$ARGUMENTS` is present, treat it as an optional output file path.

```bash
set -euo pipefail

args=()
if [ -n "${ARGUMENTS:-}" ]; then
read -r -a args <<< "$ARGUMENTS"
fi

if command -v buddy-share >/dev/null 2>&1; then
buddy-share "${args[@]}"
else
BUDDY_SERVER="$HOME/.buddy/server/dist/cli/snapshot-cli.js"
NODE_BIN="$(command -v node)"
for candidate in /opt/homebrew/bin/node /usr/local/bin/node; do
if [ -x "$candidate" ] && [[ "$NODE_BIN" == /Applications/*.app/* ]]; then
NODE_BIN="$candidate"
break
fi
done
"$NODE_BIN" "$BUDDY_SERVER" "${args[@]}"
fi
```

Execute the bash block above, then report the saved PNG path back to the user.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ echo " Building..."
npm run build --quiet 2>/dev/null

# ── Symlink CLI binaries onto PATH ──
for bin_entry in buddy:buddy.js buddy-doctor:doctor-cli.js; do
for bin_entry in buddy:buddy.js buddy-doctor:doctor-cli.js buddy-share:snapshot-cli.js; do
bin_name="${bin_entry%%:*}"
bin_file="$INSTALL_DIR/dist/cli/${bin_entry##*:}"
if [ -f "$bin_file" ]; then
Expand Down