CLI¶
remotebrowser is a command-line tool for managing browsers.
Install¶
On Linux, macOS, or FreeBSD:
curl -fsSL https://remotebrowser.ai/install.sh | bash
The script installs remotebrowser to ~/.local/bin.
Set REMOTEBROWSER_INSTALL_DIR to install elsewhere, or REMOTEBROWSER_VERSION (such as 0.2.0) to install a specific version.
Or download a prebuilt binary for Windows, macOS, Linux, or FreeBSD from the releases page. For example, on Linux x86_64:
VERSION=0.2.0
NAME=remotebrowser-$VERSION-linux-x86_64
curl -LO https://github.com/remotebrowser/cli/releases/download/v$VERSION/$NAME.tar.gz
tar -xzf $NAME.tar.gz
sudo install $NAME/remotebrowser /usr/local/bin/
Usage¶
Start with remotebrowser login <URL>, where <URL> is the server URL. For example:
remotebrowser login http://localhost:3000
This opens your web browser and shows a code. Check that the code matches the one in the terminal, then approve it. If you belong to several workspaces, choose the one the CLI may use. The CLI then stays logged in for 30 days.
Launch a browser. With --wait, the command blocks until the browser is running, then prints its ID:
ID=$(remotebrowser create --browser chrome --wait)
List the active browsers:
remotebrowser list
Print the CDP WebSocket URL, for example ws://localhost:3000/api/v1/browsers/B5xqk2m/cdp:
remotebrowser connect $ID
To use this with Playwright, see Connect over CDP.
When you are done, terminate the browser:
remotebrowser delete $ID
For all the commands and options, see the README, or run remotebrowser --help.