npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@apries/sightline

v0.2.0

Published

Agent-first macOS screenshot CLI with target-based window discovery.

Downloads

593

Readme

Sightline

Agent-first macOS screenshot CLI built with Bun + TypeScript.

The goal is not a manual Snipaste clone. The product is a visual acquisition tool for agents: locate a target, report its geometry, capture it, and return machine-readable evidence.

Install

npm install -g @apries/sightline
sightline --help

Features

  • Locate visible macOS windows by app name, bundle id, pid, title pattern, window id, or index.
  • Capture Chrome or other desktop apps without manual selection.
  • Record screen, display, rectangle, or app/window bounds to .mov.
  • Capture fixed rectangles, full screen, main screen, and specific displays.
  • Return structured JSON containing target, backend, window id, bounds, output path, and image metadata.
  • Provide a Lynx headless backend entrypoint for template.js screenshots through the existing Lynx DevTool smoke script.
  • Provide doctor checks for helper availability, Screen Recording likelihood, Accessibility trust, and screencapture.

Examples

bun run build
bin/sightline list windows --json
bin/sightline locate --target 'app:Google Chrome' --json
bin/sightline capture --target 'app:Google Chrome' --json
bin/sightline capture --target 'bundle:com.google.Chrome,title:*DevTools*' -o /tmp/devtools.png --json
bin/sightline capture --target 'rect:100,100,800,500' -o /tmp/area.png
bin/sightline capture --target 'screen:main' --delay 1
bin/sightline record --target 'app:Google Chrome' --duration 5 -o /tmp/chrome.mov --json
bin/sightline record --target 'rect:100,100,800,500' --duration 3 -o /tmp/area.mov --json
bin/sightline capture --target 'lynx:headless,url:http://127.0.0.1:3000/template.js' --json

Target Syntax

  • app:<name>[,title:<pattern>][,index:<n>]
  • bundle:<bundle-id>[,title:<pattern>][,index:<n>]
  • pid:<pid>[,title:<pattern>][,index:<n>]
  • window:<window-id>
  • rect:<x,y,w,h>
  • screen:all
  • screen:main
  • display:<n>
  • lynx:headless,url:<template-js-url>

Title patterns support * wildcards. Without a wildcard, matching is case-insensitive substring matching.

Architecture

  • TypeScript CLI parses commands, target DSL, output options, and JSON protocol.
  • Swift helper uses CoreGraphics/AppKit to list displays, list windows, and inspect permission signals.
  • /usr/sbin/screencapture remains the capture backend for window, rectangle, full-screen, and display captures because macOS already handles that path well.
  • Lynx headless capture delegates to /Users/bytedance/.agents/skills/lynx-devtool/scripts/headless-smoke.mjs when available.

Permissions

Window listing and window/rect capture require macOS Screen Recording permission for the terminal app running this CLI. doctor --json reports whether permission appears to be available, but macOS does not expose a perfect non-interactive permission probe.