See what takes space on your drives, find duplicates and clean up safely: web UI, one container.
2.1K
See what takes space on your drives, find duplicates, and clean up safely.
One Docker container (or a desktop app) with a web UI — nothing on disk changes until you approve a plan.
Quick start · Desktop app · Configuration · Safety · Integrations · Development
Source code, issues, desktop apps and release notes: github.com/jncchds/ANalyze
| Feature | What it does | |
|---|---|---|
| 📊 | Overview | Totals; size by category, type, extension, age and file size; largest files; "heaviest folders" (by files directly inside, so parents don't drown out the real culprits). |
| 🗂️ | Browse | The folder tree as a sized list or a treemap, with multi-select and integration labels (e.g. Plex titles). Compares each folder with the disk, so files that aren't scanned yet show up too. |
| 🔎 | Search | By name, path, category, type, extension, tag, size, age, folder name, duplicates, hard links, sparse files… Every result set can become a cleanup plan. |
| 👯 | Duplicates | Same size → quick hash → full hash (xxHash128). Hard links are recognized and never counted. Similar folders finds folder pairs that share many identical files (copied backups, extracted archives). |
| 💡 | Insights | Dependency folders (node_modules, venvs…), caches & temp files, incomplete downloads, OS/NAS junk, files named like copies, huge/stale files, empty files and folders, broken symlinks, growth since the previous scan. |
| 🏷️ | Categories & rules | ~35 built-in rules and 19 categories out of the box; edit them or add your own with a live preview of matching files; import/export as JSON. |
| ✨ | AI (optional) | Any OpenAI-compatible API (OpenAI, Ollama, LM Studio, vLLM, OpenRouter…) classifies files no rule recognizes and proposes new rules for you to accept. |
| 👁️ | Preview | Images, video, audio, PDF, text/code (highlighted), Markdown (rendered), archive listings, embedded metadata (EXIF, tags), and a hex viewer for everything else. |
| 🧹 | Actions | Trash, move (with path templates like Sorted/{category}/{mtime:yyyy}/{name}), delete, or replace duplicates with hard links. Every change is a plan you review first; trash and moves can be undone. |
| 🔌 | Integrations | Plex, Jellyfin, Emby, Sonarr, Radarr, Lidarr, qBittorrent, Transmission, SABnzbd, Immich, PhotoPrism, plus Docker (works out the path mappings between containers) and ANalyze parent (checks a backup kept on another ANalyze instance). |
| 🛡️ | Integrity (optional) | Hash every file and re-verify old hashes to catch bit rot: files whose content changed while size and date stayed the same are flagged as possibly corrupted. |
| 📜 | Activity log | What ANalyze is doing, step by step and live: scan phases with counts and times, skipped folders and why, unreadable files, integration syncs, plans and AI runs. Hover a step name in the sidebar for a short explanation. |
| 🔗 | Links to every view | Tabs, filters, pages, dialogs and the file panel are part of the URL: the browser's Back and Forward buttons work everywhere (Back closes a dialog first), and any view can be bookmarked or shared. |
| 📝 | Release notes | What changed in each version, right in the UI (click the version next to the logo). |
services:
analyze:
image: jncchds/analyze:latest
restart: unless-stopped
ports:
- "8080:8080"
environment:
ANalyze__Roots__0: /library
# ANalyze__Password: "change-me"
volumes:
- analyze-data:/data
- /srv/nas:/library # read-write: actions enabled
# - /srv/media:/media:ro # read-only: analysis only (add ANalyze__Roots__1: /media)
volumes:
analyze-data:
Open http://localhost:8080 and press Scan now in the sidebar. With several roots, pick one in the scope selector to get Scan <root> next to Scan all; Settings also has a scan button per root. The first scan reads every folder; later scans only look at what changed (size, mtime, inode), so they are much faster. Schedule automatic scans in Settings.
Important The container runs as root so it can read — and, when allowed, move or delete — files of every user on the share. Folders it creates (move targets, trash) take the owner of their parent folder. To guarantee nothing is ever changed, mount roots with
:roor setANalyze__ReadOnly=true.
/mnt/main/media, which also covers the datasets below it) or with Enter this filesystem in Browse..snapshot, paths from the root like
Media/Cache/**, or full paths like /mnt/main/backups) or with Ignore in Browse. What you ignore leaves the
index at once, so it disappears from duplicates, search and insights without waiting for a scan (stop ignoring it and
scan its folder to bring it back).ANalyze also runs as a desktop app for Windows, macOS and Linux: the same server and UI in a window, for analyzing the
disks of the computer it runs on. Download it from the GitHub releases
— each version that reaches main gets a release v<VERSION> automatically.
| OS | Files |
|---|---|
| 🪟 Windows (x64 / arm64) | ANalyze-<version>-win-x64.exe / -win-arm64.exe (installer), or .zip |
| 🍎 macOS (Apple Silicon) | ANalyze-<version>-mac-arm64.dmg, or .zip |
| 🐧 Linux (x64 / arm64) | ANalyze-<version>-linux-x86_64.AppImage / -arm64.AppImage, or .tar.gz |
On first start, pick the folders or drives to analyze; add or remove them later in Settings → Roots or with
File → Add folder…. The app's data (index, thumbnails, logs) is in its user-data folder (File → Open data folder).
Video thumbnails need ffmpeg on the PATH (on macOS, Homebrew's is found too). Hard-link dedupe is only available on Linux.
Note The apps are not code-signed: Windows SmartScreen asks to confirm (More info → Run anyway); on macOS, if the app is reported as damaged, run
xattr -cr /Applications/ANalyze.app.
The bundled server listens on 127.0.0.1 only and accepts only requests from the app's window (a random token per launch).
Build it yourself (needs .NET 10 and Node 22): cd desktop && npm ci && npm run dist → desktop/dist/.
For development: npm run server once (publishes the server into desktop/server/<arch>), then npm start.
| Variable | Default | Meaning |
|---|---|---|
ANalyze__Roots__0, __1, … | /library if it exists | Folders to analyze (one per mount). |
ANalyze__ReadOnly | false | Analysis only; no actions even on writable mounts. |
ANalyze__Password | — | Protects the UI and API. Set it if the port is reachable by others. |
ANalyze__ApiToken | — | Token for scripts: Authorization: Bearer <token>. |
ANalyze__DataDir | /data | Database (analyze.db, SQLite), thumbnails, logs, encryption keys. Keep it on a volume (also with PostgreSQL: the keys decrypt saved secrets). |
ANalyze__Database__Provider | sqlite | sqlite or postgres (see PostgreSQL). |
ANalyze__Database__ConnectionString | — | PostgreSQL: required, e.g. Host=db;Database=analyze;Username=analyze;Password=…. SQLite: optional, overrides the file in the data folder. |
ANalyze__Database__ImportFrom | — | PostgreSQL: a SQLite analyze.db to copy over at startup while the PostgreSQL database has never been scanned. |
ANalyze__Integrations__<id>__<field> | — | Seeds an integration's settings until they are saved in the UI (see Plex). |
TZ | UTC | Time zone for schedules and dates. |
Everything else (scan schedule, ignore patterns, duplicate search, hashing threads, hashing every file and re-verifying hashes, trash retention, AI) is set in Settings.
Build without ffmpeg (no video thumbnails, smaller image): docker build -f docker/Dockerfile --build-arg FFMPEG=false .
The index lives in SQLite (/data/analyze.db) unless you choose PostgreSQL — worth it for very large libraries, when the data
volume sits on a slow disk, or if you already run a PostgreSQL server. Everything works the same on both.
docker compose -f docker-compose.yml -f docker-compose.postgres.yml up -d # ANalyze + a PostgreSQL 17 container
or point ANalyze at your own server (PostgreSQL 12 or newer, built with ICU like the official images; the user needs to be able to create tables in the database):
ANalyze__Database__Provider: postgres
ANalyze__Database__ConnectionString: "Host=db;Database=analyze;Username=analyze;Password=change-me"
The tables are created on first start. Keep the /data volume: thumbnails, logs and the keys that decrypt saved
integration secrets stay there.
Moving an existing SQLite index to PostgreSQL (scans, hashes, rules, plans, settings — everything):
ANalyze__Database__ImportFrom: /data/analyze.db. While the PostgreSQL database has never been scanned,
ANalyze copies the SQLite database into it before it starts (the log says how many rows); afterwards the setting is ignored,
so it can stay. The SQLite file is left in place (brought up to date first) — delete it once you are happy.docker compose run --rm analyze --import-sqlite /data/analyze.db
(outside Docker: ANalyze.Web --import-sqlite path/to/analyze.db). It refuses to overwrite a PostgreSQL database that
holds scans unless you add --force, which replaces its contents.To go back to SQLite, remove the two ANalyze__Database__… variables (the old analyze.db is used again as it was).
<root>/.analyze-trash/<plan>/… (an instant rename on the same disk). It is emptied after
the retention period (Settings) or from Actions → Trash. Undo restores trashed and moved items, and files replaced with the backup's copy.Files are grouped by size; a quick hash (first/middle/last 64 KB) filters candidates, and only colliding files get a full xxHash128. Hashes are cached and recomputed only for changed files. The dedupe wizard keeps the oldest, newest, shortest-path, deepest-path, or a copy inside preferred folders, and trashes, deletes or hard-links the others (hard links keep every path working while storing the data once).
Scans list the files inside zip, rar and 7z archives (from their headers, a small read) and look on every root for folders that hold them — same relative paths and sizes, also when the archive's top folder was not kept, and whatever else the folder contains. Duplicates → Extracted archives shows:
tar, tar.gz, .gz, .xz, .zst… have no file index: turn on Also list tar and compressed files in Settings → Archives to decompress each one once (CRC32s are computed on the way; there is a size limit). Insights and the Search filter Archives list them too.
Rules run top to bottom on every file. Conditions combine with all/any and can test name, path, extension, MIME type,
kind, size (100MB), days since modified/accessed, any parent folder name (node_modules) or depth, with operators
equals / contains / starts / ends / glob / regex / one of / greater / less, optionally negated. The first rule that sets
a category wins; tags from all matching rules add up. A category you set by hand (on a file or a whole folder) always
wins; AI only fills gaps.
Settings → AI: base URL, key and model of any OpenAI-compatible server (e.g. http://ollama:11434/v1 with qwen2.5).
By default only paths, names, sizes, types and dates are sent; optionally the first 2 KB of text files.
Integrations are plugins with their own settings form, sync job, API and page. They label files and folders, and the labels appear in Browse and Search; click a label to open that integration's page at the title or folder it belongs to. Turn one on under Integrations: enabling it also adds its page to the sidebar, and disabling it hides it again.
| Integration | What it adds |
|---|---|
| Plex, Jellyfin, Emby | Movies, shows and music labelled in Browse; titles ranked by size and watch state (watched long ago, never watched); media in library folders the server does not know. |
| Sonarr, Radarr, Lidarr | Managed files labelled with quality; files the app does not track in its root folders (old upgrades, extras, failed imports); orphan folders; Unmonitor a title before cleaning it up so it is not downloaded again. |
| qBittorrent, Transmission, SABnzbd | Seeding and downloading items are protected — cleanup plans skip them; finished downloads ranked by size and age; files in the download folders the client no longer knows; library files copied instead of hard-linked (fix them in Duplicates → Dedupe with hard link). |
| Immich, PhotoPrism | Library photos and videos labelled; copies outside the library (exports, old backups, phone dumps); files in the library folders that were never indexed. |
| ANalyze parent | Which files and folders are synchronized to your backup server (when it runs ANalyze too), and which files in synchronized folders are corrupted (other size or hash there) or missing there — per folder in Browse and on the Backup page. |
| Docker | Finds each app's container and turns the volume mounts into path mappings for the integrations above, so /movies in Radarr is matched to /library/movies here without typing anything. Labels folders that other containers mount. |
Apps in other containers see the same files under other paths. Each integration tries, in order:
A mapping you entered covers everything below its prefix (Docker never overrides part of it); for the same prefix the
last one in the list wins. When ANalyze sees one host folder under two paths (/mnt/main mounted at /mnt/main, and its
dataset /mnt/main/media again at /mnt/media), a mapping that leads to the path that is not scanned is followed through
ANalyze's own mounts to the one that is — so /downloads → /mnt/main/media works with only /mnt/media as a root.
To use Docker, mount the socket read-only and enable Integrations → Docker:
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
Tip ANalyze only reads the container list (
/containers/json). For tighter control, point it at a docker-socket-proxy withCONTAINERS=1(tcp://docker-proxy:2375).
The app's container is found from the integration's URL (container name, compose service or IP), a published port, or
its image name; name it explicitly under Container per app (radarr=radarr-4k) when several match.
The integration pages show each file three ways: the app's path, the path ANalyze looked at (after the mappings) and the
file it found. Items not found are summed up in the activity log with the reason (e.g. inside a folder on another filesystem).
Settings → Host paths (Docker only) tells ANalyze where its folders are on the host (/library → /mnt/media), so paths
are shown with their host path too; with the Docker integration on, ANalyze's own mounts fill this in automatically.
When your NAS is backed up to another NAS and both run ANalyze, the instance being backed up (the child) can check its backup on the other one (the parent, the backup server):
ANalyze__ApiToken (and ANalyze__Password if the port is reachable by others).http://backup-nas:8080), its token,
and path mappings when the backup lives under another path there (/backup/nas1 → /library; leave empty to detect
it from sample files, or press Suggest). Test, enable, Sync now.How it decides:
The Backup page shows how much is on the backup, corrupted and missing files, and a folder view with each folder's share; Browse labels every folder (Synced, Not synced · 40%) and each corrupted or missing file. The comparison runs after each scan of the child; the backup server only answers read-only requests, also while it scans. Downloading the backup server's file list doesn't wait for a scan on the child, and doesn't hold one up either.
Hashing a large library takes a long time, so the comparison doesn't wait for it: it compares sizes where a hash is still missing and uses each hash as soon as it exists. Files hashed on the child are checked against the backup batch by batch, and every 15 minutes the child fetches the hashes the backup server computed since then (backup server 0.1.10 or newer).
What happened? Next to each corrupted file, this button reads both copies completely, the child's here and the backup server's there, at the same time. No file content crosses the network, only a hash per block. It then tells you how they differ and which copy is likely the bad one:
| Verdict | Meaning |
|---|---|
| Identical now | Same content: an index was out of date (rescan) |
| Cut off / Grew since the backup | One copy is exactly the start of the other: an interrupted copy, or data appended later (the newer one is longer) |
| Zeros instead of data | Where they differ, one copy holds only zeros: a copy that stopped while writing, or lost data |
| Silent corruption | A few blocks differ although size and date are the same: bit rot, a failing disk or RAM. If either instance had noticed the change while re-verifying, that copy is named |
| Header / tags changed, End changed, Middle changed | The rest is identical, also when the size changed (e.g. a tagger rewrote audio or video metadata) |
| Edited / Different file | Scattered changes, or nothing in common (replaced, re-encoded, downloaded again); the newer copy is named |
The rest of this page is on GitHub.
Content type
Image
Digest
sha256:0a88eaddb…
Size
244.9 MB
Last updated
1 day ago
docker pull jncchds/analyze