Skip to content

Instantly share code, notes, and snippets.

@thuanpham582002
Created December 12, 2024 04:26
Show Gist options
  • Save thuanpham582002/2bd4f24b3d87304fc7950dd7a2ca3d01 to your computer and use it in GitHub Desktop.
Save thuanpham582002/2bd4f24b3d87304fc7950dd7a2ca3d01 to your computer and use it in GitHub Desktop.
Refresh Freetrial Cursor on Macos
# Clean cache
sudo rm -rf ~/Library/Application Support/Cursor
# Change mac id
#!/bin/bash
new_machine_id=$(uuidgen | tr '[:upper:]' '[:lower:]')
new_dev_device_id=$(uuidgen | tr '[:upper:]' '[:lower:]')
new_mac_machine_id=$(openssl rand -hex 32)
echo $new_machine_id > ~/Library/Application\ Support/Cursor/machineid
sed -i '' "s/\"telemetry.devDeviceId\": \".*\"/\"telemetry.devDeviceId\": \"$new_dev_device_id\"/" ~/Library/Application\ Support/Cursor/User/globalStorage/storage.json
sed -i '' "s/\"telemetry.macMachineId\": \".*\"/\"telemetry.macMachineId\": \"$new_mac_machine_id\"/" ~/Library/Application\ Support/Cursor/User/globalStorage/storage.json
@thuanpham582002
Copy link
Author

thuanpham582002 commented Dec 12, 2024

usage:

curl -s https://gist.githubusercontent.com/thuanpham582002/2bd4f24b3d87304fc7950dd7a2ca3d01/raw/3f3b6c05d323605fc1a638f4b1d5a0de345ec5e1/run.sh | bash -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment