
Rendercheck
io.github.ParthibanRajasekaran由 GitHub 帳號 ParthibanRajasekaran 發布v0.6.0更新於 Nov 1, 2026
Check from a screenshot that text is really visible to users. Local, offline OCR.
概覽
本機離線 OCR 伺服器,讓助理檢查截圖中的文字是否真的可見、清晰且正確呈現。
- 可以做什麼
- 驗證截圖文字:確認預期文字確實可見、清晰可讀,可設定 OCR 信心度與 WCAG 對比度門檻
- 讀取截圖文字:回傳使用者實際看到的文字,即原始 OCR 結果
- 可作用於整張圖片或指定區域,指定頁面元素時還會與 DOM 文字比對
- 完全在行程內透過 Tesseract.js WebAssembly 執行,不發出網路請求
- 適用情境
- 適合助理處理介面程式碼或測試時,確認畫面上真正呈現的內容而非 DOM 中的內容,例如找出錯誤的貨幣符號、被遮住的文字或對比度不足的文字。也適合在終端機或編碼助理中從截圖讀取文字。
- 執行需求
- 以本機 stdio 行程執行,透過 npx 從 @rendercheck/sdk 這個 npm 套件啟動,需要 Node.js 18 以上版本。未宣告需要 API 金鑰、帳號或環境變數。套件只附英文 OCR 資料,其他語言需自行下載 traineddata 檔並設定 langPath。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Rendercheck,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
RenderCheck
Assert what users actually see, not just what is in the DOM. RenderCheck takes a screenshot, reads it with OCR on your machine, and fails your Playwright or Cypress test with a clear message when the rendered text is wrong, too faint to read, or not there at all.
Renamed. Up to 0.4.1 this package was published as
@freetextfromimage/rendercheck. From 0.5.0 it is@rendercheck/sdk; the API is unchanged. See the CHANGELOG for migration steps.
- Local only. OCR runs in-process (Tesseract.js, WebAssembly). No API key, no upload, no network calls. The English language data ships in the package.
- Catches what DOM tests cannot: a
€where a$should be, text covered by another element, low-contrast text, text the DOM has but the screen does not show. - Plays well with CI. No native modules (pure-JS PNG/JPEG decoding), no browser-side code.
Install
Requires Node 18+, and @playwright/test (≥ 1.40) or cypress (≥ 12).
Playwright
Like Playwright's own assertions, toShowText retries until it passes or timeout (default 5000 ms) runs out.
Already using expect.extend? Import toShowText from the same path and add it yourself.
Prices and dates in the right locale
The expected text comes from Intl, so each locale's separators, symbol position and date order are
applied for you. When the screen shows something else, the failure says what it is:
The screen shows USD ($14.00), not GBP (£14.00). or
The date is formatted for en-US (03/04/2026), but en-GB should show 04/03/2026.
Dates use UTC unless you pass dateTimeZone, so they are the same on every CI machine.
Cypress has the same checks: cy.matchCurrency(1234.5, { currency: 'EUR', locale: 'de-DE' }) and
cy.matchDate('2026-03-04', { locale: 'en-GB' }). In other tools, expectedCurrency and expectedDate
(from the package root) give you the text to pass to toShowText.
Right-to-left and other scripts. Direction marks and non-breaking spaces are ignored in every
comparison, so Intl output and DOM text match what OCR reads. Only English OCR data ships with the package.
For Arabic, Hebrew, Japanese and the like, download the .traineddata file and set langPath; the language
is then picked from the locale (ar-EG uses ara), or set lang yourself. Arabic locales use Arabic-Indic
digits, so a page that shows 14.00 where ١٤٫٠٠ belongs fails, which is usually what you want.
Cypress
Tested in a real Cypress (13.17, Electron, Linux):
examples/cypressruns 5 specs against the mock checkout page, including the failing cases. Other Cypress versions and browsers are untested. Run it withnpm run build && npx cypress@13 run --project examples/cypress(add--browser electron).
Command line and AI agents
Check a screenshot from a terminal, a script or an AI coding agent. Same local, offline OCR.
Exit code 0 means pass, 1 the assertion failed, 2 an error. --json prints { pass, failure, read, confidence, box, message }.
MCP server
rendercheck mcp is a Model Context Protocol server over stdio with two tools:
verify_text (is this text really visible, legible and readable?) and read_text (what does a user see?).
Claude Code: claude mcp add rendercheck -- npx -y @rendercheck/sdk mcp.
Set up every agent in a repo in one step:
It adds a short instruction ("after changing UI, verify the pixels with verify_text") and the MCP server entry. Re-running
is safe: only the marked RenderCheck block is updated.
Runs are counted in ~/.rendercheck/usage.jsonl on your machine only, so rendercheck stats can show them to you.
Screenshot text is never recorded and nothing is sent anywhere. Set RENDERCHECK_NO_USAGE_LOG=1 to turn it off.
Core
recognize(image, { region }) gives the raw OCR result (words, lines, boxes in image pixels), and
analyzeWordContrast the WCAG contrast math, if you want to build your own assertions.
Options
Pull request annotations (GitHub Actions)
When an assertion fails, RenderCheck can leave a record for CI: a JSON file and a copy of the screenshot with
the failing text outlined in red. The GitHub Action in action/ turns those into pull request
annotations on the failing test line ("Expected Total: $14.00, OCR read Total: €14.00, failing region
x=140, y=244, 219×24 px"), a job summary table, and a downloadable report with the outlined screenshots.
Records are off outside GitHub Actions unless you set RENDERCHECK_REPORT_DIR (set it to an empty string to
switch them off there). A failure is recorded once, after the last retry, and a retry that passes removes it.
GitHub annotations attach to source lines, not screen coordinates, so the region is written in the message and
drawn on the screenshot. Everything stays in your workflow: no service, no token, no network call.
What it can and cannot do
- OCR is not perfect. It can misread
l/I/1andO/0, and it can skip text. Light text on a coloured background is often missed on a busy page: scope the assertion to the element (page.locator('#pay')) or aregion. Very faint text, which is exactly what a contrast check looks for, may not be read at all. Then the assertion still fails, reported as "in the DOM but not visible in the rendered pixels". - Contrast is measured on pixels (text colour vs the colour around it, by k-means), not from CSS. Gradients, images behind text and anti-aliasing make it an estimate.
- It verifies visible text. It does not check layout, spacing or colour beyond contrast; use it with visual-regression tooling, not instead of it.
- English only out of the box.
Network
No code in this package makes a network request. Tesseract's own cache is switched off, so nothing is
written to your project either. (Failure records are the one exception, and only when you turn them on: see above.) To check it yourself on Linux: npm run test:offline runs the tests in a
network-less namespace (unshare -rn).
Example
examples/playwright/ is a Playwright suite against a mock checkout page (a local HTML file), including
the failing cases: wrong currency, low contrast, text covered by another element.
examples/github-actions.yml shows it in CI.
License
MIT
Links
- Documentation: https://getrendercheck.com/developers
- How it stays local (architecture and threat model): https://getrendercheck.com/security
- Issues and feature requests: https://github.com/ParthibanRajasekaran/text-from-image/issues
- Security reports: see SECURITY.md
來源:packages/rendercheck/README.md,提交 0ff6815
工具
0版本歷史
1- v0.6.0最新Oct 11, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。