A free, open-source screenshot tool for macOS.
Peg sits in the menu bar and does the everyday screenshot work: frame a region or a window, mark it up, keep it floating, stitch a long page, record a short GIF. Recent shots hang on a line under the menu bar — a clothesline, borrowed from the idea in Tendedero.
Built with AppKit only. Free to use and modify, no account, no analytics, no background network traffic. Screen Recording is the only permission it asks for. The one thing that goes online is 检查更新 in the menu, and only when you ask.
| Frozen-screen snip | Every display is captured first, so the selection overlay never appears in the output and the magnifier works on real pixels. |
| Window snapping | Hover a window and it is outlined; click to take the whole window, drag to pick your own rectangle. |
| Inline annotation | 8 tools (rectangle, ellipse, arrow, pen, marker, text, mosaic, blur) drawn straight onto the frozen screen. What you draw is what you get. |
| Scroll capture | Manually scroll a region; frames are aligned by row fingerprints and stitched, both downwards and upwards, with a live preview of the finished picture beside the frame. |
| GIF recording | Frame a region, record up to 20 s at 12 fps, stop with the same shortcut. The same blue frame as the snip marks exactly what is being recorded. |
| Clothesline | Recent shots hang from a slowly rippling rope with a timestamp under each sheet; hover for a preview, click to copy, ⌘-click to pick several and drag them out together, drag anywhere (⌥-drag to pin it where you drop), double-click to open. The clothesline idea comes from Tendedero. |
| Pins | Any shot floats above other windows, movable and zoomable, with a shadow and outline so it never melts into the wallpaper. Clipboard text pins too, as a dark code card with a line-number gutter and light syntax colouring; drag it as one piece, hold ⌥ to select inside. |
| History | ⌃⌥H browses everything on disk with search, annotate, pin and trash. |
| Settings | Save folder, PNG/JPEG + quality, auto-copy, history retention, rounded corners, dock icon, and editable shortcuts. |
Everything in these screenshots is fabricated — a demo desktop, demo documents, demo file names — so the shots show the app and nothing else.
Frame a region or a window. Numbers pick a tool, ⏎ commits, P pins, L
starts a scroll capture; the magnifier reads real pixels.
The clothesline. Recent shots hang under the menu bar with the time they were taken; hover for a preview, click to copy, ⌘-click a few and drag them out as one bundle, or drag anywhere.
Paste anything. Copied text becomes a code card with line numbers and light syntax colouring; copied images become pins that float above other windows.
| Key | Action |
|---|---|
⌃⌥X |
Snip and save — release the mouse and it is already copied and written to disk |
⌃⌥A |
Snip and annotate — the tool bar appears under the selection |
⌃⌥G |
Record a GIF — frame a region, press again to stop |
⌃⌥L |
Long capture — frame a region and scroll; the frames are stitched |
⌃⌥V |
Pin: press once for the most recent copy, again to walk back through recent copies and then the shots on disk (images as pictures, text as code cards); stops repeating the same picture |
⌃⌥H |
Screenshot history |
, . |
Inside a snip: walk back / forward through recent captures — the frame, the selection and the marks come back, ready to edit |
⌃⌥S |
Show / hide the clothesline |
Hold ⇧ with a snip to keep Peg's own windows in the frame — the clothesline, a
pin, the settings window — which is how you photograph Peg itself. Or tick
「截图包含 Peg 自己的窗口」 in the menu to keep it on.
An existing frame is moved by dragging inside it and resized by its four corner handles; a plain click leaves it alone. Drag outside to start a new one.
While sniffing a region: R O A P H T M B pick a tool (rect,
ellipse, arrow, pen, highlighter, text, mosaic, blur), ⌘Z undoes, ⏎ commits,
P pins the selection, L starts a scroll capture, Esc leaves the tool and
then the snip. With a tool up, the wheel sizes it ([ and ] do the same), a
placed caption can be dragged and double-clicked to change its words, and ⏎ in a
caption finishes the snip while ⇧⏎ or ⌥⏎ starts a new line. The wheel sizes
the selected mark, or the caption being typed; with nothing selected it sets the
size for the next one.
Grab Peg-0.6.1.zip from Releases, unzip it, and
double-click install.command. It copies Peg into /Applications, clears the
quarantine flag and opens it.
After that, 检查更新… in the menu looks for a newer release and installs it in place, so this download is only needed for the first install.
macOS refuses to launch apps that are not notarised and calls them "damaged" —
the file is fine, Gatekeeper just will not run it. If you prefer to do it by
hand, drag Peg.app into /Applications and run:
xattr -dr com.apple.quarantine /Applications/Peg.appPeg is not notarized. Build it yourself:
git clone https://github.com/ursasi/peg.git
cd peg
bash scripts/build-app.sh
cp -R build/Peg.app /Applications/
open -a /Applications/Peg.appThe first snip asks for Screen Recording. Grant it, then relaunch Peg — macOS only hands the screen to an app after a restart. The build script signs with the first code-signing identity it finds so the permission survives rebuilds.
Requires macOS 14 or newer and a Swift toolchain (Xcode or the Command Line Tools).
Sources/Peg
├── App entry point, status item, hot keys, permissions, debug logging
├── Capture screen capture, snip session, selection overlay, window lookup
├── Annotate annotation model, renderer, canvas, editor
├── Scroll frame receiver, matcher, stitcher, self tests
├── Record GIF recorder and HUD/border
├── Shelf clothesline panel, cards, hover preview
├── Pin floating pin windows
├── History history window and retention
├── Settings preferences window and stored defaults
└── Support displays, clipboard/storage, rounded corners
Tools
├── Design the app mark, shared by both generators
├── MakeIcon renders AppIcon.icns at build time
└── MakeBanner renders docs/banner.png
swift build # compile
bash scripts/build-app.sh # build, generate the icon, sign Peg.app
PEG_SELFTEST=1 .build/debug/Peg # scroll-capture matcher/stitcher tests
PEG_DEMO=shelf|snip|overlay|settings|annotate # open one UI without a capturePEG_DEBUG=1 adds a test channel: write a command to /tmp/peg-cmd
(snip, record, hover:N, click:x,y, …) and read /tmp/peg-debug.log.
It exists so automation never has to synthesise system-wide key events.
- One display per selection; nothing spans screens.
- Scroll capture needs manual scrolling and refuses frames it cannot align confidently rather than guessing.
- Annotations cannot be moved after they are drawn.
- Copying a GIF puts a still frame on the clipboard; drag the file for the animation.
- macOS 14+ only, and no notarization.
MIT — see LICENSE.



