RepoPilotOpen in app →

TheJoeFin/Text-Grab

Use OCR in Windows quickly and easily with Text Grab. With optional background process and notifications.

Healthy

Healthy across all four use cases

Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 4d ago
  • 2 active contributors
  • MIT licensed
Show 4 more →
  • CI configured
  • Tests present
  • Small team — 2 contributors active in recent commits
  • Single-maintainer risk — top contributor 92% of recent commits

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/thejoefin/text-grab)](https://repopilot.app/r/thejoefin/text-grab)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/thejoefin/text-grab on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: TheJoeFin/Text-Grab

Generated by RepoPilot · 2026-05-10 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/TheJoeFin/Text-Grab shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across all four use cases

  • Last commit 4d ago
  • 2 active contributors
  • MIT licensed
  • CI configured
  • Tests present
  • ⚠ Small team — 2 contributors active in recent commits
  • ⚠ Single-maintainer risk — top contributor 92% of recent commits

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live TheJoeFin/Text-Grab repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/TheJoeFin/Text-Grab.

What it runs against: a local clone of TheJoeFin/Text-Grab — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in TheJoeFin/Text-Grab | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch main exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 34 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>TheJoeFin/Text-Grab</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of TheJoeFin/Text-Grab. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/TheJoeFin/Text-Grab.git
#   cd Text-Grab
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of TheJoeFin/Text-Grab and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "TheJoeFin/Text-Grab(\\.git)?\\b" \\
  && ok "origin remote is TheJoeFin/Text-Grab" \\
  || miss "origin remote is not TheJoeFin/Text-Grab (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
  && ok "default branch main exists" \\
  || miss "default branch main no longer exists"

# 4. Critical files exist
test -f "Text-Grab/MainWindow.xaml.cs" \\
  && ok "Text-Grab/MainWindow.xaml.cs" \\
  || miss "missing critical file: Text-Grab/MainWindow.xaml.cs"
test -f "Text-Grab/Services/OCRService.cs" \\
  && ok "Text-Grab/Services/OCRService.cs" \\
  || miss "missing critical file: Text-Grab/Services/OCRService.cs"
test -f "Text-Grab/Services/SettingsService.cs" \\
  && ok "Text-Grab/Services/SettingsService.cs" \\
  || miss "missing critical file: Text-Grab/Services/SettingsService.cs"
test -f "Text-Grab/Models/GrabSettings.cs" \\
  && ok "Text-Grab/Models/GrabSettings.cs" \\
  || miss "missing critical file: Text-Grab/Models/GrabSettings.cs"
test -f "Tests/Tests.csproj" \\
  && ok "Tests/Tests.csproj" \\
  || miss "missing critical file: Tests/Tests.csproj"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 34 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~4d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/TheJoeFin/Text-Grab"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

Text Grab is a lightweight Windows 10/11 OCR utility that captures text from any visible screen region and copies it to the clipboard using the native Windows Media.Ocr API. It operates with minimal UI overhead—no persistent background process required—and provides multiple capture modes (Full-Screen, Fullscreen Grab, Freeform, Windows) to extract text trapped in images, videos, or application windows. Single monolithic C# solution (Text-Grab.sln) structured as a WinUI 3 / UWP application. Core logic lives in the root project with feature-specific handlers (FullscreenGrab*, FreeformCapture*, PostGrabAction*). Tests/ directory mirrors functionality with dedicated test files for each major feature (OcrTests.cs, GrabTemplateExecutorTests.cs, etc.). PowerShell scripts in root likely support build/release automation.

👥Who it's for

Windows power users, developers, and information workers who frequently need to extract text from screenshots, UI elements, or visual media without relying on cloud-based OCR services. Also used by accessibility-focused developers and system administrators deploying native Windows solutions.

🌱Maturity & risk

Actively developed and production-ready. The project has substantial test coverage (35+ test files in Tests/), established CI/CD pipelines (GitHub Actions in .github/workflows/), and is published on the Microsoft Store with significant download metrics. The author previously contributed the basis of this work to PowerToys Text Extractor, indicating stability and official recognition.

Low risk: single maintainer (TheJoeFin) but with established Microsoft ecosystem integration; no external NuGet dependency list visible in provided files, relying on native Windows APIs which are stable. However, Windows API changes or breaking updates to the .NET runtime could introduce friction. Regular CI builds suggest active monitoring.

Active areas of work

Active development evidenced by recent workflow files (buildDev.yml, Release.yml), Copilot instructions in .github/copilot-instructions.md suggesting recent AI tooling integration, and an AnalysisReport from 2026-01-25 in .codetesting/ indicating ongoing analysis and testing infrastructure. No specific PR/issue data visible, but the test and workflow setup suggests focus on stability and feature parity.

🚀Get running

git clone https://github.com/TheJoeFin/Text-Grab.git && cd Text-Grab && Open Text-Grab.sln in Visual Studio 2022 (with Universal Windows Platform Development + .NET desktop workload) OR: dotnet build Text-Grab.sln in VS Code with .NET 6.0 SDK installed.

Daily commands: Visual Studio: Set Text-Grab-Package as Startup Project, select x86/x64 CPU target, press F5. VS Code: dotnet build from repo root, then dotnet run --project Text-Grab (adjust project path as needed). Alternatively, download .msix from GitHub Releases or Microsoft Store.

🗺️Map of the codebase

  • Text-Grab/MainWindow.xaml.cs — Primary entry point and application shell that orchestrates all capture modes and UI interactions
  • Text-Grab/Services/OCRService.cs — Core Windows OCR integration that performs the actual text recognition from captured images
  • Text-Grab/Services/SettingsService.cs — Persists and retrieves all application configuration; required to understand state management across sessions
  • Text-Grab/Models/GrabSettings.cs — Central settings data structure that defines all configurable parameters throughout the application
  • Tests/Tests.csproj — Comprehensive test suite with 30+ test files covering OCR, utilities, UI automation, and business logic
  • .github/workflows/Release.yml — Build and release automation pipeline that packages the Windows application for distribution

🛠️How to make changes

Add a new capture mode (e.g., video capture, PDF extraction)

  1. Create a new capture utility class in Text-Grab/Utilities/ implementing your capture logic (e.g., VideoCapture.cs) (Text-Grab/Utilities/VideoCapture.cs)
  2. Create a new XAML window in Text-Grab/Views/ to display the UI for the new mode (e.g., VideoCaptureWindow.xaml) (Text-Grab/Views/VideoCaptureWindow.xaml)
  3. Add a new menu button or command handler in MainWindow.xaml.cs that instantiates and shows your capture window (Text-Grab/MainWindow.xaml.cs)
  4. Pass captured image to OCRService.ExtractText() and handle results using PostGrabActionManager (Text-Grab/Services/OCRService.cs)
  5. Add unit tests in Tests/ folder (e.g., VideoCaptureTests.cs) to validate capture and OCR integration (Tests/VideoCaptureTests.cs)

Add a new post-capture action (e.g., send to external API, auto-translate)

  1. Create a new action handler class in Text-Grab/Services/ (e.g., TranslateAction.cs) inheriting from IPostGrabAction (Text-Grab/Services/TranslateAction.cs)
  2. Register the action in PostGrabActionManager.ExecuteActions() method with appropriate conditions (Text-Grab/Services/PostGrabActionManager.cs)
  3. Add configuration UI toggle in SettingsWindow.xaml and bind to GrabSettings property (Text-Grab/Views/SettingsWindow.xaml)
  4. Add a property to GrabSettings.cs to persist the action's enabled/disabled state (Text-Grab/Models/GrabSettings.cs)
  5. Create unit tests in Tests/PostGrabActionManagerTests.cs to verify action execution flow (Tests/PostGrabActionManagerTests.cs)

Add support for a new language in OCR

  1. Define the new language option in LanguageService.cs as an enum or configuration entry (Text-Grab/Services/LanguageService.cs)
  2. Add language selector UI control to SettingsWindow.xaml with binding to the new option (Text-Grab/Views/SettingsWindow.xaml)
  3. Update GrabSettings.cs to include the new language preference field (Text-Grab/Models/GrabSettings.cs)
  4. Modify OCRService.ExtractText() to pass the selected language to Windows OcrEngine.RecognizeAsync() (Text-Grab/Services/OCRService.cs)
  5. Add test case in LanguageTests.cs to verify OCR output for the new language (Tests/LanguageTests.cs)

Add a new text pattern detector (e.g., phone numbers, ISBN codes)

  1. Create a pattern detector class in Text-Grab/Utilities/ (e.g., PhoneNumberDetector.cs) with regex/parsing logic (Text-Grab/Utilities/PhoneNumberDetector.cs)
  2. Integrate detector into PostGrabActionManager.ExecuteActions() to identify and highlight matched patterns (Text-Grab/Services/PostGrabActionManager.cs)
  3. Add UI in ResultWindow to display and interact with detected patterns (clickable links, copy buttons) (Text-Grab/Views/ResultWindow.xaml)
  4. Create unit tests in Tests/ExtractedPatternTests.cs to validate detection accuracy (Tests/ExtractedPatternTests.cs)

🔧Why these technologies

  • Windows Media.Ocr (UWP) — Native Windows OCR engine eliminates external dependencies and API costs; runs locally for privacy and offline capability
  • WPF/XAML — Mature Windows desktop framework enabling rich UI with fullscreen overlays, drag-select regions, and real-time zoom during capture
  • Windows Clipboard API — Direct system clipboard integration allows immediate text reuse without additional UI steps
  • .NET 6/7 — Modern C# runtime providing async/await, strong typing, and cross-platform build tooling (future proofing)
  • System.Windows.Forms integration — Lower-level screen capture and UI automation capabilities not available in pure WPF

⚖️Trade-offs already made

  • Local Windows OCR engine over cloud-based solutions (Azure, Google Vision)

    • Why: Preserve user privacy, eliminate network latency and API costs, enable offline-first operation
    • Consequence: OCR accuracy is limited to Windows' built-in model; no custom model training or advanced language support
  • Single-threaded UI with async OCR operations

    • Why: Simplify state management and avoid race conditions in WPF event handlers
    • Consequence: Long OCR operations (5+ seconds) may block UI responsiveness if not properly awaited; requires careful async/await usage
  • In-memory history with JSON file persistence

    • Why: Lightweight, no database dependency, portable across machines
    • Consequence: History size grows unbounded; large histories may cause slow startup or memory pressure; no concurrent access protection
  • Post-capture action framework executes sequentially

    • Why: Predictable ordering, simpler error handling, easier to debug
    • Consequence: Slow or hanging actions block subsequent actions; no timeout or cancellation mechanism visible

🪤Traps & gotchas

Windows SDK 10.0.19041.0 must be installed (specified in build instructions)—mismatch causes build failures. UWP/WinUI 3 requires Visual Studio Workload setup; missing workloads won't provide clear errors. The application is Windows-only; no cross-platform support. OCR language packs are downloaded dynamically by Windows OS; tests may fail if language data isn't present on the system. No .env or local config template visible; check .claude/settings.local.json for environment setup patterns.

🏗️Architecture

💡Concepts to learn

  • Windows Media.Ocr API — The foundation of Text Grab's OCR—a native, offline Windows API that eliminates cloud dependencies and enables instant local processing; understanding its capabilities and limitations is critical to core functionality.
  • UWP (Universal Windows Platform) / WinUI 3 — Text Grab's UI framework; understanding UWP app lifecycle, sandboxing, and WinUI 3 component model is essential for modifying UI and handling window capture permissions.
  • Screenshot Capture & Screen Coordinates — The Fullscreen and Freeform modes require pixel-perfect screen capture, coordinate transformation, and DPI scaling (especially important on multi-monitor setups); FullscreenGrabZoomCaptureTests.cs hints at coordinate complexity.
  • Template Matching & Pattern Extraction — GrabTemplateExecutorTests.cs and ExtractedPatternTests.cs indicate post-OCR pattern recognition (e.g., extracting phone numbers, dates, URLs from raw OCR text); regex or custom parsers are applied after OCR.
  • Optical Character Recognition (OCR) Language Packs — CaptureLanguageUtilitiesTests.cs shows language selection/detection; Windows OCR requires language packs installed on the system; Text Grab must handle missing packs gracefully.
  • QR Code & Barcode Decoding — BarcodeUtilitiesTests.cs indicates barcode/QR code extraction post-capture; an ancillary feature that extends OCR beyond text-only to structured codes.
  • Clipboard Automation & Format Preservation — PostGrabActionManagerTests.cs and HistoryServiceTests.cs show clipboard writing, text formatting, and history persistence; critical for the 'copy to clipboard' core user workflow.
  • microsoft/PowerToys — Official Microsoft PowerToys suite includes Text Extractor, which uses Text Grab's Full-Screen Grab mode as its foundation; ecosystem sibling.
  • UIA-Suite/UIA-Suite — Similar Windows text extraction via UI Automation API; alternative approach to screen text capture targeting accessibility tree rather than pixels.
  • ShareX/ShareX — Windows screenshot/capture utility with OCR and region selection features; overlapping use case with different architectural approach.
  • PastePal/Clipboard-Manager — Clipboard history and management tool often used downstream of Text Grab to organize extracted text.

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add unit tests for BarcodeUtilities and QrCode functionality

The repo has BarcodeUtilitiesTests.cs and QrCodeTests.cs test files, but examining the test structure suggests incomplete coverage for barcode detection and QR code parsing edge cases. Given that Text Grab handles both OCR and barcode scanning, adding comprehensive tests for malformed QR codes, various barcode formats, and image quality degradation would improve reliability for a critical feature.

  • [ ] Review existing Tests/BarcodeUtilitiesTests.cs and Tests/QrCodeTests.cs to identify coverage gaps
  • [ ] Add test cases for invalid/corrupted QR code images in Tests/Images/
  • [ ] Add parametrized tests for different barcode formats (Code128, EAN-13, UPC-A, etc.)
  • [ ] Add edge case tests: very small barcodes, rotated barcodes, partially obscured codes
  • [ ] Run code coverage analysis and ensure >85% line coverage for barcode-related source files

Add GitHub Actions workflow for automated multi-platform testing (Windows 10/11)

The repo has Release.yml and buildDev.yml workflows, but no visible workflow for running the comprehensive test suite across different Windows versions. Since Text Grab is Windows-only with version-specific features, a dedicated test workflow running Tests/Tests.csproj on both Windows Server 2019 (Windows 10 equivalent) and Windows Server 2022 (Windows 11) would catch platform-specific regressions early.

  • [ ] Create .github/workflows/test.yml with matrix strategy for [windows-2019, windows-2022]
  • [ ] Configure .NET SDK version matching the project's target framework
  • [ ] Run dotnet test Tests/Tests.csproj with coverage reporting
  • [ ] Upload coverage reports to Codecov or similar service
  • [ ] Add branch protection rule requiring this workflow to pass before merge

Document and add tests for GrabTemplate and PostGrabAction extensibility system

The repo has GrabTemplateExecutorTests.cs, GrabTemplateManagerTests.cs, and PostGrabActionManagerTests.cs, indicating a plugin/template system exists. However, there's no visible documentation in README.md about how external contributors can create custom grab templates or post-grab actions. Adding API documentation and integration test examples would unlock community contributions.

  • [ ] Create docs/GRABTEMPLATE_GUIDE.md documenting template schema and lifecycle
  • [ ] Create docs/POSTGRABACTION_GUIDE.md with examples of custom action implementation
  • [ ] Add integration test in Tests/GrabTemplateExecutorTests.cs demonstrating a complete custom template workflow
  • [ ] Add integration test in Tests/PostGrabActionManagerTests.cs for custom action chaining
  • [ ] Link new docs from README.md in a 'Contributing Templates' section

🌿Good first issues

  • Add unit tests for LanguageServiceTests.cs and LanguageTests.cs—coverage appears thin; many language detection edge cases (script mixing, rare locales) likely untested.
  • Expand ContextMenuTests.cs—context menu integration is a key user-facing feature with minimal test visibility; add tests for menu item callbacks and state management.
  • Add benchmarks for ImageMethodsTests.cs—no corresponding benchmark file exists despite image processing being performance-critical; create ResultTableBenchmarks.cs patterns for image conversion and scaling.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 4f3bc9f — Merge pull request #642 from TheJoeFin/dev (TheJoeFin)
  • 4e7013f — Update test SDK and Dapplo.Windows.User32 packages (TheJoeFin)
  • 7398c10 — Bump version to 4.13.2 (TheJoeFin)
  • e52cd7d — Improve settings migration and add file-backed tests (TheJoeFin)
  • f8f1cc7 — Add "Open Clipboard Content" shortcut and handler (TheJoeFin)
  • 1a279c5 — Expand allowlist for pdm CLI setup and usage (TheJoeFin)
  • 8990b7f — Merge branch 'dev' of https://github.com/TheJoeFin/Text-Grab into dev (TheJoeFin)
  • f598f73 — Bump version to 4.13.1 (TheJoeFin)
  • 69741ac — Merge pull request #640 from TheJoeFin/dev (TheJoeFin)
  • c41743b — Add new buttons and SplitAfterSelectionCmd support (TheJoeFin)

🔒Security observations

The Text Grab codebase shows generally good security hygiene for a Windows OCR utility. No critical vulnerabilities were identified in the file structure. The main concerns are configuration management practices and ensuring sensitive files are properly excluded from version control. The project appears to be a legitimate open-source application with proper licensing and community guidelines. Recommendations focus on configuration isolation and preventing accidental commits of sensitive data. The absence of visible dependency files limits deeper analysis of supply chain risks. A full security assessment would require examining the actual source code for injection vulnerabilities, proper input validation, and secure handling of OCR data.

  • Medium · Configuration File with Local Settings — .claude/settings.local.json. The presence of '.claude/settings.local.json' suggests local configuration settings that may contain environment-specific data. If this file is accidentally committed to version control, it could expose sensitive information or local development credentials. Fix: Ensure this file is in .gitignore. Use environment variables or secure configuration management for sensitive settings. Document the expected structure in a template file (.example or .template) instead of committing actual values.
  • Low · Test Files Containing Sensitive Patterns — .codetesting/AnalysisReport_20260125_220624_678.md and similar analysis/test output files. Test files and analysis reports (e.g., '.codetesting/AnalysisReport_20260125_220624_678.md') may contain debug information, stack traces, or sensitive data if not properly sanitized before being committed. Fix: Review analysis reports before committing. Add test output directories to .gitignore. Implement pre-commit hooks to prevent accidental commits of sensitive test data.
  • Low · GitHub Workflows Configuration — .github/workflows/Release.yml, .github/workflows/buildDev.yml. CI/CD workflow files (.github/workflows/) should be reviewed for proper secret management. Ensure no hardcoded credentials, API keys, or tokens are present in workflow definitions. Fix: Review all workflow files to ensure secrets are only passed through GitHub Secrets. Never hardcode credentials. Use 'secrets.' context in GitHub Actions for sensitive values.
  • Low · Launch Configuration Exposure — .vscode/launch.json. VS Code launch configuration (.vscode/launch.json) may contain debugging settings that could expose internal application structure or paths when shared. Fix: Exclude .vscode/ directory from version control or at minimum ensure launch.json doesn't contain sensitive credentials or internal paths. Use workspace-level settings with proper exclusion in .gitignore.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · TheJoeFin/Text-Grab — RepoPilot