| name | fox-pilot |
| description | Firefox browser automation CLI for AI agents. Use when users ask to automate Firefox, navigate websites, fill forms, take screenshots, extract web data, or test web apps in Firefox. Trigger phrases include "in Firefox", "fox-pilot", "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", or any browser interaction request mentioning Firefox. |
Fox Pilot Skill
CLI-based Firefox browser automation optimized for AI agents. Simple commands, persistent sessions, accessibility snapshots with refs.
Difference from agent-browser: Fox Pilot controls a real Firefox browser (not Chromium), preserving your existing session, cookies, and extensions.
Setup
npm install -g @fox-pilot/cli
fox-pilot install
Quick Start
fox-pilot open example.com
fox-pilot snapshot
fox-pilot click @e2
fox-pilot fill @e3 "test@example.com"
fox-pilot screenshot /tmp/page.png
Workflow Pattern
- Navigate to URL
- Snapshot to discover elements (use
-i for interactive only)
- Interact using refs (
@e1, @e2, etc.)
- Verify state with
get url, get title, or screenshot
- Repeat as needed
Core Commands
Navigation
fox-pilot open <url>
fox-pilot back
fox-pilot forward
fox-pilot reload
Snapshot (Element Discovery)
The snapshot command returns an accessibility tree with refs for each element:
fox-pilot snapshot
Snapshot Options
fox-pilot snapshot -i
fox-pilot snapshot -c
fox-pilot snapshot -d 3
fox-pilot snapshot -s "#main"
fox-pilot snapshot -i -c -d 5
Recommended: Use snapshot -i -c for most cases - shows only actionable elements.
Interactions
fox-pilot click <sel>
fox-pilot dblclick <sel>
fox-pilot fill <sel> <text>
fox-pilot type <sel> <text>
fox-pilot press <key> [sel]
fox-pilot select <sel> <val>
fox-pilot check <sel>
fox-pilot uncheck <sel>
fox-pilot scroll <dir> [px]
fox-pilot hover <sel>
Get Information
fox-pilot get text <sel>
fox-pilot get html <sel>
fox-pilot get value <sel>
fox-pilot get attr <sel> <attr>
fox-pilot get title
fox-pilot get url
fox-pilot get count <sel>
Check State
fox-pilot is visible <sel>
fox-pilot is enabled <sel>
fox-pilot is checked <sel>
Screenshots
fox-pilot screenshot [path]
fox-pilot screenshot -f [path]
Waiting
fox-pilot wait <selector>
fox-pilot wait 2000
fox-pilot wait --text "Welcome"
fox-pilot wait --url "**/success"
Semantic Locators (find command)
fox-pilot find role button click --name "Submit"
fox-pilot find text "Sign In" click
fox-pilot find label "Email" fill "test@test.com"
fox-pilot find placeholder "Search" fill "query"
Tabs
fox-pilot tab
fox-pilot tab new [url]
fox-pilot tab 2
fox-pilot tab close
JavaScript Execution
fox-pilot eval "return document.title"
fox-pilot eval "localStorage.getItem('token')"
Selectors
Refs (Recommended)
Use refs from snapshot for reliable element selection:
fox-pilot click @e2
fox-pilot fill @e3 "value"
fox-pilot get text @e1
CSS Selectors
fox-pilot click "#id"
fox-pilot click ".class"
fox-pilot click "button[type=submit]"
Common Patterns
Login Flow
fox-pilot open https://example.com/login
fox-pilot snapshot -i
fox-pilot fill @e1 "user@example.com"
fox-pilot fill @e2 "password123"
fox-pilot click @e3
fox-pilot wait --url "**/dashboard"
fox-pilot get url
Form Submission
fox-pilot open https://example.com/contact
fox-pilot snapshot -i -c
fox-pilot fill @e1 "John Doe"
fox-pilot fill @e2 "john@example.com"
fox-pilot fill @e3 "Hello, this is my message"
fox-pilot click @e4
fox-pilot wait --text "Thank you"
fox-pilot screenshot /tmp/confirmation.png
Scraping Data
fox-pilot open https://example.com/products
fox-pilot snapshot -s ".product-list"
fox-pilot get text ".product-title"
fox-pilot get attr ".product-link" "href"
Debug Failed Interaction
fox-pilot screenshot /tmp/debug.png
fox-pilot get url
fox-pilot get title
fox-pilot snapshot -i
Options
| Option | Description |
|---|
--json | JSON output (for parsing) |
-f, --full | Full page screenshot |
-i, --interactive | Interactive elements only |
-c, --compact | Compact snapshot |
-d, --depth <n> | Limit snapshot depth |
-s, --scope <sel> | Scope snapshot to selector |
Tips
- Always snapshot first before interacting with unknown pages
- Use
-i -c flags on snapshot to reduce noise
- Prefer refs over CSS for reliability
- Check
--json output when you need to parse results programmatically
- Firefox session is preserved - your cookies, logins, and extensions work
Troubleshooting
lsof -i :9222
tail -f /tmp/fox-pilot.log
fox-pilot install