还没翻译·译自英文(developers.cloudflare.com)·本页 22 段都还没译
Interact with the Browser Run service using Wrangler.
Create a new Browser Run session
npx wrangler browser create
yarn wrangler browser create
pnpm wrangler browser create
-
--lab boolean default: false
Enable lab browser session with experimental Chrome features (e.g., WebMCP)
-
--keepAlive number alias: --k
Keep-alive duration in seconds (60-600)
-
--json boolean default: false
Return session info as JSON
-
--open boolean
Open DevTools in browser (default: true in interactive mode)
-
--v boolean alias: --version
Show version number
-
--cwd string
Run as if Wrangler was started in the specified directory instead of the current working directory
-
--config string alias: --c
Path to Wrangler configuration file
-
--env string alias: --e
Environment to use for operations, and for selecting .env and .dev.vars files
-
--env-file string
Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--install-skills boolean default: false
Install Cloudflare skills for detected AI coding agents before running the command
-
--profile string
Use a specific auth profile
Close a Browser Run session
npx wrangler browser close <SESSIONID>
yarn wrangler browser close <SESSIONID>
pnpm wrangler browser close <SESSIONID>
-
--v boolean alias: --version
Show version number
-
--cwd string
Run as if Wrangler was started in the specified directory instead of the current working directory
-
--config string alias: --c
Path to Wrangler configuration file
-
--env string alias: --e
Environment to use for operations, and for selecting .env and .dev.vars files
-
--env-file string
Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--install-skills boolean default: false
Install Cloudflare skills for detected AI coding agents before running the command
-
--profile string
Use a specific auth profile
List active Browser Run sessions
npx wrangler browser list
yarn wrangler browser list
pnpm wrangler browser list
-
--v boolean alias: --version
Show version number
-
--cwd string
Run as if Wrangler was started in the specified directory instead of the current working directory
-
--config string alias: --c
Path to Wrangler configuration file
-
--env string alias: --e
Environment to use for operations, and for selecting .env and .dev.vars files
-
--env-file string
Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--install-skills boolean default: false
Install Cloudflare skills for detected AI coding agents before running the command
-
--profile string
Use a specific auth profile
View a live browser session
npx wrangler browser view [SESSIONID]
yarn wrangler browser view [SESSIONID]
pnpm wrangler browser view [SESSIONID]
-
[SESSIONID] string
The session ID to inspect (optional if only one session exists)
-
--target string
Target selector (matches id exactly, or url/title by substring)
-
--json boolean default: false
Return live browser session URL(s) as JSON
-
--open boolean
Open in browser (default: true in interactive mode)
-
--v boolean alias: --version
Show version number
-
--cwd string
Run as if Wrangler was started in the specified directory instead of the current working directory
-
--config string alias: --c
Path to Wrangler configuration file
-
--env string alias: --e
Environment to use for operations, and for selecting .env and .dev.vars files
-
--env-file string
Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
-
--install-skills boolean default: false
Install Cloudflare skills for detected AI coding agents before running the command
-
--profile string
Use a specific auth profile