💡本人使用macos (ventura 13.0.1)系统,cursor版本0.46.8,亲测有效,仅做学习教程。
💡本人使用windows测试也ok
到cursor中国官网下载自己系统对应的版本,下载之后,在网关注册账户即可使用。
💡cursor提供2周的免费使用,无限使用也是利用这个方式不断免费使用。
接下来就是2周到期后的重新使用的流程:
1. 先关闭cursor软件,然后修改机器码,参考链接修改机器码
2. 在官网重新注册账户
这里利用到一个小技巧:比如你的邮箱xxx@hotmail.com,用xxx+1@hotmail.com,xxx+2@hotmail.com再次注册即可,邮件还是会发送到你的邮箱。但是cursor会认为不同的邮箱,所有可以继续注册新账户(什么时候cursor修复这个问题,这个方式就不能用了)
💡qq邮箱测试不支持这个小技巧,可采用其他无限邮箱方式
同一个邮箱也不要同时注册多个cursor账户,先在cursor平台上删除老账户
3. 重新打开cursor软件,登陆新账户就又开始试用了
以下是修改机器码的脚本:
macos脚本:保存为cursor-recode.sh,重置机器码时运行下即可
#!/bin/bash
new_machine_id=$(uuidgen | tr '[:upper:]' '[:lower:]')
new_dev_device_id=$(uuidgen | tr '[:upper:]' '[:lower:]')
new_mac_machine_id=$(openssl rand -hex 64)
new_machine_id=$(openssl rand -hex 64)
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
sed -i '' "s/\"telemetry.machineId\": \".*\"/\"telemetry.machineId\": \"$new_machine_id\"/" ~/Library/Application\ Support/Cursor/User/globalStorage/storage.json
windows脚本:保存为cursor_recode.ps1,powershell运行
运行之前先需要调整信任策略,输入:Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
# 生成新的 UUID 并转换为小写
$new_machine_id = [guid]::NewGuid().ToString().ToLower()
$new_dev_device_id = [guid]::NewGuid().ToString().ToLower()
# 生成 64 字节的随机十六进制字符串
$new_mac_machine_id = -join ((1..64) | ForEach-Object { "{0:x}" -f (Get-Random -Max 16) })
$new_machine_id = -join ((1..64) | ForEach-Object { "{0:x}" -f (Get-Random -Max 16) })
# 定义文件路径
$machine_id_path = "$env:APPDATA\Cursor\machineid"
$storage_json_path = "$env:APPDATA\Cursor\User\globalStorage\storage.json"
# 备份原始文件
Copy-Item $machine_id_path "$machine_id_path.backup" -ErrorAction SilentlyContinue
Copy-Item $storage_json_path "$storage_json_path.backup" -ErrorAction SilentlyContinue
# 更新 machineid 文件
$new_machine_id | Out-File -FilePath $machine_id_path -Encoding UTF8 -NoNewline
# 读取并更新 storage.json 文件
$content = Get-Content $storage_json_path -Raw | ConvertFrom-Json
$content.'telemetry.devDeviceId' = $new_dev_device_id
$content.'telemetry.macMachineId' = $new_mac_machine_id
$content.'telemetry.machineId' = $new_machine_id
# 保存更新后的 storage.json 文件
$content | ConvertTo-Json -Depth 100 | Out-File $storage_json_path -Encoding UTF8
以防版本更新后不能使用,打开cursor设置关闭软件的自动更新: