Skip to content

fulldotdev/appsnap

Repository files navigation

Appsnap

Snap any app into your cursor.

Appsnap is a native local macOS helper launched by a thin Raycast extension.

  • If the current window has a verified text cursor, Appsnap captures the normal window directly behind it and pastes the image at the current cursor.
  • Otherwise, Appsnap captures the current window, activates only the directly-behind window, and pastes only when that exact window and a text cursor are verified.
  • If verification fails, Appsnap restores the original window and leaves the screenshot on the clipboard.
  • It never searches a second or third background candidate.

There is no window picker, app-name configuration, Apple Developer account, Developer ID signing, notarization, installer package, or synthetic app-specific behavior.

How it is installed

The repository contains:

  • a native Swift helper at Sources/Appsnap/Appsnap.swift;
  • a standard Raycast no-view command that launches ~/.local/bin/appsnap;
  • scripts/install-helper.sh, which builds the helper locally and copies it there.

Install or update the helper:

./scripts/install-helper.sh

The binary is built on this Mac with Swift Package Manager. Because it is built locally and never distributed as a downloaded executable, no Apple account, certificate, Developer ID signing, or notarization is required. Swift may add a local ad-hoc linker signature; that does not use or contact an Apple account.

Raycast shortcut

Run pnpm dev, find Appsnap in Raycast, and assign it a direct global hotkey. The Raycast command is intentionally thin: it only launches the native helper and shows its result.

Permissions

Grant Raycast:

  • Accessibility, for exact focus/window verification and Command-V;
  • Screen & System Audio Recording, for window capture.

No System Events Automation permission is needed by the native helper.

Development

pnpm install
./scripts/install-helper.sh
pnpm dev

Verification

swift build -c release
~/.local/bin/appsnap --dry-run --verbose
pnpm lint
pnpm build

CLI options

--dry-run
--copy-only
--activation-delay SECONDS
--paste-delay SECONDS
--verbose

The helper uses CoreGraphics for front-to-back window order and direct window capture, and the native Accessibility API for cursor inspection and exact-window raising. Paste is dispatched only after the destination window and text cursor have both been verified.

About

Capture the window behind the current app and paste it at your cursor via Raycast.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors