Files
chrome-use/bin/agent-browser
T
2026-01-11 04:00:44 -06:00

29 lines
611 B
Bash
Executable File

#!/bin/sh
# agent-browser CLI wrapper
# Tries native binary first, falls back to Node.js
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
case "$OS" in
darwin) OS="darwin" ;;
linux) OS="linux" ;;
mingw*|msys*|cygwin*) OS="win32" ;;
esac
case "$ARCH" in
x86_64|amd64) ARCH="x64" ;;
aarch64|arm64) ARCH="arm64" ;;
esac
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BINARY="$SCRIPT_DIR/agent-browser-${OS}-${ARCH}"
# Try native binary if it exists
if [ -f "$BINARY" ] && [ -x "$BINARY" ]; then
exec "$BINARY" "$@"
fi
# Fall back to Node.js
exec node "$SCRIPT_DIR/../dist/index.js" "$@"