Find, list or resolve iCloud file-version conflicts
Find a file
2025-11-19 15:34:40 +01:00
.gitignore chore(git): ignore additional cache, environment, IDE and other sensitive files 2025-11-19 15:34:40 +01:00
find_icloud_conflicts.py feat: add initial implementation of find_icloud_conflicts 2025-06-25 03:00:48 +02:00
LICENSE Initial commit 2025-06-25 02:38:06 +02:00
README.md docs(readme): describe find_icloud_conflicts tool 2025-06-25 03:00:33 +02:00

find_icloud_conflicts

A small Python 3 utility for macOS for all those crazy folks who dare to store their GitHub repos or other frequently changing files in iCloud.

The tool scans your local files (or directories) for iCloud Drive conflicted copy versions, lists them (with optional timestamps) and if you like - automatically resolves each conflict by choosing the newest version and cleaning up the rest.

Features

  • Scan any file or directory tree for unresolved iCloud version conflicts
  • List conflicted files, optionally showing the timestamp of the current version and each conflict
  • Resolve conflicts automatically by picking the most recently modified version
  • Recursive support: point at a directory and it will process every conflicted file within

Requirements

  • macOS (uses the Cocoa NSFileVersion APIs)
  • Python 3
  • pyobjc-framework-Cocoa framework

Installation

  1. Install the PyObjC bridge

    pip install pyobjc-framework-Cocoa
    
  2. Make the script executable

    chmod +x find_icloud_conflicts.py
    
  3. (Optional) Move it into your $PATH, e.g.

    mv find_icloud_conflicts.py ~/bin/
    

Usage

find_icloud_conflicts.py [OPTIONS] [PATH]
Option Description
--without-details List only the file paths of conflicted files (no timestamps), default mode shows timestamps
--resolve Resolve any conflicts under PATH (file or directory)
PATH File or directory to process. Defaults to . (current directory)

Examples

  1. List all conflicted files with timestamps under the current directory (default):

    find_icloud_conflicts.py
    
  2. List only file paths (no timestamps):

    find_icloud_conflicts.py --without-details
    
  3. List conflicts in a specific folder:

    find_icloud_conflicts.py ~/iCloudDrive/Dev/MyRepo
    
  4. Resolve every conflict under the current directory:

    find_icloud_conflicts.py --resolve
    
  5. Resolve conflicts in a single file:

    find_icloud_conflicts.py --resolve ~/iCloudDrive/Dev/MyRepo/some_conflicted_file
    
  6. Resolve everything under another path:

    find_icloud_conflicts.py --resolve /path/to/project