Files
gstack/browse/bin/find-browse
Garry Tan 10e6d39f27 feat: dual-host setup + find-browse for Codex/Gemini/Cursor
- setup: add --host codex|claude|auto flag, install to ~/.codex/skills/
  when targeting Codex, auto-detect installed agents
- find-browse: priority chain .codex > .agents > .claude (both
  workspace-local and global)
- dev-setup/teardown: create .agents/skills/gstack symlinks for dev mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:57:43 -07:00

22 lines
814 B
Bash
Executable File

#!/bin/bash
# Shim: delegates to compiled find-browse binary, falls back to basic discovery.
# The compiled binary handles git root detection for workspace-local installs.
DIR="$(cd "$(dirname "$0")/.." && pwd)/dist"
if test -x "$DIR/find-browse"; then
exec "$DIR/find-browse" "$@"
fi
# Fallback: basic discovery with priority chain
ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
for MARKER in .codex .agents .claude; do
if [ -n "$ROOT" ] && test -x "$ROOT/$MARKER/skills/gstack/browse/dist/browse"; then
echo "$ROOT/$MARKER/skills/gstack/browse/dist/browse"
exit 0
fi
if test -x "$HOME/$MARKER/skills/gstack/browse/dist/browse"; then
echo "$HOME/$MARKER/skills/gstack/browse/dist/browse"
exit 0
fi
done
echo "ERROR: browse binary not found. Run: cd <skill-dir> && ./setup" >&2
exit 1