Skip to content

Command line ​

Four commands ship with the packages.

CommandPackageRun it with
extension-use@extension-use/hostnpx extension-use … in a project that has the package
extension-use-relay@extension-use/relaynpx @extension-use/relay …
extension-use-mcp@extension-use/mcpnpx -y @extension-use/mcp …, usually from an MCP client's config
create-extension-usecreate-extension-usenpm create extension-use@latest …

extension-use ​

extension-use manifest ​

Prints the manifest fields Extension-use needs, or merges them into a file.

bash
npx extension-use manifest --groups runtime,tabs,page,dom,overlay --origins https://app.example.com --remote --write manifest.json
FlagMeaning
--groups <list>Groups the host enables. Default: all but the opt-in ones (tabCapture, downloads, bookmarks, history, cookies).
--origins <list>Websites allowed to connect from a tab (externally_connectable).
--matches <list>Pages the content runtime runs on. Default <all_urls>.
--no-side-panelDon't add the sidePanel permission.
--remoteRemote control through a relay: adds storage and alarms.
--write <file>Merge into manifest.json, or into the manifest key of package.json. Without it, prints the fields.

extension-use codegen ​

Writes TypeScript types for your extension's own actions, from runtime.describe.

bash
EXTENSION_USE_TOKEN=eu_ctl_… npx extension-use codegen --relay http://127.0.0.1:7777 --out src/extension-actions.ts
FlagMeaning
--relay <url>Ask a running browser through a relay. Token: EXTENSION_USE_TOKEN or --token.
--device <id>Which browser to ask. Default default.
--from <file>Or read saved runtime.describe output (JSON).
--out <file>Where to write. Default extension-actions.ts.
--allInclude the built-in actions too.

extension-use vendor ​

Copies the no-build bundles into your project. Run it from postinstall to keep them current.

bash
npx extension-use vendor --extension extension/vendor --web web/vendor
FlagMeaning
--extension <dir>Where to put the extension bundles. Default extension/vendor.
--web <dir>Where to put the web app client. Default web/vendor. Needs @extension-use/client installed.

extension-use-relay ​

bash
npx @extension-use/relay
CommandWhat it does
serve (default)Start the relay. It prints its URL and the owner token, and asks you to confirm pairing codes.
token create <name> [--grants a,b]Create a controller token. It's shown once.
token listList tokens.
token revoke <name>Revoke a token.
devicesList paired browsers.
unpair <deviceId>Remove a paired browser.
approve <code>Approve a pairing request, when the relay runs without a terminal.
owner-tokenPrint the owner token.
OptionMeaning
--port <n>Port. Default 7777, or EXTENSION_USE_RELAY_PORT.
--host <host>Address to listen on. Default 127.0.0.1. Put it behind HTTPS before you use 0.0.0.0.
--data <file>Data file. Default ~/.extension-use/relay.json, or EXTENSION_USE_RELAY_DATA.
--no-promptDon't ask to confirm pairing codes in the terminal. Use approve instead.

extension-use-mcp ​

bash
npx -y @extension-use/mcp --relay http://127.0.0.1:7777 [--device default] [--include "dom.*,tabs.*"] [--exclude "tabs.close"]

The token comes from EXTENSION_USE_TOKEN (preferred) or --token. See @extension-use/mcp.

create-extension-use ​

bash
npm create extension-use@latest my-extension -- --template wxt --url http://localhost:5173/ --yes

See start a new extension.

The SDK packages are released under the MIT license.