Skip to content

premsathisha/text-shot

Repository files navigation

Text Shot

Text Shot is a lightweight macOS screenshot-to-text utility that lets you capture any screen region and instantly extract text using on-device OCR. It runs entirely on-device for OCR and is built for speed, simplicity, and keyboard-driven workflows. It requires macOS Screen Recording permission to capture selected regions, collects no data, and needs no account.

Screenshot

Text Shot screenshot

Key Features

  • Fully local OCR processing
  • Smart Line Formatting
  • Lightweight (~8 MB)
  • Native macOS experience
  • No login or accounts
  • Optional native app updates in signed release builds
  • Fast capture-to-text workflow

Who It Is For

  • Keyboard-first macOS users
  • Users who extract text from videos, images, or on-screen content
  • Users who prefer local-first utilities

How It Works

Use your keyboard shortcut to start a quick screen selection. Text Shot reads the text inside that selected area, reconstructs the layout with OCR line grouping, and places the result on your clipboard. You can then paste it anywhere immediately, without uploading screenshot content to an external OCR service.

Installation

Download the DMG from the Releases section, open it, and move Text Shot into your Applications folder. Launch the app, grant the required permissions, set your preferred shortcut (default: Cmd + Shift + 2), and start capturing text.

Built from Source

For developers who want to build Text Shot locally.

Prerequisites

  • macOS 13 or later
  • Xcode Command Line Tools (swift, codesign, hdiutil, install_name_tool, otool)
  • Node.js and npm

Steps

  1. Clone the repository.
  2. Install dependencies with npm install.
  3. Build the app with npm run build.
  4. Launch the built app with npm start.
  5. Run tests with npm test.
  6. Create a distributable DMG with bash scripts/release-native.sh --set-version <x.y.z>.
  7. Make sure the Sparkle signing key is available either in the login Keychain or via SPARKLE_PRIVATE_ED_KEY before publishing dist-appcast/, so the appcast can be regenerated without breaking in-app updates.

Release Outputs

  • .generated/app/: hidden local app bundle output for npm run build
  • dist-appcast/: Sparkle appcast.xml and update archive output for publishing
  • release/: latest DMG and .sha256 only
  • TESTING.md: manual regression checklist for capture, permissions, menu bar behavior, multi-display, and OCR samples

Contributing

Keep changes aligned with the native Swift menu bar app and the release rules in AGENTS.md.

  • Create branches with the codex/ prefix unless a different branch name is intentionally required.
  • Keep commits focused and descriptive so release notes and bug history stay readable.
  • Run npm run typecheck and npm test before opening a pull request.
  • If the change affects packaging or user-facing behavior, also run the relevant manual checks in TESTING.md.
  • Every DMG release must bump the version, keep package.json aligned, and leave only the latest DMG and checksum in release/.

GitHub Actions already enforces the baseline native checks on macOS for pull requests and pushes.

Troubleshooting

Screen Recording permission

Text Shot needs macOS Screen Recording permission before capture can begin.

  • Open System Settings > Privacy & Security > Screen Recording.
  • Enable Text Shot, then fully quit and relaunch the app.
  • If capture still fails, remove the permission entry, relaunch Text Shot, and grant permission again when macOS prompts.

Hotkey does not open the capture overlay

If the global shortcut does not present the selection overlay immediately after launch:

  • Confirm the shortcut shown in Settings....
  • If the shortcut was changed recently, reopen Settings... and re-record it.
  • If the issue persists, quit and relaunch the app so macOS refreshes the menu bar app state and hotkey registration.

Settings window does not appear

  • Open Settings... from the menu bar item instead of relying on Cmd+, alone.
  • If nothing appears, quit Text Shot and relaunch it from /Applications or from the freshly built app bundle.
  • Re-test after rebuilding with npm run build if you are working locally from source.

Architecture

Text Shot is a native Swift menu bar app.

  • native/settings-app: Main app runtime (menu bar item, hotkey handling, capture flow, OCR, permissions, settings UI, confirmation toast, and Sparkle update integration)
  • scripts: Build, test, typecheck, clean, and release helper scripts for the SwiftPM native app bundle
  • build: Entitlements and export configuration for packaging/signing
  • assets: App icon and tray assets

Agent-Assisted Development

Text Shot was built while exploring agent-assisted software development, with a GPT-5.3-Codex model. The application logic and implementation were generated through iterative prompting and system-level direction by the author, then tested in real-world usage and reviewed at a system level before release. The author assumes full responsibility for the distributed software.

This project bundles KeyboardShortcuts and integrates Sparkle for native macOS updates, both licensed under the MIT License.

Why I Built This

Text Shot began as a tool to eliminate repeated manual text extraction in my daily workflow while evaluating modern coding agents and frontier development tooling. The project reflects a practical exploration of agent-assisted software development alongside an understanding that strong engineering judgment and validation remain essential.

License

MIT

About

Text Shot is a lightweight macOS screenshot-to-text utility that lets you capture any screen region and instantly extract text using on-device OCR.

Resources

License

Security policy

Stars

Watchers

Forks

Contributors