embed

A command that prepares photos and videos for description-based searching in Videre, an app for searching media collections. It creates search data for each file and can resume an interrupted run.

In plain words
What is it for?
Use it to process an entire library or selected videos and date ranges, choose a model or batch size, monitor progress, and resume unfinished work.
Why use it?
It handles the long initial processing job in batches and lets you continue later without starting over. Filters limit processing to particular media types, dates, or files.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/erhangundogan/videre/embed
Clone the repo
git clone --depth 1 https://github.com/erhangundogan/videre
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,705 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.01705
Opus 5 $0.00008 $0.00852
Sonnet 5 $0.00003 $0.00341
Haiku 4.5 $0.00002 $0.00170

Measured 2d ago against content hash 7cb7f8ec9036, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

embed scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/src/content/docs/commands/embed.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prepares photos so they can be searched by description. One-time per photo, and resumable.

videre embed                           # process everything not done yet
videre embed --db ~/photos.db          # use a specific database
videre embed --model <model-id>        # prepare with a specific model, kept separately
videre embed --batch 64                # images per inference batch (default 32, max 96)
videre embed --chunk 1000              # rows saved per transaction (default 500)
videre embed --silent                  # no per-image progress
videre embed --type video              # only videos
videre embed --after 2024-01-01        # only files from this year on

:::tip These filters work the same way across commands, and combine. See scoping a run. :::

A first run on a real library

The first run downloads about 780 MB of model data, then works through every image. On a large library this takes hours, so plan to leave it running.

videre embed                    # start; Ctrl-C whenever you like
videre stats                    # how far it got
videre embed                    # continue from there

videre stats reports a row count per model, so the gap between that and your photo count is what remains:

embeddings
  google/siglip-base-patch16-224   12,481 rows   768 dims   28.4 MB

Work is committed every --chunk rows (500 by default), so an interrupt loses at most that much. There is no separate resume flag: rerunning is resuming, because the command only ever looks for hashes that have no vector yet.

Adding photos later works the same way. Run videre scan to pick them up, then videre embed again to cover only the new ones.

What gets skipped

Type Embedded?
jpg, png, tiff, webp, bmp, gif yes
heic macOS only
mov, mp4 macOS only, from one frame
dng never

.dng is excluded up front rather than attempted and failed, so a library full of raw files does not waste a decode attempt on each of them every run. Their EXIF is still recorded by scan.

Read the full file on GitHub · 168 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 168 lines · 16 tokens per session scan A 7cb7f8ec9036

Subscribe to this mod's changes

embed is a command published in the GitHub repository erhangundogan/videre (2 stars, last pushed 4d ago), licensed Apache-2.0. It adds 16 tokens to every session and 1,705 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.