A screenshot tool you can read before you run it.

Freeze the screen, drag a box, draw on it. Nothing reaches your clipboard or your disk until you say so, and ⌘R hands back the text inside your selection with its indentation intact.

Read main.swift

macOS 13 or later

verify it yourself
$ wc -l main.swift 464 main.swift $ grep -vc '^[[:space:]]*$\|^[[:space:]]*//' main.swift 394 # lines that are actually code $ grep -c 'URLSession\|http' main.swift 0 # there is no network code

Those three commands are the entire pitch. Run them before you run anything else.

The gesture, on this page

macOS captures first and lets you annotate afterwards, in a window that opens somewhere else once you catch the thumbnail before it expires. Shotty puts the drawing step where the selection already is. Try it below, on a real screenshot.

A screenshot of a video page, used here as something to select and mark up

In the app the same toolbar carries Copy, Save and OCR, and the keys are P R A H for the tools, ⌘C to copy the lit region, ⌘R to read its text. Drag outside your selection to start a new one.

what ⌘C would copynothing selected
drag a box above and this fills in

Every line, accounted for

This is the whole program. Not the interesting parts of it, not a summary. All of it, grouped by what each region does. Open any row to read it right here, and check the line range against the file yourself. If it ever reaches four digits, the argument on this page stops being true and you should hold me to that.

OCR that keeps the columns

Vision returns recognised text as a bag of bounding boxes, so the obvious implementation pastes back a flattened blob. Shotty estimates character width from the median box and maps every fragment to a column, so indentation and column gaps survive. That reconstruction is 45 lines, in Overlay.layout(_:); the whole OCR path is 80.

The column mapping above is that function ported to JS, running here on fragments that carry the noise Vision actually returns. It leaves out the paragraph-break pass, which this sample has nothing to exercise. Step through it yourself.

⌘R → your clipboardselectable text

Small selections are upscaled 2× before recognition, and language correction is off by default so it stops "fixing" your identifiers. One flag at the top of the file turns it back on if you mostly capture prose.

Install

There is no signed installer yet. You build it, which takes a few seconds and means you can read what you are running first.

  1. Get the command line tools if you don't have them.xcode-select --install
  2. Clone and build. build.sh is 22 lines: an Info.plist, swiftc, and an ad-hoc codesign so the Screen Recording grant survives rebuilds.git clone https://github.com/uuu4/shotty.git cd shotty && ./build.sh && open Shotty.app
  3. Grant Screen Recording on the first capture: System Settings → Privacy & Security → Screen Recording. Then open it once more. Shotty lives in the menu bar as ✂︎, with no Dock icon. macOS 13 or later.

Or the whole of it in one line, once you have read what it runs:

git clone https://github.com/uuu4/shotty.git && cd shotty && ./build.sh && open Shotty.app

Keys

⌘⇧2capture
dragselect a region; drag outside it to reselect
P R A Hpen · rectangle · arrow · highlighter
⌘Zundo the last stroke
⌘C Returncopy the selection to the clipboard
⌘Ssave it to the Desktop
⌘ROCR the selection to the clipboard
Esccancel