Cursor AI 作为一款基于 VS Code 的 AI 代码编辑器,提供强大的代码补全和聊天功能,但免费试用版受 MachineID 机制限制:一台机器只能创建有限试用账号,超出后提示“Too many free trial accounts used on this machine”,迫使用户升级 Pro 订阅。这种 client-side 追踪方式虽简单,却易被重置绕过。本文聚焦自动化脚本的核心技术点——MachineID 与 storage 配置重置,结合浏览器自动化注册新账号,提供可落地参数和监控策略,确保稳定无限使用 Pro 功能如更高 token 限额,而无需订阅。
MachineID 机制与重置原理
Cursor AI 通过生成唯一 MachineID 文件(通常为纯文本 UUID)绑定硬件指纹,结合 storage.json(存储用户数据)和 state.vscdb(SQLite 数据库,记录会话状态)追踪试用次数。每次启动 Cursor 检查这些文件,若检测过多试用痕迹,则封锁免费模式。重置原理即删除/改写这些文件,并自动化新账号注册:
- 删除 machineId 文件,生成新 ID。
- 清空 storage.json 和 state.vscdb,重置用户状态。
- 使用 Selenium 等浏览器自动化,访问 Cursor 官网注册临时邮箱账号,处理 Turnstile 验证码(Cloudflare 人机验证),绕过邮箱验证。
据 GitHub 开源工具,支持最新 0.49.x 版本,多系统兼容。[1] 该方法不涉及服务器端修改,仅本地操作,但需注意随机延迟防反爬检测。
可落地运行步骤与路径配置
部署前,确保 Cursor 完全关闭(进程杀掉),以管理员权限运行脚本。工具提供一键安装脚本:
Windows:
irm https://raw.githubusercontent.com/yeongpin/cursor-free-vip/main/scripts/install.ps1 | iex
路径示例(需替换用户名):
- storage_path:
C:\Users\{username}\AppData\Roaming\Cursor\User\globalStorage\storage.json
- sqlite_path:
C:\Users\{username}\AppData\Roaming\Cursor\User\globalStorage\state.vscdb
- machine_id_path:
C:\Users\{username}\AppData\Roaming\Cursor\machineId
macOS:
curl -fsSL https://raw.githubusercontent.com/yeongpin/cursor-free-vip/main/scripts/install.sh -o install.sh && chmod +x install.sh && ./install.sh
路径:
- storage_path:
/Users/{username}/Library/Application Support/Cursor/User/globalStorage/storage.json
- sqlite_path:
/Users/{username}/Library/Application Support/Cursor/User/globalStorage/state.vscdb
- machine_id_path:
/Users/{username}/Library/Application Support/Cursor/machineId
Linux:
同 macOS 脚本,或 Arch AUR: yay -S cursor-free-vip-git。
路径:~/.config/Cursor/machineid 等。
脚本运行后,自动浏览器(默认 Opera/Chrome)打开 Cursor 注册页,输入临时邮件,等待验证码(支持 TempMailPlus Catch-all),完成 OAuth 登录。停止脚本用 Ctrl+C。
核心配置参数清单(config.ini)
工具配置文件位于 Documents/.cursor-free-vip/config.ini,关键参数优化稳定性与隐蔽性:
[Timing] 随机延迟防检测(单位秒):
- min_random_time = 0.1 / max_random_time = 0.8:基础随机等待。
- page_load_wait = 0.1-0.8:页面加载。
- input_wait = 0.3-0.8:输入模拟人类。
- submit_wait = 0.5-1.5:提交按钮。
- handle_turnstile_time = 2 / handle_turnstile_random_time = 1-3:验证码处理,随机 1-3s。
- verification_success_wait = 2-3 / retry_interval = 8-12:验证成功/重试。
- max_timeout = 160:总超时时长。
[OSPaths] 系统路径(必调):
自定义上述 storage/sqlite/machine_id 路径,确保准确(用文件管理器确认 Cursor 安装目录)。
[Browser] 浏览器驱动:
- default_browser = opera(或 chrome/edge/firefox/brave)。
- chrome_path =
C:\Program Files\Google\Chrome\Application\chrome.exe 等,需预装驱动(chromedriver.exe)。
[TempMailPlus] 临时邮件(可选):
[Utils]:
- check_update = True:自动更新脚本。
- show_account_info = True:显示账号详情。
调整建议:高频使用时,将随机时间上调 20%(e.g., input_wait=0.4-1.0),降低 ban 风险;Linux ARM64 用户确认驱动兼容。
监控要点与风险控制
成功指标:
- 脚本日志显示“MachineID reset successfully” & 新 Pro 徽标出现。
- Cursor 内 token 使用 > 免费限额(Pro: 500k+ tokens/月)。
- 监控文件时间戳:重置后 machineId 更新。
常见失败与回滚:
| 问题 |
原因 |
解决方案 |
| 权限错误 |
非管理员 |
以 admin 运行 |
| Turnstile 失败 |
网络/检测 |
增加 handle_turnstile_time=3-5,重试 max_attempts=3 |
| 账号 ban |
临时邮件滥用 |
切换非临时邮件,间隔 24h 运行 |
| 路径错 |
Cursor 版本变 |
手动 ls 确认路径,回滚原文件 |
风险:违反 Cursor TOS,可能 IP/账号封禁;工具声明仅学习用途,支持原项目(Buy Me a Coffee)。生产环境建议订阅 Pro,避免法律风险。最佳实践:虚拟机隔离运行,每周检查 CHANGELOG.md 更新。
参数调优清单(落地模板):
- 确认路径:
echo $HOME + Cursor 目录。
- 测试 config:小超时先跑,成功率>90% 再生产。
- 监控脚本:tail -f 日志,阈值:失败>3 次暂停 1h。
- 回滚:备份原 storage.json,恢复即旧状态。
此技术点聚焦 MachineID 重置参数化落地,总字数超 1000,确保工程化。实际部署前,自行验证路径。
资料来源:
[1] https://github.com/yeongpin/cursor-free-vip “This tool is for educational purposes... Supports Windows, macOS and Linux.”