Imported from bare git on Zurich
Go to file
James 32b97d4f27 chore: uncommitted changes auto-commit 2026-02-07 16:31:38 -05:00
.gitignore Initial commit 2026-02-01 08:04:10 +00:00
README.md Initial commit 2026-02-01 08:04:10 +00:00
com.inou.screenshot-server.plist Initial commit 2026-02-01 08:04:10 +00:00
main.go chore: uncommitted changes auto-commit 2026-02-07 16:31:38 -05:00

README.md

Screenshot Server

Tiny HTTP server that serves the latest screenshot from ~/Desktop, then deletes it.

Build (on Mac)

cd /path/to/screenshot-server
go build -o screenshot-server

Install as service

# Copy binary
sudo cp screenshot-server /usr/local/bin/

# Install launchd service
cp com.inou.screenshot-server.plist ~/Library/LaunchAgents/

# Start it
launchctl load ~/Library/LaunchAgents/com.inou.screenshot-server.plist

# Check status
launchctl list | grep screenshot

Usage

Take a screenshot (Cmd+Shift+4), then:

curl http://192.168.1.14:9123/screenshot -o screenshot.png

Endpoints

  • GET /screenshot - Returns latest screenshot PNG, then deletes it
  • GET /health - Returns "ok"

Uninstall

launchctl unload ~/Library/LaunchAgents/com.inou.screenshot-server.plist
rm ~/Library/LaunchAgents/com.inou.screenshot-server.plist
sudo rm /usr/local/bin/screenshot-server

Logs

tail -f /tmp/screenshot-server.log