pair-programmer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

VideoDB Pair Programmer

VideoDB Pair Programmer

AI pair programming with real-time screen and audio context. Record your screen and audio, with AI-powered indexing that logs visual and audio events in real-time.
具备实时屏幕和音频上下文的AI结对编程工具。可录制你的屏幕与音频,通过AI驱动的索引功能实时记录视觉和音频事件。

Commands

Commands

When user asks for a command, read the corresponding file for instructions:
CommandDescriptionReference
/pair-programmer record
Start screen/audio recordingSee commands/record.md
/pair-programmer stop
Stop the running recordingSee commands/stop.md
/pair-programmer search
Search recording context (screen, mic, audio)See commands/search.md
/pair-programmer what-happened
Summarize recent activitySee commands/what-happened.md
/pair-programmer setup
Install deps and configure API keySee commands/setup.md
/pair-programmer config
Change indexing and other settingsSee commands/config.md
当用户询问命令时,请读取对应文件获取说明:
CommandDescriptionReference
/pair-programmer record
开启屏幕/音频录制参见 commands/record.md
/pair-programmer stop
停止正在进行的录制参见 commands/stop.md
/pair-programmer search
搜索录制上下文(屏幕、麦克风、音频)参见 commands/search.md
/pair-programmer what-happened
总结近期活动参见 commands/what-happened.md
/pair-programmer setup
安装依赖并配置API key参见 commands/setup.md
/pair-programmer config
修改索引及其他设置参见 commands/config.md

How It Works

How It Works

  1. User runs
    /pair-programmer setup
    to install dependencies and set
    VIDEO_DB_API_KEY
    environment variable
  2. User runs
    /pair-programmer record
    to start recording
  3. A picker UI appears to select screen and audio sources
  4. Recording starts and events are logged to
    /tmp/videodb_pp_events.jsonl
  5. User can stop recording from the tray icon (🔴 PP → Stop Recording)
  1. 用户运行
    /pair-programmer setup
    安装依赖并设置
    VIDEO_DB_API_KEY
    环境变量
  2. 用户运行
    /pair-programmer record
    开启录制
  3. 弹出选择器UI供用户选择屏幕和音频源
  4. 录制启动,事件会被记录到
    /tmp/videodb_pp_events.jsonl
  5. 用户可以通过托盘图标停止录制(🔴 PP → 停止录制)

Output Files

Output Files

PathContent
/tmp/videodb_pp_pid
Process ID of the recorder
/tmp/videodb_pp_events.jsonl
All WebSocket events (JSONL format)
/tmp/videodb_pp_info.json
Current session info (session_id, rtstream_ids)
路径内容
/tmp/videodb_pp_pid
录制器的进程ID
/tmp/videodb_pp_events.jsonl
所有WebSocket事件(JSONL格式)
/tmp/videodb_pp_info.json
当前会话信息(session_id、rtstream_ids)

Event File Format

Event File Format

Events are written as JSONL (one JSON object per line):
json
{"ts": "2026-03-05T10:15:30.123Z", "unix_ts": 1709374530.12, "channel": "visual_index", "data": {"text": "User is viewing VS Code with auth.ts open"}}
{"ts": "2026-03-05T10:15:31.456Z", "unix_ts": 1709374531.45, "channel": "transcript", "data": {"text": "Let me check the login flow", "is_final": true}}
事件以JSONL格式写入(每行一个JSON对象):
json
{"ts": "2026-03-05T10:15:30.123Z", "unix_ts": 1709374530.12, "channel": "visual_index", "data": {"text": "User is viewing VS Code with auth.ts open"}}
{"ts": "2026-03-05T10:15:31.456Z", "unix_ts": 1709374531.45, "channel": "transcript", "data": {"text": "Let me check the login flow", "is_final": true}}

Environment Variables

Environment Variables

The recorder reads these from environment variables:
VariableRequiredDescription
VIDEO_DB_API_KEY
YesVideoDB API key
VIDEO_DB_BASE_URL
NoAPI endpoint (default: https://api.videodb.io)
录制器会从环境变量中读取以下配置:
变量名必填描述
VIDEO_DB_API_KEY
VideoDB API key
VIDEO_DB_BASE_URL
API端点(默认值:https://api.videodb.io)

Reading Context

Reading Context

Events are in
/tmp/videodb_pp_events.jsonl
. Use CLI tools to filter — never read the whole file.
ChannelContentDensity
visual_index
Screen descriptionsDense (~1 every 2s)
transcript
Mic speechSparse (sentences)
audio_index
System audio summariesSparse (sentences)
Channel filter — use grep to filter by channel, pipe to
tail
for recent events:
bash
grep '"channel":"visual_index"' /tmp/videodb_pp_events.jsonl | tail -10
Keyword search — grep across all channels:
bash
grep -i 'keyword' /tmp/videodb_pp_events.jsonl
Time-window filter — filter events from the last N minutes:
  1. Get current epoch:
    $(date +%s)
  2. Compute cutoff:
    epoch - N*60
  3. Filter lines where the
    unix_ts
    JSON field exceeds the cutoff
  4. Pipe through
    grep
    to narrow by channel
Generate the appropriate filtering command (grep, awk, python3, jq) based on complexity.
For semantic search across indexed content, use
search-rtstream.js
:
bash
node search-rtstream.js --query="your query" --cwd=<PROJECT_ROOT>
<PROJECT_ROOT>
is the absolute path to the user's project directory. This is NOT the skill directory — resolve it before running the command.
See commands/search.md for the full search strategy and CLI patterns.
事件存储在
/tmp/videodb_pp_events.jsonl
中。请使用CLI工具进行过滤,请勿读取整个文件。
通道内容密度
visual_index
屏幕内容描述高密度(约每2秒1条)
transcript
麦克风语音内容低密度(按句子生成)
audio_index
系统音频摘要低密度(按句子生成)
通道过滤 — 使用grep按通道过滤,通过管道传给
tail
获取最近的事件:
bash
grep '"channel":"visual_index"' /tmp/videodb_pp_events.jsonl | tail -10
关键词搜索 — 跨所有通道grep搜索:
bash
grep -i 'keyword' /tmp/videodb_pp_events.jsonl
时间窗口过滤 — 过滤最近N分钟内的事件:
  1. 获取当前时间戳:
    $(date +%s)
  2. 计算 cutoff 阈值:
    epoch - N*60
  3. 过滤
    unix_ts
    JSON字段大于cutoff的行
  4. 通过管道传给
    grep
    按通道缩小范围
根据复杂度生成合适的过滤命令(grep、awk、python3、jq)。
如需对索引内容进行语义搜索,请使用
search-rtstream.js
bash
node search-rtstream.js --query="your query" --cwd=<PROJECT_ROOT>
<PROJECT_ROOT>
是用户项目目录的绝对路径。它不是当前skill的目录,请在运行命令前解析该路径。
完整的搜索策略和CLI使用模式参见 commands/search.md