dedupe

dedupe is a command for coding agents from erhangundogan/videre. It costs 12 tokens per session (1,647 once invoked), scanned A, original, Apache-2.0.

A command that lists removable copies of duplicate photos, with an option to report similar-looking images for manual review. Duplicate means the same content stored more than once.

In plain words
What is it for?
Listing duplicate photo paths, reviewing duplicate groups in a browser, producing JSON output, and preparing selected copies for deletion.
Why use it?
It helps reduce repeated files, while the review mode separates uncertain look-alikes from duplicates that can be identified automatically.

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/dedupe
Clone the repo
git clone --depth 1 https://github.com/erhangundogan/videre

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dedupe

README.md
[![agentmods](https://agentmods.dev/badge/commands/erhangundogan/videre/dedupe.svg)](https://agentmods.dev/commands/erhangundogan/videre/dedupe)
Your own site
<a href="https://agentmods.dev/commands/erhangundogan/videre/dedupe"><img src="https://agentmods.dev/badge/commands/erhangundogan/videre/dedupe.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 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,647 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.00012 $0.01647
Opus 5 $0.00006 $0.00823
Sonnet 5 $0.00002 $0.00329
Haiku 4.5 $0.00001 $0.00165

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

Security

Grade A, and why

dedupe 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 4d 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/dedupe.md · 175 lines

How it starts

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

Finds duplicates already recorded in the database. Prints one path per line to stdout, and nothing else, so it pipes cleanly.

videre dedupe                          # list removable copies (one path per line)
videre dedupe | xargs trash            # ...and delete them
videre dedupe --similar                # also report look-alike groups (review only)
videre dedupe --db ~/photos.db         # use a specific database
videre dedupe --silent                 # suppress the summary; paths still print
videre dedupe --json                   # print one JSON object instead

:::danger This prints the REMOVE side of each duplicate group, so videre dedupe | xargs trash deletes those files immediately. Look before you pipe. :::

The safe way to do it

Review in a browser first. That is what videre dedupe --html is for, and it takes one extra command:

videre scan ~/Photos           # 1. record what you have
videre dedupe --html                  # 2. review the groups visually
videre dedupe | xargs trash    # 3. delete, once you agree
videre prune                   # 4. tidy the database afterwards

Step 2 opens a page showing every duplicate group with thumbnails, KEEP and REMOVE badges, sizes, dates and paths, sorted by how much space each group wastes. It is the same grouping and the same KEEP choice dedupe will print, so what you see is what will happen.

If you would rather read the list than look at it:

videre dedupe > /tmp/remove.txt        # inspect it
wc -l /tmp/remove.txt
xargs trash < /tmp/remove.txt          # then act

trash moves to the system trash, which is recoverable. rm is not. On a library you care about, prefer trash (macOS: brew install trash).

Step 4 matters more than it looks: until you prune, the database still lists the deleted files, and their embeddings and cached thumbnails are still on disk. See videre prune.

What counts as a duplicate

Exact, byte-for-byte identical content. Files are hashed with BLAKE3 and grouped by that hash, so two files are duplicates only if their bytes match completely.

Read the full file on GitHub · 175 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. 4d ago First seen · 175 lines · 12 tokens per session scan A 5024abe73c6b

Subscribe to this mod's changes

dedupe is a command published in the GitHub repository erhangundogan/videre (2 stars, last pushed 6d ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,647 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.