Skip to content

Instantly share code, notes, and snippets.

@PRO-2684
Last active August 25, 2026 07:37
Show Gist options
  • Select an option

  • Save PRO-2684/e809741c064c8f892b115198a9db8ee7 to your computer and use it in GitHub Desktop.

Select an option

Save PRO-2684/e809741c064c8f892b115198a9db8ee7 to your computer and use it in GitHub Desktop.
Standalone installer for vercel-labs/agent-browser

Node-free installer for agent-browser

An unofficial installer for Vercel's agent-browser that does not require Node.js or npm.

This is a workaround / proof of concept for vercel-labs/agent-browser#1717.

What it does

The script:

  • detects Linux, macOS, or Windows via Git Bash;
  • detects the current architecture and musl/glibc where applicable;
  • downloads the published agent-browser package directly from the npm registry;
  • keeps the matching native Rust binary, skills/, and skill-data/;
  • removes binaries for other platforms and Node/build-only files;
  • installs everything under ~/.local by default;
  • creates a native symlink in ~/.local/bin.

No Node.js runtime or npm CLI is used.

Usage

curl -fsSL <RAW_GIST_URL>/install-agent-browser.sh | bash

Or download and run it manually:

chmod +x install-agent-browser.sh
./install-agent-browser.sh

Install a specific version:

VERSION=0.35.0 ./install-agent-browser.sh

Use a different prefix:

PREFIX=/path/to/prefix ./install-agent-browser.sh

Windows

Windows is supported through Git Bash.

The script uses:

MSYS=winsymlinks:nativestrict

so ln -s creates a native Windows symlink instead of an MSYS emulated one. Your Windows configuration must permit creation of symbolic links.

Caveat

The npm tarball contains binaries for all supported platforms, so this method downloads more data than necessary before removing the unused binaries.

An official installer or per-platform release archive, as proposed in vercel-labs/agent-browser#1717, would avoid this overhead.

#!/usr/bin/env bash
set -euo pipefail
PACKAGE="agent-browser"
PREFIX="${PREFIX:-$HOME/.local}"
VERSION="${VERSION:-}"
die() {
echo "error: $*" >&2
exit 1
}
for cmd in curl tar sed uname; do
command -v "$cmd" >/dev/null 2>&1 || die "$cmd is required"
done
# Resolve latest npm version unless explicitly specified.
if [[ -z "$VERSION" ]]; then
echo "Resolving latest $PACKAGE version..."
VERSION="$(
curl -fsSL "https://registry.npmjs.org/$PACKAGE/latest" |
sed -n 's/.*"version":"\([^"]*\)".*/\1/p'
)"
[[ -n "$VERSION" ]] || die "failed to determine latest version"
fi
VERSION="${VERSION#v}"
# Detect platform.
case "$(uname -s)" in
Linux*)
os="linux"
;;
Darwin*)
os="darwin"
;;
MINGW*|MSYS*|CYGWIN*)
os="win32"
;;
*)
die "unsupported OS: $(uname -s)"
;;
esac
# Detect architecture.
case "$(uname -m)" in
x86_64|amd64)
arch="x64"
;;
arm64|aarch64)
if [[ "$os" == "win32" ]]; then
# Upstream currently uses x64 on Windows ARM64.
arch="x64"
else
arch="arm64"
fi
;;
*)
die "unsupported architecture: $(uname -m)"
;;
esac
# Detect musl.
if [[ "$os" == "linux" ]] &&
{ ldd --version 2>&1 || true; } | grep -qi musl; then
os="linux-musl"
fi
if [[ "$os" == "win32" ]]; then
binary="agent-browser-${os}-${arch}.exe"
link_name="agent-browser.exe"
else
binary="agent-browser-${os}-${arch}"
link_name="agent-browser"
fi
root="$PREFIX/lib/agent-browser/$VERSION"
bindir="$PREFIX/bin"
link="$bindir/$link_name"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
url="https://registry.npmjs.org/$PACKAGE/-/$PACKAGE-$VERSION.tgz"
echo "Installing $PACKAGE $VERSION"
echo " platform: $os-$arch"
echo " prefix: $PREFIX"
echo
echo "Downloading $url"
curl -fL "$url" -o "$tmp/package.tgz"
mkdir -p "$tmp/unpacked"
tar -xzf "$tmp/package.tgz" -C "$tmp/unpacked"
package="$tmp/unpacked/package"
[[ -d "$package" ]] ||
die "invalid npm package"
[[ -f "$package/bin/$binary" ]] ||
die "package does not contain bin/$binary"
[[ -d "$package/skills" ]] ||
die "package does not contain skills/"
[[ -d "$package/skill-data" ]] ||
die "package does not contain skill-data/"
# ----- Cleanup -----
# bin/: retain only our native executable.
find "$package/bin" -mindepth 1 -maxdepth 1 \
! -name "$binary" \
-exec rm -rf {} +
# Node/build/source-only content.
rm -rf \
"$package/scripts" \
"$package/cli"
# Keep these:
# bin/<native binary>
# skills/
# skill-data/
# LICENSE
# README.md
# package.json
#
# package.json is tiny and useful as installation metadata.
# ----- Install -----
mkdir -p "$(dirname "$root")"
rm -rf "$root"
mv "$package" "$root"
if [[ "$os" != "win32" ]]; then
chmod +x "$root/bin/$binary"
fi
mkdir -p "$bindir"
# Remove remnants of previous versions/install attempts.
rm -f \
"$bindir/agent-browser" \
"$bindir/agent-browser.exe"
if [[ "$os" == "win32" ]]; then
export MSYS="${MSYS:+$MSYS }winsymlinks:nativestrict"
fi
rm -f "$link"
ln -s "$root/bin/$binary" "$link"
echo
echo "Installed:"
echo " package: $root"
echo " binary: $root/bin/$binary"
echo " command: $link"
echo
"$link" --version
case ":$PATH:" in
*":$bindir:"*) ;;
*)
echo
echo "Note: $bindir is not in PATH."
echo "Add:"
echo " export PATH=\"$bindir:\$PATH\""
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment