{"id":15715629,"url":"https://github.com/peterbrain/icloud-nosync","last_synced_at":"2026-05-10T19:12:41.935Z","repository":{"id":253625852,"uuid":"843961044","full_name":"PeterBrain/icloud-nosync","owner":"PeterBrain","description":"Prevent a file or directory from syncing with iCloud by adding the nosync extension.","archived":false,"fork":false,"pushed_at":"2025-02-20T21:50:21.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T20:18:09.878Z","etag":null,"topics":["apple","automator","automator-workflow","finder","homebrew","homebrew-formula","icloud","icloud-bypass","icloud-drive","icloud-sync","macos","macos-finder","nosync"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PeterBrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-18T00:16:05.000Z","updated_at":"2025-02-20T21:50:24.000Z","dependencies_parsed_at":"2024-10-24T12:57:56.807Z","dependency_job_id":"32fc2b5e-afe7-414f-aa0d-bedf1584f003","html_url":"https://github.com/PeterBrain/icloud-nosync","commit_stats":null,"previous_names":["peterbrain/icloud-nosync"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterBrain%2Ficloud-nosync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterBrain%2Ficloud-nosync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterBrain%2Ficloud-nosync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterBrain%2Ficloud-nosync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterBrain","download_url":"https://codeload.github.com/PeterBrain/icloud-nosync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246372743,"owners_count":20766635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","automator","automator-workflow","finder","homebrew","homebrew-formula","icloud","icloud-bypass","icloud-drive","icloud-sync","macos","macos-finder","nosync"],"created_at":"2024-10-03T21:42:12.601Z","updated_at":"2026-05-10T19:12:41.880Z","avatar_url":"https://github.com/PeterBrain.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![iCloud noSync](https://repository-images.githubusercontent.com/843961044/fb0274fc-b4a1-489e-a0a8-b890de6b1cf0)\n\n# iCloud noSync\n\n[![Update Homebrew Tap](https://github.com/PeterBrain/icloud-nosync/actions/workflows/update-tap.yml/badge.svg)](https://github.com/PeterBrain/icloud-nosync/actions/workflows/update-tap.yml)\n\nPrevent a file or directory from syncing with iCloud by adding the nosync extension. This process appends the nosync extension to the file or directory and then creates a symlink that points back to the original name, preserving any naming conventions (e.g.: node_modules, vendor).\n\nBackground story: iCloud can become very CPU-intensive when handling a large number of small files, such as those commonly found in `node_modules` or `vendor` folders. This is because iCloud’s synchronization process has to monitor, queue, and upload each file individually. When there are many small files, the synchronization process becomes inefficient due to overhead associated with tracking changes and managing each file's upload process.\n\n## Features\n\n- Prevent file or folder from syncing with iCloud\n- Add to gitignore (optional)\n- Undo symlink and .nosync extension\n- Hide .nosync file or folder with chflags (optional)\n- Non-interactive mode\n- Finder quick actions\n\n## Install\n\n### Homebrew\n\n```bash\nbrew tap peterbrain/tap\nbrew install icloud-nosync\n\ncp -r /usr/local/opt/icloud-nosync/workflows/* ~/Library/Services/\n```\n\nor\n\n```bash\nbrew install peterbrain/tap/icloud-nosync\n\ncp -r /usr/local/opt/icloud-nosync/workflows/* ~/Library/Services/\n```\n\n\u003e [!NOTE]\n\u003e Workflows for Finder Quick Actions require to be copied to `~/Library/Services` manually. This is due to a security limitation of the homebrew installer. Instructions to do so are displayed during installation.\n\n### Manually\n\nClone this repository\n\n```bash\ninstall nosync.sh /usr/local/bin/nosync\ncp -r ./workflows/* ~/Library/Services/\n```\n\n## Usage\n\n```bash\nnosync [options] \u003cfile1\u003e [file2 ... fileN]\n\nOptions:\n  -v, --verbose                Enable verbose output\n  -n, --no, --non-interactive  Automatically respond no to all prompts\n  -y, --yes                    Automatically respond yes to all prompts\n  -u, --undo                   Undo symlink and .nosync extension\n  -x, --hidden                 Hide the .nosync file with chflags\n  -h, --help                   Show this help message\n```\n\n\u003e [!NOTE]\n\u003e What happens if I want to exclude the directory or file \"important\", but there is already a \"important.nosync\" directory or file present?\n\u003e\n\u003e Answer: Nothing, this directory or file will be skipped.\n\n\u003e [!NOTE]\n\u003e What happens if I want to undo nosync for the directory or file \"important.nosync\", but there is already a \"important\" directory or file present?\n\u003e\n\u003e Answer: Nothing, to prevent any issues the undo process will abort. Manual conflict resolution is required.\n\u003e\n\u003e This is usually the case when the nosync file or folder gets created manually, the symlink was removed and a file or folder with the same name has taken its place.\n\n## Caveats\n\n- **OS**:\n  - Works on macOS for iCloud only.\n  - Minimum OS version: macOS Sierra (10.12)\n  - Any other cloud storage solution than iCloud is unsupported (e.g. OneDrive, Dropbox, Google Drive).\n- **Files**:\n  - Files with the nosync extension wont open with their associated application anymore. Images wont be opened in preview, docs won't start Word or Pages. Avoid using nosync on files. Use it on directories whenever possible.\n- **Renaming**:\n  - If you need to rename a file or directory with the nosync extension, you'll need to recreate the symlink. Although Finder can still locate the renamed file or directory through the old symlink, the symlink itself will continue pointing to the original location, which isn't the case in Terminal. It's recommended to delete the symlink, remove the nosync extension, and then rerun the nosync command.\n- **Git**:\n  - If the file or folder is in a git repository and the .nosync file or extension is added to `.gitignore`, the symlink will still be tracked.\n- **Undo**:\n  - If the symlink is provided and it does not point to the corresponding `.nosync` file, the undo process will be aborted.\n  - If the `.nosync` file is provided and the matching symlink (by name) does not point to it, the undo process will be aborted.\n  - If the `.nosync` file is provided and there is no matching symlink (e.g.: manually created), the undo process will try to restore the file.\n  - The undo process does not involve or modify the `.gitignore` file.\n- **Quick Action**:\n  - Workflows require to be copied to `~/Library/Services` manually. This is due to a security limitation of the homebrew installer. Instructions to do so are displayed during install with homebrew.\n  - Service workflows may need to be manually enabled. Please refer to these instructions: [https://support.apple.com/guide/automator/use-quick-action-workflows-aut73234890a/mac](https://support.apple.com/guide/automator/use-quick-action-workflows-aut73234890a/mac#aut067d4e77d)\n\n\u003e [!CAUTION]\n\u003e The list contains only the known limitations of this program. Proceed with caution!\n\n## Uninstall\n\n### Homebrew\n\n```bash\nbrew uninstall icloud-nosync\nrm ~/Library/Services/nosync_*\n```\n\nor\n\n```bash\nbrew uninstall peterbrain/tap/icloud-nosync\nrm ~/Library/Services/nosync_*\n```\n\n### Manually\n\nThis is only possible if nosync was installed manually.\n\n```bash\nrm /usr/local/bin/nosync ~/Library/Services/nosync_*\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterbrain%2Ficloud-nosync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterbrain%2Ficloud-nosync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterbrain%2Ficloud-nosync/lists"}