https://github.com/ospoon/trayocr
TrayOCR is a lightweight and blazing-fast desktop utility that lives in your macOS menu bar. Press a custom hotkey to select a screen area, extract text instantly, and automatically copy it to your clipboard.
https://github.com/ospoon/trayocr
Last synced: 6 days ago
JSON representation
TrayOCR is a lightweight and blazing-fast desktop utility that lives in your macOS menu bar. Press a custom hotkey to select a screen area, extract text instantly, and automatically copy it to your clipboard.
- Host: GitHub
- URL: https://github.com/ospoon/trayocr
- Owner: OSpoon
- License: mit
- Created: 2026-05-29T09:03:49.000Z (10 days ago)
- Default Branch: main
- Last Pushed: 2026-05-30T15:39:11.000Z (9 days ago)
- Last Synced: 2026-05-30T17:23:49.366Z (9 days ago)
- Language: Vue
- Homepage:
- Size: 6.78 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TrayOCR
> A minimalist, menu-bar-based screenshot OCR utility for macOS and Windows. Powered by Tauri 2, Vue 3, and native system OCR.
TrayOCR is a lightweight and blazing-fast desktop utility that lives in your system tray or macOS menu bar. Press a custom hotkey to select a screen area, extract text instantly, and automatically copy it to your clipboard.
---
## đ Key Features
- **Menu-Bar / Tray POP UI**: Designed to stay out of your way. Clicking the tray icon opens a sleek popover window; the app runs in agent mode without taking space in your Dock.
- **Native System OCR**: Uses Apple's Vision framework on macOS and Windows.Media.Ocr on Windows.
- **Flexible Global Shortcuts**: Set your own hotkeys (e.g. `ââĽX` or `âĽA`) in the UI to trigger screen area capture globally.
- **Click-to-Copy History**: Stores up to 200 historical OCR scans locally with timestamp logs. Just click any card to copy the text to your clipboard.
- **Launch at Login & Window Pinning**: Toggle the app to launch automatically when you sign in, and pin the window to stay "Always on Top" when needed.
- **Harmonious Dark & Light Mode**: Automatically matches your system preferences or lets you lock it to Dark/Light mode. Styled with modern typography and sleek glassmorphism themes.
- **Safe OTA Updates**: Fully integrated with Tauri's secure signed auto-updater to notify you and install updates smoothly.
---
## đ Tech Stack
- **Frontend**: [Vue 3](https://vuejs.org/) + [TypeScript](https://www.typescriptlang.org/) + [Vite 6](https://vite.dev/)
- **Styling & UI**: [Tailwind CSS v4](https://tailwindcss.com/) + [shadcn-vue](https://shadcn-vue.com/) (using native `Dialog`, `Button`, `Sonner` toasts, and `Progress` components)
- **Backend (Core)**: [Tauri v2](https://tauri.app/) (Rust-based system bridging)
- **OCR Engine**: macOS native `Vision` framework bindings and Windows native `Windows.Media.Ocr`.
- **Linting & Formatting**: [ESLint](https://eslint.org/) + [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) + [lint-staged](https://github.com/lint-staged/lint-staged)
---
## đ Getting Started
### Installation
1. Go to the [Releases](https://github.com/OSpoon/tray-ocr-app/releases) page.
2. Download the installer for your system:
- **`TrayOCR_x.x.x_aarch64.dmg`** for Apple Silicon Macs (M1, M2, M3, M4, etc.)
- **`TrayOCR_x.x.x_x64.dmg`** for Intel Macs
- **`TrayOCR_x.x.x_x64-setup.exe`** for Windows
3. On macOS, drag the app into your `Applications` folder. On Windows, run the installer and launch TrayOCR from the Start menu.
> [!WARNING]
> **Screen Recording Permission required on macOS**: Since TrayOCR uses the native screen capture tool (`screencapture -i`) to let you draw a box over target screen contents, macOS will request **Screen Recording** permission the first time you initiate a scan. Please go to **System Settings -> Privacy & Security -> Screen & System Audio Recording** and toggle **TrayOCR** to **ON** to ensure screenshots capture successfully.
## đť Local Development
### 1) Prerequisites
Ensure you have Rust, Node.js (v18+), and `pnpm` installed on your macOS machine. Refer to the [Tauri setup guide](https://tauri.app/v2/start/prerequisites/) if needed.
### 2) Install Dependencies
```bash
pnpm install
```
### 3) Run Dev Server
```bash
pnpm tauri dev
```
### 4) Production Build
Compile optimized production bundles:
```bash
pnpm tauri build
```
This runs type-checking (`vue-tsc`), packages assets with Vite, and cross-compiles targets using Cargo.
---
## đ Release & Auto-Update Configuration
TrayOCR comes with a preconfigured GitHub Action release pipeline (`.github/workflows/release.yaml`) that builds signed, production-ready installers for Apple Silicon macOS, Intel macOS, and Windows.
### 1) Generate Updater Keys (Required once)
Tauri requires signing key pairs to authenticate update payloads:
```bash
pnpm tauri signer generate -w ./.tauri/updater.key
```
This creates:
- **Private Key**: `.tauri/updater.key` (â ď¸ **Never commit this to git**)
- **Public Key**: `.tauri/updater.key.pub` (Safe to share)
### 2) Save Public Key
Copy the string contents of `.tauri/updater.key.pub` and write it to the `plugins.updater.pubkey` field in [tauri.conf.json](file:///Users/osp/Documents/GitHub/TrayOCR/src-tauri/tauri.conf.json).
### 3) Set Up GitHub Secrets
In your GitHub repository, go to `Settings -> Secrets and variables -> Actions` and add:
- `TAURI_SIGNING_PRIVATE_KEY` (Paste the contents of `.tauri/updater.key`)
- `TAURI_SIGNING_PRIVATE_KEY_PASSWORD` (If you configured a password when generating the key; otherwise leave empty/create empty)
Under `Settings -> Actions -> General -> Workflow permissions`, set permissions to **Read and write permissions** to allow workflow jobs to create releases.
### 4) Release Version Bump
To release a new version, run:
```bash
pnpm release
```
This triggers `bumpp` to bump version logs across `package.json`, `Cargo.toml`, and `tauri.conf.json`, commits files, creates a version Tag (`vX.Y.Z`), and pushes to GitHub. The workflow will catch the tag, build Apple Silicon (`aarch64-apple-darwin`), Intel macOS (`x86_64-apple-darwin`), and Windows (`x86_64-pc-windows-msvc`) packages, and publish updates automatically.
---
## đ License
Licensed under the [MIT License](LICENSE).