Full Code of nicolodiamante/icloud-nosync for AI

main 84f46c94bccb cached
10 files
24.5 KB
8.2k tokens
1 requests
Download .txt
Repository: nicolodiamante/icloud-nosync
Branch: main
Commit: 84f46c94bccb
Files: 10
Total size: 24.5 KB

Directory structure:
gitextract_8ngt5gwz/

├── .gitignore
├── LICENSE.md
├── README.md
├── bootstrap.zsh
├── scripts/
│   ├── iCloud No Sync.workflow/
│   │   └── Contents/
│   │       ├── Info.plist
│   │       └── document.wflow
│   └── iCloud Sync.workflow/
│       └── Contents/
│           ├── Info.plist
│           └── document.wflow
└── utils/
    ├── install.zsh
    └── uninstall.zsh

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
#
# Ignore
#

*.swp
.DS_Store


================================================
FILE: LICENSE.md
================================================
The MIT License (MIT)

&#169; 2024 Nicolò Diamante <hello@nicolodiamante.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/8c37ca97-ebd7-41dd-9ce2-f362c8fedb5a" draggable="false" ondragstart="return false;" alt="iCloud NoSync" title="iCloud NoSync" />
    <img src="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/7252ce73-8f3b-4d70-8168-066b610148ae" draggable="false" ondragstart="return false; "alt="iCloud NoSync" title="iCloud NoSync" />
  </picture>
</p>

[iCloud][apple-icloud] is a powerful utility that allows users to sync files across multiple devices. However, sometimes users may want to prevent certain files or folders from syncing. Apple has a blacklist of file names and extensions that users should avoid using in their iCloud Drive. Adding the extension .nosync to a file is a simple way to prevent iCloud from syncing that file. This technique is useful for selective syncing. However, adding the same extension to a folder will not prevent iCloud from syncing its contents. The only way to prevent an entire folder from syncing is to name it tmp or end it with .tmp.

<br><br>

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/a1e57d3d-ec4d-485c-bfaa-54e4dc74e722" draggable="false" ondragstart="return false;" alt="iCloud NoSync Finder" title="iCloud NoSync Finder" />
    <img src="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/79be16a5-25f2-4ec4-a503-2ba359d9adf5" draggable="false" ondragstart="return false; "alt="iCloud NoSync Finder" title="iCloud NoSync Finder" width="600px" />
  </picture>
</p>

<br><br>

**iCloud No Sync:** hides and appends the appropriate extension to the file or folder, effectively stopping the sync process. It then creates a symbolic link with the same name as the original file or folder to avoid any issues with applications that depend on it.

<br>

**iCloud Sync:** it first unhides the original file or folder. Then, it removes the symbolic link and the extension to restart the synchronisation. This means that iCloud Sync always refers to the symlink to restart the sync, which ensures that the latest version of the file or folder is synchronised across all your devices. By removing the symbolic link and the extension, iCloud Sync ensures that the sync is done from scratch, which reduces the chances of any errors or conflicts during the synchronisation process.<br><br>

## Getting Started

### Installation

The installation process for this utility is designed for ease and convenience. You have two options:

**Automatic Installation via `curl`**: Simply execute the following command in your terminal to quickly download and seamlessly install the utility:

```shell
zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nicolodiamante/icloud-nosync/HEAD/bootstrap.zsh)"
```

**Manual Installation**: If you favor manual installation, first clone the repository to your local machine using `git`:

```shell
git clone https://github.com/nicolodiamante/icloud-nosync.git
```

After cloning, navigate to the repository's directory in your terminal and execute the install script:

```shell
source utils/install.zsh
```

The script will copy the workflow files to `~/Library/Services` and then open the Privacy & Security panel.

<br>

### Show in Quick Action Menu

Once the script opens the Privacy & Security panel, select Finder and check the boxes:

<br><br>

<p align="center">
  <picture>
    <img src="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/5a70657b-9fbf-40b2-b0f2-ade24e2c9b6c" draggable="false" ondragstart="return false;" alt="Selected Quick Actions" title="Selected Quick Actions" width="600px" />
  </picture>
</p>

<br><br>

After doing this, you should be able to right-click on files or folders in Finder and find the `iCloud No Sync` and `iCloud Sync` options in the Quick Action section of the context menu.

<br>

## How It Works

1. Right-click on the file or folder you want to stop syncing to iCloud Drive.
2. Select `iCloud No Sync` from the `Quick Actions` menu to stop the sync.
3. Select `iCloud Sync` from the `Quick Actions` menu to sync it again.

<br><br>

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/463b58e5-b7bc-4183-80d6-818b6464e23e" draggable="false" ondragstart="return false;" alt="Quick Actions Menu" title="Quick Actions Menu" />
    <img src="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/ebe5533b-43c7-406a-a8b5-c9f0a2411711" draggable="false" ondragstart="return false; "alt="Quick Actions Menu" title="Quick Actions Menu" width="560px" />
  </picture>
</p>

<br>

## Notes

### Resources

- [Apple Support][apple-guide]

### Contribution

Any suggestions or feedback you may have for improvement are welcome. If you encounter any issues or bugs, please report them to the [issues page][issues].
<br><br>

<p align="center">
  <picture>
    <img src="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/82fd2d06-9e57-47fc-8f07-8d8b5a728a97" draggable="false" ondragstart="return false;" /></>
  </picture>
</p>

<p align="center">
  <a href="https://nicolodiamante.com" target="_blank">
    <img src="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/aa3768d1-9434-4a15-9d01-1b0c984ccb0f" draggable="false" ondragstart="return false;" alt="Nicol&#242; Diamante Portfolio" title="Nicol&#242; Diamante" width="17px" />
  </a>
</p>

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/b407493d-679c-4b7a-b024-e07701700a14" draggable="false" ondragstart="return false;" alt="MIT License" title="MIT License" />
    <img src="https://github.com/nicolodiamante/icloud-nosync/assets/48920263/1c9f157c-7f5d-444f-8c73-dff70c191260" draggable="false" ondragstart="return false; "alt="MIT License" title="MIT License" width="95px" />
  </picture>
</p>

<!-- Link labels: -->

[apple-icloud]: https://www.apple.com/icloud/
[apple-guide]: https://support.apple.com/guide/mac-help/get-file-folder-and-disk-information-on-mac-mchlp1774/11.0/mac/11.0
[issues]: https://github.com/nicolodiamante/icloud-nosync/issues


================================================
FILE: bootstrap.zsh
================================================
#!/bin/zsh

#
# Start iCloud NoSync Installation.
#

# Validate OS.
if [[ "$OSTYPE" != "darwin"* ]]; then
  echo "This script is only compatible with macOS" >&2
  exit 1
fi

# Defines the PATHs.
SOURCE="https://github.com/nicolodiamante/icloud-nosync"
TARBALL="${SOURCE}/tarball/master"
TARGET="${HOME}/icloud-nosync"
TAR_CMD="tar -xzv -C \"${TARGET}\" --strip-components 1 --exclude .gitignore"
INSTALL="${TARGET}/utils/install.zsh"

# Check if a command is executable.
is_executable() {
  command -v "$1" &> /dev/null
}

# Checks which executable is available then downloads and installs.
if is_executable "git"; then
  CMD="git clone ${SOURCE} ${TARGET}"
elif is_executable "curl"; then
  CMD="curl -L ${TARBALL} | ${TAR_CMD}"
elif is_executable "wget"; then
  CMD="wget --no-check-certificate -O - ${TARBALL} | ${TAR_CMD}"
else
  echo 'No git, curl, or wget available. Aborting!'
  exit 1
fi

echo 'Installing iCloud NoSync...'

# Create the target directory and proceed with the chosen download method.
if ! mkdir -p "${TARGET}"; then
  echo "Error: Failed to create target directory. Aborting!" >&2
  exit 1
fi

# Execute the download command and run the installation script.
if eval "${CMD}"; then
  if cd "${TARGET}"; then
    if ! source "${INSTALL}"; then
      echo "Error: Failed to run the install script. Aborting!" >&2
      exit 1
    fi
  else
    echo "Error: Failed to navigate to ${TARGET}. Aborting!" >&2
    exit 1
  fi
else
  echo "Download failed. Aborting!" >&2
  exit 1
fi


================================================
FILE: scripts/iCloud No Sync.workflow/Contents/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSServices</key>
	<array>
		<dict>
			<key>NSBackgroundColorName</key>
			<string>background</string>
			<key>NSIconName</key>
			<string>NSTouchBariCloud</string>
			<key>NSMenuItem</key>
			<dict>
				<key>default</key>
				<string>iCloud No Sync</string>
			</dict>
			<key>NSMessage</key>
			<string>runWorkflowAsService</string>
			<key>NSRequiredContext</key>
			<dict>
				<key>NSApplicationIdentifier</key>
				<string>com.apple.finder</string>
			</dict>
			<key>NSSendFileTypes</key>
			<array>
				<string>public.item</string>
			</array>
		</dict>
	</array>
</dict>
</plist>


================================================
FILE: scripts/iCloud No Sync.workflow/Contents/document.wflow
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>AMApplicationBuild</key>
	<string>509</string>
	<key>AMApplicationVersion</key>
	<string>2.10</string>
	<key>AMDocumentVersion</key>
	<string>2</string>
	<key>actions</key>
	<array>
		<dict>
			<key>action</key>
			<dict>
				<key>AMAccepts</key>
				<dict>
					<key>Container</key>
					<string>List</string>
					<key>Optional</key>
					<true/>
					<key>Types</key>
					<array>
						<string>com.apple.cocoa.string</string>
					</array>
				</dict>
				<key>AMActionVersion</key>
				<string>2.0.3</string>
				<key>AMApplication</key>
				<array>
					<string>Automator</string>
				</array>
				<key>AMParameterProperties</key>
				<dict>
					<key>COMMAND_STRING</key>
					<dict/>
					<key>CheckedForUserDefaultShell</key>
					<dict/>
					<key>inputMethod</key>
					<dict/>
					<key>shell</key>
					<dict/>
					<key>source</key>
					<dict/>
				</dict>
				<key>AMProvides</key>
				<dict>
					<key>Container</key>
					<string>List</string>
					<key>Types</key>
					<array>
						<string>com.apple.cocoa.string</string>
					</array>
				</dict>
				<key>ActionBundlePath</key>
				<string>/System/Library/Automator/Run Shell Script.action</string>
				<key>ActionName</key>
				<string>Run Shell Script</string>
				<key>ActionParameters</key>
				<dict>
					<key>COMMAND_STRING</key>
					<string>NAME="$1"
FILE_NAME="${NAME}.nosync"
DIR_NAME="${NAME}.tmp"

if [ -d "$1" ]; then
  mv "${NAME}" "${DIR_NAME}" &amp;&amp; ln -s "${DIR_NAME}" "${NAME}" &amp;&amp; chflags hidden "${NAME}"
elif [ -f "$1" ]; then
  mv "${NAME}" "${FILE_NAME}" &amp;&amp; ln -s "${FILE_NAME}" "${NAME}" &amp;&amp; chflags hidden "${NAME}"
fi</string>
					<key>CheckedForUserDefaultShell</key>
					<true/>
					<key>inputMethod</key>
					<integer>1</integer>
					<key>shell</key>
					<string>/bin/sh</string>
					<key>source</key>
					<string></string>
				</dict>
				<key>BundleIdentifier</key>
				<string>com.apple.RunShellScript</string>
				<key>CFBundleVersion</key>
				<string>2.0.3</string>
				<key>CanShowSelectedItemsWhenRun</key>
				<false/>
				<key>CanShowWhenRun</key>
				<true/>
				<key>Category</key>
				<array>
					<string>AMCategoryUtilities</string>
				</array>
				<key>Class Name</key>
				<string>RunShellScriptAction</string>
				<key>InputUUID</key>
				<string>C1FF256B-B0E9-49B3-9B29-1EAC33F28FAF</string>
				<key>Keywords</key>
				<array>
					<string>Shell</string>
					<string>Script</string>
					<string>Command</string>
					<string>Run</string>
					<string>Unix</string>
				</array>
				<key>OutputUUID</key>
				<string>48CF9AED-0B52-4174-A385-9CA96C043332</string>
				<key>UUID</key>
				<string>B28FCA34-9B06-42EC-B7EE-F8618598FA2C</string>
				<key>UnlocalizedApplications</key>
				<array>
					<string>Automator</string>
				</array>
				<key>arguments</key>
				<dict>
					<key>0</key>
					<dict>
						<key>default value</key>
						<integer>0</integer>
						<key>name</key>
						<string>inputMethod</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>0</string>
					</dict>
					<key>1</key>
					<dict>
						<key>default value</key>
						<false/>
						<key>name</key>
						<string>CheckedForUserDefaultShell</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>1</string>
					</dict>
					<key>2</key>
					<dict>
						<key>default value</key>
						<string></string>
						<key>name</key>
						<string>source</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>2</string>
					</dict>
					<key>3</key>
					<dict>
						<key>default value</key>
						<string></string>
						<key>name</key>
						<string>COMMAND_STRING</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>3</string>
					</dict>
					<key>4</key>
					<dict>
						<key>default value</key>
						<string>/bin/sh</string>
						<key>name</key>
						<string>shell</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>4</string>
					</dict>
				</dict>
				<key>isViewVisible</key>
				<true/>
				<key>location</key>
				<string>671.500000:305.000000</string>
				<key>nibPath</key>
				<string>/System/Library/Automator/Run Shell Script.action/Contents/Resources/Base.lproj/main.nib</string>
			</dict>
			<key>isViewVisible</key>
			<true/>
		</dict>
	</array>
	<key>connectors</key>
	<dict/>
	<key>workflowMetaData</key>
	<dict>
		<key>applicationBundleID</key>
		<string>com.apple.finder</string>
		<key>applicationBundleIDsByPath</key>
		<dict>
			<key>/System/Library/CoreServices/Finder.app</key>
			<string>com.apple.finder</string>
		</dict>
		<key>applicationPath</key>
		<string>/System/Library/CoreServices/Finder.app</string>
		<key>applicationPaths</key>
		<array>
			<string>/System/Library/CoreServices/Finder.app</string>
		</array>
		<key>inputTypeIdentifier</key>
		<string>com.apple.Automator.fileSystemObject</string>
		<key>outputTypeIdentifier</key>
		<string>com.apple.Automator.nothing</string>
		<key>presentationMode</key>
		<integer>15</integer>
		<key>processesInput</key>
		<integer>0</integer>
		<key>serviceApplicationBundleID</key>
		<string>com.apple.finder</string>
		<key>serviceApplicationPath</key>
		<string>/System/Library/CoreServices/Finder.app</string>
		<key>serviceInputTypeIdentifier</key>
		<string>com.apple.Automator.fileSystemObject</string>
		<key>serviceOutputTypeIdentifier</key>
		<string>com.apple.Automator.nothing</string>
		<key>serviceProcessesInput</key>
		<integer>0</integer>
		<key>systemImageName</key>
		<string>NSTouchBariCloud</string>
		<key>useAutomaticInputType</key>
		<integer>0</integer>
		<key>workflowTypeIdentifier</key>
		<string>com.apple.Automator.servicesMenu</string>
	</dict>
</dict>
</plist>


================================================
FILE: scripts/iCloud Sync.workflow/Contents/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSServices</key>
	<array>
		<dict>
			<key>NSBackgroundColorName</key>
			<string>background</string>
			<key>NSIconName</key>
			<string>NSTouchBariCloud</string>
			<key>NSMenuItem</key>
			<dict>
				<key>default</key>
				<string>iCloud Sync</string>
			</dict>
			<key>NSMessage</key>
			<string>runWorkflowAsService</string>
			<key>NSRequiredContext</key>
			<dict>
				<key>NSApplicationIdentifier</key>
				<string>com.apple.finder</string>
			</dict>
			<key>NSSendFileTypes</key>
			<array>
				<string>public.item</string>
			</array>
		</dict>
	</array>
</dict>
</plist>


================================================
FILE: scripts/iCloud Sync.workflow/Contents/document.wflow
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>AMApplicationBuild</key>
	<string>492</string>
	<key>AMApplicationVersion</key>
	<string>2.10</string>
	<key>AMDocumentVersion</key>
	<string>2</string>
	<key>actions</key>
	<array>
		<dict>
			<key>action</key>
			<dict>
				<key>AMAccepts</key>
				<dict>
					<key>Container</key>
					<string>List</string>
					<key>Optional</key>
					<true/>
					<key>Types</key>
					<array>
						<string>com.apple.cocoa.string</string>
					</array>
				</dict>
				<key>AMActionVersion</key>
				<string>2.0.3</string>
				<key>AMApplication</key>
				<array>
					<string>Automator</string>
				</array>
				<key>AMParameterProperties</key>
				<dict>
					<key>COMMAND_STRING</key>
					<dict/>
					<key>CheckedForUserDefaultShell</key>
					<dict/>
					<key>inputMethod</key>
					<dict/>
					<key>shell</key>
					<dict/>
					<key>source</key>
					<dict/>
				</dict>
				<key>AMProvides</key>
				<dict>
					<key>Container</key>
					<string>List</string>
					<key>Types</key>
					<array>
						<string>com.apple.cocoa.string</string>
					</array>
				</dict>
				<key>ActionBundlePath</key>
				<string>/System/Library/Automator/Run Shell Script.action</string>
				<key>ActionName</key>
				<string>Run Shell Script</string>
				<key>ActionParameters</key>
				<dict>
					<key>COMMAND_STRING</key>
					<string>TEMP="$(readlink "$1")"

if [[ -L "$1" ]]; then
  rm -rf "$1" &amp;&amp; cp -rf "${TEMP}" "$1" &amp;&amp; rm -rf "${TEMP}"
fi</string>
					<key>CheckedForUserDefaultShell</key>
					<true/>
					<key>inputMethod</key>
					<integer>1</integer>
					<key>shell</key>
					<string>/bin/sh</string>
					<key>source</key>
					<string></string>
				</dict>
				<key>BundleIdentifier</key>
				<string>com.apple.RunShellScript</string>
				<key>CFBundleVersion</key>
				<string>2.0.3</string>
				<key>CanShowSelectedItemsWhenRun</key>
				<false/>
				<key>CanShowWhenRun</key>
				<true/>
				<key>Category</key>
				<array>
					<string>AMCategoryUtilities</string>
				</array>
				<key>Class Name</key>
				<string>RunShellScriptAction</string>
				<key>InputUUID</key>
				<string>7D0D2AF0-F6C0-4EAC-AF4D-C5CCD5F16301</string>
				<key>Keywords</key>
				<array>
					<string>Shell</string>
					<string>Script</string>
					<string>Command</string>
					<string>Run</string>
					<string>Unix</string>
				</array>
				<key>OutputUUID</key>
				<string>B765991D-EFFE-419E-8534-BF253C123C9A</string>
				<key>UUID</key>
				<string>9F187A6A-053D-47B4-88F8-37AE5A9CC4EB</string>
				<key>UnlocalizedApplications</key>
				<array>
					<string>Automator</string>
				</array>
				<key>arguments</key>
				<dict>
					<key>0</key>
					<dict>
						<key>default value</key>
						<integer>0</integer>
						<key>name</key>
						<string>inputMethod</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>0</string>
					</dict>
					<key>1</key>
					<dict>
						<key>default value</key>
						<false/>
						<key>name</key>
						<string>CheckedForUserDefaultShell</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>1</string>
					</dict>
					<key>2</key>
					<dict>
						<key>default value</key>
						<string></string>
						<key>name</key>
						<string>source</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>2</string>
					</dict>
					<key>3</key>
					<dict>
						<key>default value</key>
						<string></string>
						<key>name</key>
						<string>COMMAND_STRING</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>3</string>
					</dict>
					<key>4</key>
					<dict>
						<key>default value</key>
						<string>/bin/sh</string>
						<key>name</key>
						<string>shell</string>
						<key>required</key>
						<string>0</string>
						<key>type</key>
						<string>0</string>
						<key>uuid</key>
						<string>4</string>
					</dict>
				</dict>
				<key>isViewVisible</key>
				<true/>
				<key>location</key>
				<string>624.750000:305.000000</string>
				<key>nibPath</key>
				<string>/System/Library/Automator/Run Shell Script.action/Contents/Resources/Base.lproj/main.nib</string>
			</dict>
			<key>isViewVisible</key>
			<true/>
		</dict>
	</array>
	<key>connectors</key>
	<dict/>
	<key>workflowMetaData</key>
	<dict>
		<key>applicationBundleID</key>
		<string>com.apple.finder</string>
		<key>applicationBundleIDsByPath</key>
		<dict>
			<key>/System/Library/CoreServices/Finder.app</key>
			<string>com.apple.finder</string>
		</dict>
		<key>applicationPath</key>
		<string>/System/Library/CoreServices/Finder.app</string>
		<key>applicationPaths</key>
		<array>
			<string>/System/Library/CoreServices/Finder.app</string>
		</array>
		<key>inputTypeIdentifier</key>
		<string>com.apple.Automator.fileSystemObject</string>
		<key>outputTypeIdentifier</key>
		<string>com.apple.Automator.nothing</string>
		<key>presentationMode</key>
		<integer>15</integer>
		<key>processesInput</key>
		<integer>0</integer>
		<key>serviceApplicationBundleID</key>
		<string>com.apple.finder</string>
		<key>serviceApplicationPath</key>
		<string>/System/Library/CoreServices/Finder.app</string>
		<key>serviceInputTypeIdentifier</key>
		<string>com.apple.Automator.fileSystemObject</string>
		<key>serviceOutputTypeIdentifier</key>
		<string>com.apple.Automator.nothing</string>
		<key>serviceProcessesInput</key>
		<integer>0</integer>
		<key>systemImageName</key>
		<string>NSTouchBariCloud</string>
		<key>useAutomaticInputType</key>
		<integer>0</integer>
		<key>workflowTypeIdentifier</key>
		<string>com.apple.Automator.servicesMenu</string>
	</dict>
</dict>
</plist>


================================================
FILE: utils/install.zsh
================================================
#!/bin/zsh

#
# Install iCloud NoSync.
#

# Detects the Operating System
if [[ "$OSTYPE" != "darwin"* ]]; then
  echo "This script is only compatible with macOS" >&2
  exit 1
fi

# Define the Services directory
APPLE_SERVICES="${HOME}/Library/Services"

# Detects which macOS version
SW_VERS=$(sw_vers -buildVersion)
OS_VERS=$(sed -E -e 's/([0-9]{2}).*/\1/' <<< "$SW_VERS")
if [[ "$OS_VERS" -ge 14 ]]; then
  echo "\niCloud NoSync: Starting the installation process..."

  # Copies files into the Services directory using the absolute path.
  if cp -r "${0:A:h}/../scripts/iCloud No Sync.workflow" "${APPLE_SERVICES}" && \
    cp -r "${0:A:h}/../scripts/iCloud Sync.workflow" "${APPLE_SERVICES}"; then
    echo "iCloud NoSync: The workflow files have been copied into the Services directory."

    echo "\niCloud NoSync: Opening the Privacy & Security Panel in System Settings..."
    sleep 2 && open "x-apple.systempreferences:com.apple.preferences.extensions"

    # Guide the user to enable the Quick Actions in Finder.
    echo "\niCloud NoSync: From the Privacy & Security Panel open Finder."
    echo "iCloud NoSync: Check 'iCloud No Sync' and 'iCloud Sync' Quick Actions."
  else
    echo "iCloud NoSync: Error occurred while copying the workflow files." >&2
    exit 1
  fi
else
  echo "\niCloud NoSync:"
  echo "Looks like this Mac is running an earlier version of macOS. "
  echo "To be able to use and sync files, iCloud Drive requires     "
  echo "OS X Yosemite 10.10 or a later version of system software.  "
  echo "Please visit: https://support.apple.com/en-us/HT204025      "
fi


================================================
FILE: utils/uninstall.zsh
================================================
#!/bin/zsh

#
# Uninstall iCloud NoSync.
#

# Detects the Operating System.
if [[ "$OSTYPE" != "darwin"* ]]; then
  echo "This script is only compatible with macOS" >&2
  exit 1
fi

echo "\niCloud NoSync: Starting the removal process..."

# Defines the Services directory and the workflow files.
APPLE_SERVICES="${HOME}/Library/Services"
NO_SYNC=iCloud\ No\ Sync.workflow
SYNC=iCloud\ Sync.workflow

# Removes workflow files inside the Services directory.
for file in "${APPLE_SERVICES}"/{"$NO_SYNC","$SYNC"}; do
  [[ -r "$file" ]] && rm -rf "${file}"
done

# Prints a success message.
echo "iCloud NoSync: The workflow files have been removed."
Download .txt
gitextract_8ngt5gwz/

├── .gitignore
├── LICENSE.md
├── README.md
├── bootstrap.zsh
├── scripts/
│   ├── iCloud No Sync.workflow/
│   │   └── Contents/
│   │       ├── Info.plist
│   │       └── document.wflow
│   └── iCloud Sync.workflow/
│       └── Contents/
│           ├── Info.plist
│           └── document.wflow
└── utils/
    ├── install.zsh
    └── uninstall.zsh
Condensed preview — 10 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (29K chars).
[
  {
    "path": ".gitignore",
    "chars": 30,
    "preview": "#\n# Ignore\n#\n\n*.swp\n.DS_Store\n"
  },
  {
    "path": "LICENSE.md",
    "chars": 1102,
    "preview": "The MIT License (MIT)\n\n&#169; 2024 Nicolò Diamante <hello@nicolodiamante.com>\n\nPermission is hereby granted, free of cha"
  },
  {
    "path": "README.md",
    "chars": 6355,
    "preview": "<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/nicolodiamant"
  },
  {
    "path": "bootstrap.zsh",
    "chars": 1499,
    "preview": "#!/bin/zsh\n\n#\n# Start iCloud NoSync Installation.\n#\n\n# Validate OS.\nif [[ \"$OSTYPE\" != \"darwin\"* ]]; then\n  echo \"This s"
  },
  {
    "path": "scripts/iCloud No Sync.workflow/Contents/Info.plist",
    "chars": 764,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "scripts/iCloud No Sync.workflow/Contents/document.wflow",
    "chars": 6253,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "scripts/iCloud Sync.workflow/Contents/Info.plist",
    "chars": 761,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "scripts/iCloud Sync.workflow/Contents/document.wflow",
    "chars": 6057,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "utils/install.zsh",
    "chars": 1596,
    "preview": "#!/bin/zsh\n\n#\n# Install iCloud NoSync.\n#\n\n# Detects the Operating System\nif [[ \"$OSTYPE\" != \"darwin\"* ]]; then\n  echo \"T"
  },
  {
    "path": "utils/uninstall.zsh",
    "chars": 646,
    "preview": "#!/bin/zsh\n\n#\n# Uninstall iCloud NoSync.\n#\n\n# Detects the Operating System.\nif [[ \"$OSTYPE\" != \"darwin\"* ]]; then\n  echo"
  }
]

About this extraction

This page contains the full source code of the nicolodiamante/icloud-nosync GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 10 files (24.5 KB), approximately 8.2k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!