Repository avatar
Multimedia
v1.0.2
active

catscan

io.github.gatalifeltd/catscan

On-device screenshot and video text checks for coding agents on macOS (Apple Vision).

Documentation

catscan

catscan checks the text on your app and game screenshots, on your Mac, and tells you what is wrong in a verdict, not a wall of OCR. It finds the localization and UI text bugs testers otherwise find by eye, in 61 locales (about 55 languages; full list).

catscan in a terminal checks a phone cart screen that shows a raw key, a cut-off button label, text drawn over an icon and a French line on an English screen

Works with

  • Playwright: the @catscan/playwright matchers assert screen text inside your web tests.
  • Maestro: check every screen of a flow after the run (recipe, example project); catscan boxes maestro turns a maestro hierarchy dump into element boxes.
  • XCUITest, UIAutomator and Espresso: catscan boxes xcuitest and catscan boxes uiautomator turn the element dump your test saves into boxes for the truncation and overlap checks (capture guide).
  • Any other tool: catscan checks PNG, JPEG and HEIC screenshots, and MP4 and MOV recordings, however they were made.
  • CI: ready files for GitHub Actions, GitLab, CircleCI, Bitrise, Codemagic and Azure Pipelines in examples/ci/; Jenkins, Buildkite and any CI that reads JUnit XML through --junit. The job runs on an Apple silicon Mac (CI recipes).
  • Coding agents: Claude Code, Codex, Cursor and any agent that reads AGENTS.md (Agent skills).

How it works

Your tests already take screenshots. catscan reads them with Apple's Vision framework on the Neural Engine, in about 25 ms an image, and checks what it read against what should be there: the strings in your catalogs, the locale of the run, the element boxes your test dumped, the phone the screen was taken on. Each check returns PASS or FAIL, an exit code for CI and --json for agents. Screenshots never leave the machine.

catscan says in every result which reader read the screen: Vision first, Tesseract for the languages Vision cannot read, and the agent's own model when catscan cannot decide.

What it catches

The problemThe check
A string is missing, or a string that must never show is on screencatscan check --present / --absent, keys from your catalogs (JSON, .strings, .xcstrings, strings.xml, TypeScript or JavaScript) with @key (catalogs)
Untranslated strings, raw keys, unfilled {placeholders}, a line in the wrong languagecatscan untranslated
Text cut off with an ellipsis, by its view or by the screen edge, short of its catalog string, or drawn past its elementcatscan truncated
Text over text, text over an icon or control, sheets drawn over each othercatscan overlap
Wrong number, date and price formats, a price in a currency the store does not chargecatscan formats
Experimental: text under the camera cutout, rounded corners or home indicator, or a one-line label that wrapscatscan fit with the phone's --device-profile (fit --list-devices)
Low contrast, text over a busy image (experimental)catscan contrast
Hardcoded strings and labels too short for translation, before anything is translatedcatscan pseudo and --pseudo
Screens that break at large system text--text-size
A locale, screen or device missing from the run--expect-locales, --expect-screens, --expect-devices and the HTML report
Text that flashes by in a recordingcatscan video
Re-reviewing every screen of every build--baseline: review only what changed
Old findings failing every run--known: fail only on new ones
Minor or uncertain findings failing the build--min-severity, --min-certainty: every finding carries a severity and a certainty; gate only on what you choose
Failures that should show in the pull request or the CI test tab--format github, --junit, --gitlab-codequality
Element boxes from your UI tests, results from sharded runs, one page to review a runcatscan boxes, catscan results merge, catscan report; the languages this Mac reads: catscan languages; every command: CLI reference

Agent skills

The catscan plugin gives coding agents four skills. Install: Claude Code claude plugin marketplace add gatalifeltd/catscan, then claude plugin install catscan@catscan; Codex codex plugin marketplace add gatalifeltd/catscan, then codex plugin add catscan@catscan. Cursor and other agents: docs/start-here.md.

SkillWhat it does for youTry it
screen-checkThe agent asks catscan about a screenshot or recording instead of opening the image. RecipeDoes screenshots/login.png show "Sign in"? Ask catscan, do not open the image.
catscan-adoptFinds where your tests should check screen text, proposes the diffs, applies the batches you approve and proves each check with a mutation. RecipeWire catscan checks into this project's tests. Start with a dry run.
test-speedupMakes the suite and its CI faster without weakening what it proves. Needs no Mac: macOS or Linux, and ChatGPT in report-only mode. RecipeSpeed up this test suite without weakening what it proves.
catscan-upgradeMoves every place your project holds catscan to one version and shows the behavior changes and finding changes before you keep it. RecipeRun the catscan-upgrade skill.

Installation

Apple silicon Mac, macOS 15 or later, Node 22 or later.

npm install --save-dev @catscan/cli
npx catscan doctor

First run

Take a screenshot with Cmd+Shift+4, then:

npx catscan read ~/Desktop/Screenshot*.png
npx catscan check ~/Desktop/Screenshot*.png --present "<a word you saw>"

PASS and exit 0 mean catscan read it. Then point it at a folder of per-locale screenshots:

npx catscan untranslated shots/de --locale de --base locales/en.json --catalog locales/de.json
npx catscan truncated shots/de --locale de --boxes shots/de --report catscan-report.html

The report is one offline page: a locale x screen matrix where a missing screenshot shows as missing, and the failing screenshots with their boxes drawn (docs/report.md). Next: the recipe for your stack in docs/start-here.md.

catscan HTML report: a 5-screen by 5-locale coverage matrix with severity badges and one missing cell, filters, failed screenshots with boxes

Entry points

The CLI is the one place checks run. The other three are adapters: each calls the same checks and returns the same verdicts, shaped for where you already work.

Entry pointUse it when
CLI @catscan/cliyou run checks on screenshot folders, in CI or by hand (docs/cli.md, CI recipes, Maestro)
Playwright matchers @catscan/playwrightyour web tests should assert screen text inline: toShowText, toHaveNoTruncation, toHaveNoOverlap, toHaveNoUntranslated, canvas and WebGL text included (recipe)
MCP server @catscan/mcpa coding agent should get a verdict of a few dozen tokens instead of opening the screenshot (recipe)
Agent skills, the catscan pluginan agent should do the work around the checks: Agent skills

When catscan cannot decide

catscan uses readers as a ladder and says in every result which one read the screen:

  1. Vision on the Neural Engine. The default: local, fast, free.
  2. Tesseract for the 22 languages Vision cannot read or drops letters in (Greek, Hebrew, Croatian and more), when you install it. Weaker and slower; without it these checks are needs-reader (exit 3) with the install command. docs/recipes/tesseract.md.
  3. The agent's own model. On needs-reader, unsupported, an error, or a failed check with no useful closest line, the instruction files tell the agent to open the image itself.

Benchmarks

catscan has measured 61 locales, about 55 languages when script and regional variants count once (no/nb/nn, sr/sr-Latn, zh-Hans/zh-Hant, yue-Hans/yue-Hant, ar/ars): 38 read by Vision and 23 by the Tesseract fallback. Every per-locale accuracy number is measured on synthetic images drawn by Core Text, not on device screenshots; real-screenshot numbers are the study rows. Seven locales measure under the 98% gate and are listed under the table with their numbers. A Vision locale at 96% or more stays on Vision (cs at 96.67% does, as a partial locale); only a locale below 96% would move to Tesseract, and the public gate stays 98%. Every check's own numbers: docs/BENCHMARKS.md.

Generated by npm run bench:table; do not edit by hand. reproducible rows come from the public synthetic benchmark in bench/results/27.2/ and bench/results/27.2.1/ (the later folder's record per locale), which anyone can rerun on an Apple-silicon Mac; per-language numbers are in docs/BENCHMARKS.md. study rows are quoted from the dated feasibility study over private screenshots, which cannot be published or rerun.

MetricEngineValueSourceMeasured on
Check accuracy, median / lowestVision (38 locales)99.58% / 96.67% (cs)reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
Fit recall, lowestVision (38 locales)0.867 (cs)reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
CER, medianVision (38 locales)0.002reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
Truncation precision / recall, pooledVision (38 locales)0.989 / 0.871reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
Median ms per imageVision (38 locales)25 (under load)reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
Check accuracy, median / lowestTesseract fallback (23 locales)99.27% / 84.31% (fa)reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
Fit recall, lowestTesseract fallback (23 locales)0.372 (fa)reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
CER, medianTesseract fallback (23 locales)0.005reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
Truncation precision / recall, pooledTesseract fallback (23 locales)1.000 / 0.810reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
Median ms per imageTesseract fallback (23 locales)105 (under load)reproducibleApple M5, macOS 27.2 (26B123), 2026-11-09; Apple M5, macOS 27.2.1 (26B131), 2026-11-11
Overlap with element boxes (--boxes), precision / recall, overlaps of 4 px and more: text over text; text over an icon or imageVision (12 languages)0.908 / 0.622; 0.913 / 0.778reproducibleApple M5, macOS 27.2.1 (26B131), 2026-11-16
Overlap without boxes (OCR only), precision / recall, overlaps of 4 px and more (experimental: under the gate)Vision (12 languages)1.000 / 0.025reproducibleApple M5, macOS 27.2.1 (26B131), 2026-11-11
Line recall on real screenshots, pooledVision / Tesseract (474 screenshots, 8 locales)98.50 / 74.23%studyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-29
Check accuracy on real screenshotsVision, Tesseract for Greek (189 checks)99.47%studyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-30
Median ms per full-resolution phone screenshot, idleVision / Tesseract58 / 230 msstudyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-29
Energy per screenshot above idleVision / Tesseractabout 0.3 / 1.1 JstudyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-30
Check accuracy, LLM APIs6 Claude and GPT models98.41-100%studyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-30
Median ms per check, LLM APIs6 Claude and GPT models1300-3220 msstudyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-30
USD per 1000 checks, LLM APIs (list prices of 2026-10-30)6 Claude and GPT models0.19-8.45studyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-30
Median ms per check, coding agentsCodex, Cursor (3 models)8620-15490 msstudyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-30
Agent tokens, one check verdict vs the screenshotcatscan36x fewerstudyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-29
e2e suite slowdown with OCR running beside itVisionunder 1%studyApple M5, macOS 27.2 (26B123), feasibility study, 2026-10-29

Coverage (generated): 61 locales recorded, every number measured on synthetic images drawn by Core Text, not on device screenshots. Vision (38): ar, ars, ca, cs, da, de, en, es, eu, fi, fil, fr, gl, hi, id, it, ja, ko, lb, mr, ms, nb, nl, nn, no, pl, pt-BR, ro, ru, sv, th, tr, uk, vi, yue-Hans, yue-Hant, zh-Hans, zh-Hant. Tesseract fallback (23): be, bg, bs, cy, el, et, fa, ga, he, hr, hu, hy, is, ka, lt, lv, mk, mt, sk, sl, sq, sr, sr-Latn.

Under the 98% gate: fa 84.31% (Tesseract, partial), hy 96.56% (Tesseract, partial), cs 96.67% (Vision, partial), sq 97.15% (Tesseract, partial), mt 97.50% (Tesseract, partial), ars 97.67% (Vision, partial), mr 97.85% (Vision, partial). Every other locale measures at or above 98% check accuracy.

Recorded twice, the later record counts: ar, da, nl, no, nb, sv, fi (27.2.1 over 27.2).

  • Rerun (full, about 1.5 h on an M5): npm run bench -- --record, then npm run bench:table. Timing depends on the chip and load; the summary prints your numbers next to the reference run.
  • Rerun (quick, a few minutes, compared with the recorded quick run): npm run bench -- --quick.
  • Check that this table matches the committed results (Node only): npm run bench:check.

Updating

Move every @catscan/ package, CI pin, MCP config and skill together: catscan-upgrade does it and shows which findings change (docs/recipes/upgrade.md). catscan doctor tells you when a newer version is out.

Commercial services

Need help fitting catscan into your QA or localization pipeline, or a check it does not have yet? Write to sales@gatalife.com.

License

Apache-2.0: LICENSE and NOTICE. Release notes: CHANGELOG.md. Bugs and requests: GitHub issues; how to contribute, report a vulnerability and use the name: CONTRIBUTING.md, SECURITY.md and TRADEMARKS.md.

NPM
@catscan/mcp
Install Command
npm install @catscan/mcp
Runtime: npx