Skip to content

Content Filtering

rhoopr edited this page Apr 13, 2026 · 13 revisions

Content Filtering

kei provides several ways to control which assets are downloaded.

By Media Type

Flag Effect
--skip-videos Skip standalone video files
--skip-photos Skip image files (download only videos)
--live-photo-mode Control live photo handling: both, image-only, video-only, skip

These can be combined. For example, --skip-photos --live-photo-mode skip downloads only standalone videos.

By Date Range

Flag Effect
--skip-created-before Skip assets older than a date or interval
--skip-created-after Skip assets newer than a date or interval

Both accept ISO 8601 dates (2024-01-01) or relative intervals (30d).

Combine them to download a specific window:

kei sync -u me@email.com -d /photos \
  --skip-created-before 2024-01-01 \
  --skip-created-after 2024-12-31

By Library

By default, downloads come from your personal library (PrimarySync). Use --library to pick a specific shared library, or --library all to sync every library in one run. Use kei list libraries to see what's available.

By Album

Use --album to download from specific albums instead of the entire library. Use kei list albums to see what's available.

Use --exclude-album to exclude specific albums from sync. This is useful when syncing the full library but wanting to skip certain albums (e.g., --exclude-album "Screenshots").

By Filename Pattern

Use --filename-exclude to skip files matching glob patterns. Patterns are case-insensitive.

kei sync --filename-exclude "*.AAE" --filename-exclude "Screenshot*"

By Recency

Use --recent N to download only the N most recently added photos. This limits API pagination - enumeration stops after N assets are found.

RAW Alignment

Use --align-raw to control how RAW+JPEG pairs are handled. When a photo has both an Original and Alternative version, this policy can swap them so the RAW file becomes the primary download (or vice versa).

Policy Effect
as-is No change (default)
original RAW Alternative becomes the Original
alternative RAW Original becomes the Alternative

The swap is applied before the size lookup, so --size original combined with --align-raw original downloads the RAW file.

Filter Ordering

Filters are applied in the download pipeline after assets are enumerated from the API:

  1. Album exclusions (--exclude-album)
  2. Media type filters (--skip-videos, --skip-photos, --live-photo-mode)
  3. Date range filters (--skip-created-before/after)
  4. Filename patterns (--filename-exclude)
  5. Recency limit (--recent)
  6. Existing file check (skip already-downloaded files)

Commands

Getting Started

Features

Clone this wiki locally