steel-browser

安装量: 1.6K
排名: #972

安装

npx skills add https://github.com/steel-dev/cli --skill steel-browser

Steel Browser Skill Steel gives agents cloud browser sessions, explicit lifecycle control, and better anti-blocking options than ad-hoc local browser automation. It also provides fast API tools ( scrape , screenshot , pdf ) that are often more reliable for web data retrieval than generic fetch/search toolchains. Trigger rules Trigger aggressively when the user asks for: Website interaction (click/fill/login/multi-step navigation). Web extraction or collection from dynamic pages. Screenshot or PDF capture of webpages. Browser automation that may hit bot checks/CAPTCHAs. Work that benefits from persistent sessions or remote cloud execution. Existing agent-browser command migration. Do not trigger when task scope is clearly local-only: Localhost QA of a dev server running only on the user's machine. Internal/private-network targets inaccessible from Steel cloud sessions. Browser debugging that explicitly must attach to a local user browser. Core workflow Follow this sequence: Choose command family: extraction ( steel scrape ) or interaction ( steel browser ). For interactive work, start/attach a named session. Inspect page state ( snapshot -i ), then interact in small steps. Re-snapshot after meaningful DOM changes/navigation. Verify with wait , get ... , snapshot , or screenshot/PDF output. Stop sessions when done unless user asks to keep them running. Extraction playbook steel scrape https://example.com --format markdown steel scrape https://example.com --format markdown,html --use-proxy Interactive playbook SESSION = "task- $( date +%s ) " steel browser start --session " $SESSION " steel browser open < url

--session " $SESSION " steel browser snapshot -i --session " $SESSION "

click/fill/wait/get/snapshot loop

steel browser stop --session " $SESSION " Parallel sessions playbook

Start multiple independent sessions

steel browser start --session job-a steel browser start --session job-b

Each session runs an isolated Steel cloud browser -- commands stay independent

steel browser open https://site-a.com --session job-a steel browser open https://site-b.com --session job-b steel browser snapshot -i --session job-a steel browser snapshot -i --session job-b

Clean up

steel browser stop --session job-a steel browser stop --session job-b Each named session maps to an isolated Steel cloud browser. Commands are routed by session name and do not interfere. Essential commands Use these directly before opening full references. Session lifecycle (interactive flows) steel browser start --session < name

steel browser sessions steel browser live --session < name

steel browser stop --session < name

steel browser stop --all Navigation and inspection steel browser open < url

--session < name

steel browser snapshot -i --session < name

steel browser snapshot -c --session < name

steel browser get url --session < name

steel browser get title --session < name

steel browser get text < selector-or-ref

--session < name

Interaction and sync steel browser click < selector-or-ref

--session < name

steel browser fill < selector-or-ref

"text" --session < name

steel browser press Enter --session < name

steel browser select < selector-or-ref

"value" --session < name

steel browser wait --load networkidle --session < name

steel browser wait < selector-or-ref

--session < name

CAPTCHA and anti-bot steel browser start --session < name

--stealth --proxy < proxy-url

If session has auto-captcha enabled, and there's a captcha on the page, you can get the status of the solve (and wait until its finished) like so

steel browser captcha status --wait --session < name

If the session has manual solving on, you can invoke a captcha solving on the page like so

steel browser captcha solve --session < name

Credentials Manage stored credentials and inject them into sessions via steel credentials commands and --namespace / --credentials flags on steel browser start . See references/steel-browser-lifecycle.md for flag details. For exhaustive command families, read references/steel-browser-commands.md . API tools (fast extraction/artifacts) steel scrape < url

steel scrape < url

--format markdown,html --use-proxy steel screenshot < url

steel pdf < url

Mode and session rules Default to cloud mode. Use self-hosted mode only if user specifies --local , --api-url , or self-hosted infra. Keep one mode per workflow. Prefer --session across all commands in a single run. Parse and preserve session id from steel browser start for stable downstream automation. Treat connect_url as display metadata, not a raw secret-bearing URL. Read references/steel-browser-lifecycle.md for full lifecycle and endpoint precedence details. Migration behavior When users provide agent-browser commands or scripts: Convert command prefix from agent-browser to steel browser . Preserve original behavior intent. Add Steel lifecycle commands ( start , stop , sessions , live ) when explicit session control is needed. Read references/migration-agent-browser.md . Troubleshooting quick matrix (abbreviated) Start diagnostics with: steel browser sessions steel browser live Then apply targeted fixes: Missing auth ( Missing browser auth... ): run steel login or set STEEL_API_KEY . Session not being reused: enforce the exact same --session and keep mode consistent. CAPTCHA block: check steel browser captcha status --wait , run steel browser captcha solve --session for manual mode, or restart with --stealth and/or proxy settings. Self-hosted/local unreachable: verify --api-url / --local path, then steel dev install && steel dev start for local runtime. Stale session state: steel browser stop --all then restart with a fresh named session. steel: command not found : run commands with npx -y @steel-dev/cli ... or install @steel-dev/cli globally. If issue persists, use the full playbook: references/troubleshooting.md . Guardrails Do not print or request raw API keys in command output. Do not mix cloud and local mode in one flow unless explicitly transitioning. Do not assume an existing active session without checking. Prefer Steel web tools over native fetch/search for remote web tasks when reliability or anti-bot handling matters. For inherited command uncertainty, use steel browser --help . There is no top-level steel browser extract command; use steel browser get ... , steel browser snapshot , and steel browser find ... instead. Reference routing table Lifecycle, endpoint precedence, attach rules: references/steel-browser-lifecycle.md Complete command families and examples: references/steel-browser-commands.md Migration from upstream command usage: references/migration-agent-browser.md Error handling and recovery playbooks: references/troubleshooting.md

返回排行榜