fastbrowse can drive a browser you already have open, signed in with your profile. Any Chromium app works, including Electron apps, as long as it exposes its DevTools port.
Start the app with the debugging port
--remote-debugging-port is read at launch. A running app ignores it, so quit the app and start it again with the flag.
open -a "Visual Studio Code" --args --remote-debugging-port=9222 ~/code/my-project
On Linux and Windows, pass the same flag to the binary. Then point a run at that port and name the window it should use:
fastbrowse "Open the Extensions view and report how many extensions are installed." \
--cdp-port 9222 --target-match my-project
--target-matchpicks a window by title or URL, for apps with more than one window open.--attachtakes over the first window and skips the DevTools dialog.- Without
--start, the run begins on whatever the window shows, and the window stays open afterwards. - Popups the window opens join the run.
Keep a signed-in Chrome open
Chrome ignores the debugging port on its default profile, so give it a data directory of its own. Sign in once by hand and leave it running:
google-chrome --remote-debugging-port=9222 --user-data-dir="$HOME/.fastbrowse/chrome"
fastbrowse "Report my open orders." --start https://www.amazon.com/ --cdp-port 9222
Each run opens a background tab in that browser and closes it afterwards. The agent never holds the password, because the session is already in the profile. For runs that need credentials handed over, see browser agent logins without sharing passwords.
Focus while a run works
A run in a visible window works in a tab behind the current one and does not raise the window. Three things still bring it forward:
- Chrome raises its window when it starts headed.
- A popup opens a new window at the front.
- With
--attach, clicking a tab in that window makes the run follow your click.
To keep a run out of sight, run it headed in a separate session.
Close the port when you are done
Anything on the machine that can reach a DevTools port can read every page, cookie and signed-in session in that browser. Bind the port to loopback only, and close the app or restart it without the flag when you finish.
The attach guide is the reference for the flags, and run statuses and exit codes lists how a run ends.
Next: your first run.