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

shotctx

v0.1.0

Published

Minimal macOS CLI that returns the latest screenshot on your Desktop, for AI dev workflows (Claude Code / Codex).

Readme

shotctx

Minimal macOS CLI that returns the path of the latest screenshot on your Desktop.

Designed for AI coding workflows (Claude Code / Codex): stop manually dragging, saving, or pasting screenshots — just say "look at the latest screenshot" and let the AI call shotctx.

Why

When working with AI coding assistants, you often want them to "see" something on your screen. The current flow is tedious:

  1. Take a screenshot (⌘ + Shift + 4)
  2. Find the file on Desktop
  3. Drag / paste it into the chat

With shotctx, the AI can just run one command and get the absolute path of the most recent screenshot. No manual steps.

Install

pnpm install
pnpm build
pnpm link --global

Verify:

shotctx --version

Usage

Print the absolute path of the latest image on your Desktop:

shotctx
# or explicitly:
shotctx latest

Example output:

/Users/you/Desktop/Screenshot 2026-05-07 at 11.30.21.png

Structured JSON (for AI agents):

shotctx latest --json

Example output:

{
  "path": "/Users/you/Desktop/Screenshot 2026-05-07 at 11.30.21.png",
  "modifiedAt": "2026-05-07T11:30:21.000Z",
  "sizeBytes": 123456,
  "extension": "png"
}

Supported formats

png, jpg, jpeg, heic, webp (case-insensitive).

Exit codes

| Code | Meaning | | ---- | ----------------------------------------- | | 0 | Success | | 1 | No image found, or Desktop not accessible |

Errors go to stderr, results go to stdout.

Claude Code / Codex Usage

Add this to your AGENTS.md or CLAUDE.md:

When the user says "看截图", "看最新截图", "look at screenshot", "check screenshot", or similar:

  1. Run: shotctx latest --json
  2. Use the returned path as the latest screenshot context.
  3. Do not ask the user to manually drag, save, or paste screenshots unless the command fails.
  4. If no image is found, ask the user to take a screenshot first, then run the command again.

Development

pnpm install
pnpm dev        # watch mode
pnpm typecheck
pnpm build
node dist/index.js latest --json