| name | browser-cli |
| description | Control Firefox browser from the command line. Use for web automation, scraping, testing, or any browser interaction tasks. |
Usage
TAB=$(browser-cli --go "https://example.com")
browser-cli $TAB <<< 'snap()'
browser-cli --list
browser-cli --list --json
JavaScript API
Actions return confirmations; use snap() to get page state. Refs [N] come
from snap() output. CSS selectors also work: click("#submit"),
click("Sign In", "text").
await click(1)
await type(2, "text")
await hover(3)
await drag(4, 5)
await select(6, "value")
key("Enter")
snap()
snap({full: true})
snap({interactive: true})
snap({forms|links|buttons: true})
snap({text: "login"})
get(1, "text")
is(2, "visible")
logs()
await wait(1000)
await wait("idle")
await wait("text", "Success")
await wait("gone", "Loading")
scroll("down")
await upload(3, "/path/to/file.pdf")
await download(url, "file.pdf")
await shot("/tmp/page.png")
read()
Alternative to read(): curl -sL "https://r.jina.ai/$URL" returns clean
markdown without a browser tab — prefer for public static articles/docs.
Snapshot Format
[1] heading "Welcome"
[2] input[email] "Email" [required]
[3] button "Sign In"
[N] = ref for click/type/etc. Shows role, name, and attrs like [disabled],
[checked], [required].
Example: Login Flow
TAB=$(browser-cli --go "https://example.com/login")
browser-cli $TAB <<< 'snap()'
browser-cli $TAB <<'EOF'
await type(1, "user@test.com")
await type(2, "secret123")
await click(3)
await wait("text", "Welcome")
snap()
EOF