跳到正文

正在自动登录…

← 返回项目列表

tractordev/webframe

网页自动化模型本地部署

webframe 是一个命令行工具,用于在隐藏的 webview 中加载网页,并将页面控制台输出连接到终端,支持从标准输入评估 JavaScript,适合运行浏览器专用代码、后台运行页面或与页面交互。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/25 12:56:05 · 查看原文

值得看Go应用与服务
累计 Stars
61
当前热度
1 天内 · 小火
仓库创建时间
打开 GitHub ↗

选用指南

AI 根据 README 整理 · 2026/10/25 12:56:05

使用方式

通过命令行使用,可加载 URL 或本地文件,支持控制台模式、窗口显示、静默输出等选项。

查看 README 依据
Debian/Ubuntu: `apt install libwebkit2gtk-4.1-0 xvfb` ## Usage ``` webframe [-s|-S] [-e] [-c] [-d] [-v] [-w [WIDTHxHEIGHT]] <url|file> ``` The argument is required. It can be a URL or a path to a local file. Use `about:blank` for an empty page. | Flag | | |---|---| | `-c` | Console: evaluate each line of stdin in the page and print the result | | `-e` | Exit with status 1 on the first exception | | `-s` | Silence exceptions | | `-S` | Silence all output (stdout and stderr, including native libraries) | | `-w [WxH]` | Show a window, optionally sized, e.g. `-w 1024x768` |
部署要求

Windows 需要 Edge WebView2 Runtime(Windows 10/11 预装),Linux 需要 WebKitGTK 4.1 或 6.0 及显示或 Xvfb,macOS 无需额外依赖。

查看 README 依据
go install tractor.dev/webframe/cmd/webframe@latest ``` Runtime requirements: | Platform | Needs | |---|---| | macOS | Nothing | | Windows | Edge WebView2 Runtime (preinstalled on Windows 10/11) | | Linux (glibc) | WebKitGTK 4.1 or 6.0, plus a display or Xvfb | | Linux (musl, Alpine) | `apk add webkit2gtk-4.1 xvfb`, and the `linux-musl` build | On Linux, if neither `DISPLAY` nor `WAYLAND_DISPLAY` is set, webframe starts its own private Xvfb and shuts it down when it exits. If you run it under `xvfb-run` or in a desktop session, it uses that display instead.
已知限制

在 Linux 上若无 DISPLAY 或 WAYLAND_DISPLAY 则自动启动私有 Xvfb;macOS 关闭节流,其他平台可能被节流。

查看 README 依据
go install tractor.dev/webframe/cmd/webframe@latest ``` Runtime requirements: | Platform | Needs | |---|---| | macOS | Nothing | | Windows | Edge WebView2 Runtime (preinstalled on Windows 10/11) | | Linux (glibc) | WebKitGTK 4.1 or 6.0, plus a display or Xvfb | | Linux (musl, Alpine) | `apk add webkit2gtk-4.1 xvfb`, and the `linux-musl` build | On Linux, if neither `DISPLAY` nor `WAYLAND_DISPLAY` is set, webframe starts its own private Xvfb and shuts it down when it exits. If you run it under `xvfb-run` or in a desktop session, it uses that display instead.
without the prefix, before any page script runs: ``` WF_API_KEY=abc webframe app.html # window.API_KEY === "abc" ``` ### Lifecycle | Event | Effect | |---|---| | `window.close()` in the page | Exit 0 | | Closing the window (with `-w`) | Exit 0 | | `SIGHUP` | Reload the original URL | | `SIGINT` / `SIGTERM` | Exit 0 | | stdin closes (with `-c`) | Exit 0 | | Exception (with `-e`) | Exit 1 | | Bad usage | Exit 2 | Throttling on macOS is turned off, so timers and animation keep running at full speed while hidden. Other platforms may be throttled. ## Docker

README

正在加载 README…

收录信息

仓库创建时间
2026/10/24 22:18:15
首次达标收录
2026/10/25 12:51:01
统计更新时间
2026/10/25 15:21:01

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

值得看加权总分 4.0 / 5

新颖度
3.6
实用价值
4.1
成熟度
4.7
实质含量
4.0

由 Jev 模型根据仓库描述与 README 评估,2026/10/25 12:51:01 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/10/25 08:31:43
许可证标识
MIT
Fork 数
1
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目