A TypeScript-based web automation tool built with Stagehand, consisting of a CLI (wb) and a server daemon (wbd) that communicate via file sockets.
Browse is a monorepo project that provides automated web browsing capabilities through two main components:
wb(CLI): Command-line interface for interacting with the browsing daemonwbd(Daemon): Server daemon that performs web automation using Stagehand and Browserbasecommon: Shared TypeScript code and types used by both components
- Node.js 20.x or higher
- npm or yarn package manager
npm installBuild the project using the following commands:
# Build everything (common + workspaces)
npm run build
# Build CLI only
npm run build:cli
# Build daemon only
npm run build:daemonRun components in development mode with hot reloading:
# Start daemon in dev mode
npm run dev:wbd
# Run CLI in dev mode (in a separate terminal)
npm run dev:wbTo make the wb and wbd commands available globally on your system:
npm run install:binsAfter installation, you can use:
wbcommand from anywherewbdcommand from anywhere
To uninstall the global commands:
npm run uninstall:binsUsage: wb [options] [command]
Options:
-s, --session [name] Name of the session to use: default is 'default' (default: "default")
-h, --help display help for command
Commands:
sessions List all sessions
delete Delete a session
runtime Get the runtime of the current tab
dump [options] Dump the current tab (max 8196 characters)
go <url> Go to a URL
interact <instructions> Interact with the current tab
tab Manage browser tabs
help [command] display help for commandYou first want to create a new, and then work from there.
you can have multiple tabs in a session, they share cookies, local storage, and other browser state.
Otherwise you can work with another session by specifying the --session option.
Usage: wb tab [options] [command]
Manage browser tabs
Options:
-h, --help display help for command
Commands:
new <name> <url> Create a new tab
close <name> Close a tab
list List all tabs
current Get the current tab
set-current <name> Set the current tab
help [command] display help for command