Skip to content

Quick Start

Get started with Bflow in two minutes.

Before you begin, ensure you have:

  1. Bun (version 1.1 or higher) installed on your machine.
  2. Google Chrome or Chromium installed locally.

Clone the repository and install dependencies with Bun:

Terminal window
git clone https://github.com/KhBayazidAhmed/browser-automation-cli.git
cd browser-automation-cli
bun install

The simplest and most user-friendly way to use the CLI is the Interactive Terminal Studio:

Terminal window
bun cli

bun dev starts every development workspace in the monorepo. Use bun cli when you only want the automation studio.

You will see an interactive prompt:

β”Œ ⚑ Browser Automation Studio
β”‚
β—‡ What would you like to do?
β”‚ ● 🌊 Run a Workflow
β”‚ β—‹ πŸ”΄ Record New Workflow
β”‚ β—‹ πŸš€ Run Programmatic Task
β”‚ β—‹ πŸ’¬ Open Interactive Browser REPL
β”‚ β—‹ πŸ“ View Extracted Data & Outputs
β”‚ β—‹ ❌ Exit

Use your arrow keys and press Enter to choose an action.


To visually record a new automation flow in Chrome:

Terminal window
bun record workflows/my-first-flow.json https://news.ycombinator.com
  1. Chrome will open with the In-Page Floating HUD Toolbar.
  2. Click on elements, type into search boxes, or press πŸ” Extract / πŸ“Š List to extract data.
  3. Click πŸ›‘ Finish (or press f / Enter in the terminal) to save your workflow to workflows/my-first-flow.json.

Execute the recorded workflow anytime from the command line:

Terminal window
# Run headless (fast, in the background)
bun flow workflows/my-first-flow.json
# Run headed (watch Chrome execute live in a window)
bun flow workflows/my-first-flow.json --headed

πŸ› οΈ Step 5: Try the Interactive Browser REPL

Section titled β€œπŸ› οΈ Step 5: Try the Interactive Browser REPL”

Need to inspect a webpage or test CDP commands interactively? Launch the REPL:

Terminal window
bun repl
cdp> goto https://example.com
βœ“ Loaded (210ms)
cdp> title
Title: Example Domain
cdp> screenshot output/example.png
βœ“ Saved screenshot (18.4 KB) to output/example.png
cdp> exit