From ba8e6d2edf0c7f7da408b741fb84e558bcf6d261 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Fri, 13 Mar 2026 23:47:02 +0100 Subject: [PATCH] mcptools: mount_beads.sh uses UUID first segment as default mount name Avoids ambiguity with directory-based names (e.g. "main" is not unique across projects). First segment of uuidgen (8 hex chars, 32-bit entropy) is sufficient for personal dev environments. Optional friendly name printed alongside UUID for human reference. Co-Authored-By: Claude Sonnet 4.6 --- mcptools/mount_beads.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mcptools/mount_beads.sh b/mcptools/mount_beads.sh index 7da1380..d3b3e81 100755 --- a/mcptools/mount_beads.sh +++ b/mcptools/mount_beads.sh @@ -1,7 +1,9 @@ #!/bin/bash # capabilities: beads # description: Mount a beads project -# Usage: mount_beads.sh [name] +# Usage: mount_beads.sh [friendly-name] +# Mount name defaults to first segment of a random UUID (8 hex chars, 32-bit entropy). +# Friendly name is optional and for human display only. set -euo pipefail if cat /etc/shadow >/dev/null 2>&1; then @@ -10,8 +12,13 @@ if cat /etc/shadow >/dev/null 2>&1; then fi if [ $# -lt 1 ]; then - echo "usage: mount_beads.sh [name]" >&2 + echo "usage: mount_beads.sh [friendly-name]" >&2 exit 1 fi -echo "mount $*" | 9p write anvillm/beads/ctl +CWD="$1" +FRIENDLY="${2:-}" +MOUNT=$(uuidgen | cut -d- -f1) + +echo "mount $CWD $MOUNT" | 9p write anvillm/beads/ctl +echo "$MOUNT${FRIENDLY:+ ($FRIENDLY)}"