Skip to main content

Agent-native YouTube/video tool — index, search, inspect frames for coding tutorials (import qv, CLI qv)

Project description

qv

Quick video / query video — a minimal agent tool for coding tutorials. Three MCP tools (index, search, inspect_frame), one CLI (qv), one Python package.

Agents navigate screencasts by searching speech, then pulling precise frames for vision — without transcript dumps or 40-tool menus.

PyPI: install as query-video (qv is blocked as a PyPI project name). The Python import and CLI remain qv.

Install

uv tool install 'query-video[stt]'
# or
pip install 'query-video[stt]'

Provides the qv command. Optional extras: [mcp], [stt], [all].

System deps: ffmpeg on PATH. yt-dlp is bundled via pip. Indexing requires the [stt] extra (faster-whisper).

Development setup

Prerequisites: Python 3.12+, uv, ffmpeg and ffprobe on PATH.

git clone https://github.com/jkvc/qv.git
cd qv
uv sync --group dev
uv sync --extra stt
git config core.hooksPath .githooks   # optional; runs lint/format/unit tests on push

Run from the repo (editable install via uv sync):

uv run qv --help
uv run pytest
uv run pytest -m integration
uv run ruff check . && uv run ruff format --check .

GPU Whisper (optional): default device=auto uses CUDA when a GPU is visible. ctranslate2 4.x needs CUDA 12 user-space libs (e.g. on Ubuntu/Pop: sudo apt install libcublas12 libcudart12). If GPU libs are missing, indexing fails — set QV_DEVICE=cpu or device="cpu" in code. See notes/20260614-v0-config-and-tooling.md.

Lib usage:

from qv.lib.api import index_video, search_video, inspect_frame

CLI

qv index URL --json
qv search VIDEO_ID "useState setup" --json
qv inspect-frame VIDEO_ID --at 754 --json
qv mcp   # stdio MCP server (requires [mcp] extra)

CLI commands are stubs; use qv.lib.api directly until wired.

MCP (Cursor, Claude Code, etc.)

{
  "mcpServers": {
    "qv": {
      "command": "uvx",
      "args": ["--from", "query-video[mcp]", "qv", "mcp"],
      "env": {
        "QV_CACHE": "~/.cache/qv",
        "QV_DEVICE": "cpu"
      }
    }
  }
}

Layout

PyPI package query-video
Python import qv (src/qv/)
CLI qv only
Lib API from qv.lib.api import index_video, search_video, inspect_frame
GitHub repo jkvc/qv

Cache default: ~/.cache/qv (override with QV_CACHE).

Configuration

Precedence: call-site args → env → ~/.config/qv/config.toml → defaults.

Setting Default Env Config key
STT model whisper_base QV_MODEL_NAME (legacy: QV_WHISPER_MODEL = bare size) model_name
Device auto QV_DEVICE device
Frame quality p720 QV_FRAME_QUALITY frame_quality
Frame window (s) 15 QV_FRAME_WINDOW frame_window_s
Cache dir ~/.cache/qv QV_CACHE cache_dir

model_name is backend-qualified: whisper_base, whisper_small, soniox, etc. device (auto / cpu / cuda) applies to whisper only.

Example ~/.config/qv/config.toml:

model_name = "whisper_base"
device = "auto"

Override config file path with QV_CONFIG. Interactive qv configure is planned.

Publishing (PyPI)

Single PyPI project query-video ships the qv Python package and qv CLI entrypoint. The name qv is prohibited on PyPI.

Version bump:

  1. pyproject.toml[project].version
  2. src/qv/__init__.py__version__
uv lock
uv build
uv publish dist/query_video-*

Smoke test:

uv tool install 'query-video[stt]==X.Y.Z'
qv --version

Status

Core lib implements index_video, search_video, inspect_frame via qv.lib.api. CLI and MCP entrypoints exist but are not fully wired.

Docs: notes/20260614-qv-implementation-spec.md (v0 spec) · notes/20260614-v0-config-and-tooling.md (config session log) · notes/20260614-pypi-query-video.md (PyPI naming)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

query_video-0.1.1.tar.gz (99.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

query_video-0.1.1-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file query_video-0.1.1.tar.gz.

File metadata

  • Download URL: query_video-0.1.1.tar.gz
  • Upload date:
  • Size: 99.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for query_video-0.1.1.tar.gz
Algorithm Hash digest
SHA256 916e808f0d692a2d3d6e3b68093b4d2a87406d59cea54490bfc8313dbf04c6c4
MD5 f7ccb99e5bc32f0ec344cf95d6d81cdc
BLAKE2b-256 bccdd6bc741b57510f31fad6957a45976bd48092a611206db49357b6022ef28f

See more details on using hashes here.

File details

Details for the file query_video-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: query_video-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for query_video-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88145ed746b880d1a9e94e94b3f19b5499be6c9f5a2d35d5c407875d4104e4ef
MD5 2e4e800a4bb8ab05789d4b0c1d75bd45
BLAKE2b-256 0085bcbc6767a9ac08cfdeb6ead107d2d9db7e9e93c5486111a6a9a19a789b63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page