Skip to content

Commands Overview

Immich Stack provides multiple commands for different photo management operations.

Available Commands

Main Stacking Command

immich-stack [flags]

The default command that processes your photo library and creates stacks based on your configured criteria. This is the primary functionality of the tool.

Learn more about stacking →

Duplicates Detection

immich-stack duplicates [flags]

Finds and reports duplicate assets in your library based on filename and timestamp matching.

Full documentation →

Fix Trash Operations

immich-stack fix-trash [flags]

Maintains stack consistency by moving related assets to trash when their stack members have been deleted.

Full documentation →

Common Workflows

1. Initial Library Organization

# First, check for duplicates
immich-stack duplicates --api-key your_key

# Then create stacks
immich-stack --api-key your_key --dry-run

# If satisfied, run without dry-run
immich-stack --api-key your_key

2. Regular Maintenance

# Weekly maintenance routine
immich-stack duplicates --api-key your_key
immich-stack fix-trash --api-key your_key
immich-stack --api-key your_key

3. Post-Deletion Cleanup

# After deleting photos in Immich UI
immich-stack fix-trash --api-key your_key --dry-run
immich-stack fix-trash --api-key your_key

Global Flags

All commands share these common flags:

  • --api-key - Immich API key (required)
  • --api-url - Immich server URL
  • --dry-run - Preview changes without applying
  • --log-level - Set logging verbosity
  • --with-archived - Include archived assets
  • --with-deleted - Include deleted assets

See CLI Usage for complete flag documentation.

Best Practices

  1. Always use dry-run first - Preview changes before applying them
  2. Regular maintenance - Run commands periodically to keep library organized
  3. Check duplicates before stacking - Avoid creating stacks with duplicate assets
  4. Fix trash after deletions - Maintain consistency when deleting stacked photos

See Also