在终端中使用 Stylebot
在命令行中控制 Stylebot,或交给 Claude Code、Codex、Cursor 等编程智能体来做。智能体直接在你的浏览器中修改网站样式,使用你自己的订阅,无需 API 密钥。
开始设置
安装 Stylebot
适用于 Chrome 或 Edge。命令行暂不支持 Firefox。
安装 CLI
需要 Node 20 或更高版本。
$ npm install -g @stylebot/cli连接到你的浏览器
这会在 Chrome 和 Edge 中注册 CLI,让 Stylebot 能连接到它。
$ stylebot install开启命令行访问
在 Stylebot 设置的“基本”中,开启允许此电脑上的应用控制 Stylebot,并允许浏览器请求的权限。
添加 Claude Code 插件 可选
在 Claude Code 中运行:
$ /plugin marketplace add ankit/stylebot$ /plugin install stylebot@stylebot然后试试:
$ /stylebot news.ycombinator.com give it a dark theme
命令
智能体会替你运行这些命令,你也可以自己运行。stylebot --help 会列出所有命令。
- $ stylebot open news.ycombinator.com
- 在你当前窗口后方的窗口中打开页面,并输出其标签页 ID。
- $ stylebot outline 54432929
- 以概要形式输出页面上的可见元素。
- $ stylebot css set news.ycombinator.com < dark.css
- 将 CSS 保存为该网站的样式并应用,然后检查页面。
- $ stylebot screenshot 54432929 -o page.png
- 保存标签页的截图。
隐私
命令行访问默认关闭,需要你手动开启。开启后,此电脑上的应用可以读取你打开的页面、截取屏幕截图并更改你的样式。随时可以在 Stylebot 的设置中关闭。
Stylebot 和 CLI 只在这台电脑上相互通信,不会向任何地方发送数据。智能体会把它读取的内容发送给自己的服务商,例如 Claude Code 会发送给 Anthropic。