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

askvid

v0.1.7

Published

Ask questions about local, remote, and YouTube videos from the command line.

Readme

askvid

Ask questions about a video from the command line. OpenRouter is the default backend, and the CLI is wired through swappable Effect services.

bun askvid video.mp4 "what do you see at 3:12 in the top left corner?"
bun askvid https://some.com/video.mp4 "how many apples are in this video?"
bun askvid https://youtube.com/watch?v=alsdjhfkajs "summarize this"

The CLI shape is:

askvid [--dry-run] [--debug] <video-source> <question>
askvid mcp

video-source can be a local path, file:// URL, remote video URL, or YouTube URL. With the OpenRouter backend, YouTube URLs are passed through directly. Local files and non-YouTube remote videos are encoded as base64 data URLs, matching the existing pi-read-video backend behavior.

Local use

bun install
export ASKVID_OPENROUTER_API_KEY="sk-or-..."

bun cli video.mp4 "summarize this"
bun askvid --dry-run video.mp4 "summarize this"

ASKVID_OPENROUTER_API_KEY is required for real OpenRouter requests. --dry-run does not call the model backend and does not require an API key.

Useful env vars:

  • ASKVID_OPENROUTER_API_KEY: OpenRouter API key for askvid.
  • ASKVID_DEBUG=1: enable verbose stderr logs.
  • ASKVID_BACKEND=openrouter: select the backend. Use test for deterministic local/e2e runs.
  • ASKVID_MODEL=google/gemini-3.1-pro-preview: override the default model.
  • ASKVID_RESPONSE_CACHE=1: send X-OpenRouter-Cache: true.
  • ASKVID_RESPONSE_CACHE_TTL=86400: set response-cache TTL in seconds.
  • ASKVID_RESPONSE_CACHE_CLEAR=1: refresh the current cache key.

Build

bun run build

The build script invokes Bun's bundler and writes one executable JS file:

dist/askvid.js

Install

After publishing:

npm install -g askvid
askvid https://youtube.com/watch?v=alsdjhfkajs "summarize this"

Tests

bun run test
bun run test:e2e

Live OpenRouter e2e is opt-in:

ASKVID_LIVE_E2E=1 ASKVID_OPENROUTER_API_KEY="sk-or-..." ASKVID_RESPONSE_CACHE=1 bun run test:e2e

Response caching is practical for live e2e as long as the request body is byte-identical: same API key, model, endpoint, streaming mode, request JSON property order, prompt, and video URL/base64 bytes. YouTube URL e2e requests are the easiest to cache because the video input string is stable.

MCP server

Run askvid as a local Model Context Protocol server over stdio:

askvid mcp

The server exposes one tool, ask_video, with videoPath and query arguments. It uses the same backend, source resolution, model, and cache environment variables as the normal CLI flow.