Initial release — gstack v0.0.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-11 21:14:01 -07:00
commit 3d901066cd
34 changed files with 5415 additions and 0 deletions
Executable
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# gstack setup — build browser binary + register all skills with Claude Code
set -e
GSTACK_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILLS_DIR="$(dirname "$GSTACK_DIR")"
# 1. Build browse binary if needed
if [ ! -x "$GSTACK_DIR/browse/dist/browse" ]; then
echo "Building browse binary..."
cd "$GSTACK_DIR" && bun install && bun run build
fi
# 2. Only create skill symlinks if we're inside a .claude/skills directory
SKILLS_BASENAME="$(basename "$SKILLS_DIR")"
if [ "$SKILLS_BASENAME" = "skills" ]; then
linked=()
for skill_dir in "$GSTACK_DIR"/*/; do
if [ -f "$skill_dir/SKILL.md" ]; then
skill_name="$(basename "$skill_dir")"
# Skip node_modules
[ "$skill_name" = "node_modules" ] && continue
target="$SKILLS_DIR/$skill_name"
# Create or update symlink; skip if a real file/directory exists
if [ -L "$target" ] || [ ! -e "$target" ]; then
ln -snf "gstack/$skill_name" "$target"
linked+=("$skill_name")
fi
fi
done
echo "gstack ready."
echo " browse: $GSTACK_DIR/browse/dist/browse"
if [ ${#linked[@]} -gt 0 ]; then
echo " linked skills: ${linked[*]}"
fi
else
echo "gstack ready."
echo " browse: $GSTACK_DIR/browse/dist/browse"
echo " (skipped skill symlinks — not inside .claude/skills/)"
fi