Skip to content

Commit 6cc2851

Browse files
committed
feat: Enhance installation script and main.go for improved user experience
- Updated `install.sh` to include new configuration options for binary retention and download directory, enhancing user flexibility. - Improved error handling and user feedback in the installation process, including clearer messages for network connectivity and binary verification. - Added a cleanup function for old versions of the binary to streamline the installation process. - Refactored `main.go` to improve language detection and configuration management, ensuring better usability across different systems. - Enhanced README.md with updated installation instructions and clearer descriptions of features and system support. These changes collectively improve the installation experience and provide users with more control and clarity during setup.
1 parent 490edb4 commit 6cc2851

File tree

3 files changed

+601
-718
lines changed

3 files changed

+601
-718
lines changed

README.md

Lines changed: 43 additions & 242 deletions
Original file line numberDiff line numberDiff line change
@@ -2,163 +2,60 @@
22

33
<div align="center">
44

5-
[![Release](https://img.shields.io/github/v/release/yuaotian/go-cursor-help?style=for-the-badge&logo=github&color=blue)](https://github.com/yuaotian/go-cursor-help/releases/latest)
6-
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge&logo=bookstack)](https://github.com/yuaotian/go-cursor-help/blob/main/LICENSE)
7-
[![Stars](https://img.shields.io/github/stars/yuaotian/go-cursor-help?style=for-the-badge&logo=github)](https://github.com/yuaotian/go-cursor-help/stargazers)
5+
[![Release](https://img.shields.io/github/v/release/yuaotian/go-cursor-help?style=flat-square&logo=github&color=blue)](https://github.com/yuaotian/go-cursor-help/releases/latest)
6+
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&logo=bookstack)](https://github.com/yuaotian/go-cursor-help/blob/main/LICENSE)
7+
[![Stars](https://img.shields.io/github/stars/yuaotian/go-cursor-help?style=flat-square&logo=github)](https://github.com/yuaotian/go-cursor-help/stargazers)
88

99
[English](#english) | [中文](#chinese)
1010

11-
---
12-
13-
<img src="https://ai-cursor.com/wp-content/uploads/2024/09/logo-cursor-ai-png.webp" alt="Cursor Logo" width="150"/>
11+
<img src="https://ai-cursor.com/wp-content/uploads/2024/09/logo-cursor-ai-png.webp" alt="Cursor Logo" width="120"/>
1412

1513
</div>
1614

17-
## ⚠️ Important Notice | 重要声明
18-
19-
<table>
20-
<tr>
21-
<td>
22-
2315
<a name="english"></a>
2416

2517
## 🌟 English
2618

2719
### 📝 Description
2820

29-
A tool to resolve the following prompt issue during Cursor's free trial period:
21+
Resets Cursor's free trial limitation when you see:
3022

31-
<table>
32-
<tr>
33-
<td>
34-
<pre>
23+
```
3524
Too many free trial accounts used on this machine.
3625
Please upgrade to pro. We have this limit in place
3726
to prevent abuse. Please let us know if you believe
3827
this is a mistake.
39-
</pre>
40-
</td>
41-
</tr>
42-
</table>
43-
44-
### ✨ Features
45-
46-
- 🔄 Reset Cursor free trial limitations
47-
- 🔍 Automatic detection and closing of running instances
48-
- 🌐 Cross-platform support with architecture detection
49-
- 📦 Automated installation scripts
50-
- 🖥️ Both GUI and command-line interfaces
28+
```
5129

5230
### 💻 System Support
5331

54-
| Platform | Status |
55-
| ----------------------------------------------------------------------------------------------- | ---------------------- |
56-
| ![Windows](https://img.shields.io/badge/Windows-0078D6?style=flat&logo=windows&logoColor=white) | ✅ x64 |
57-
| ![macOS](https://img.shields.io/badge/macOS-000000?style=flat&logo=apple&logoColor=white) | ✅ Intel/Apple Silicon |
58-
| ![Linux](https://img.shields.io/badge/Linux-FCC624?style=flat&logo=linux&logoColor=black) | ✅ x64/ARM64 |
59-
60-
### 📥 Installation Methods
32+
**Windows** ✅ x64
33+
**macOS** ✅ Intel & M-series
34+
**Linux** ✅ x64 & ARM64
6135

62-
<details open>
63-
<summary><b>1️⃣ Automated Installation (Recommended)</b></summary>
64-
65-
#### Linux/macOS
36+
### 📥 Installation
6637

38+
**Linux/macOS**
6739
```bash
68-
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/install.sh | sudo bash
40+
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/install.sh | bash -s -- --auto-sudo && rm -f /tmp/cursor_id_modifier_*
6941
```
7042

71-
#### Windows PowerShell
72-
43+
**Windows** (Run in PowerShell as Admin)
7344
```powershell
74-
# Download and run with admin privileges
75-
$url = "https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/bin/cursor_id_modifier_v2.0.0_windows_amd64.exe"
76-
$output = "$env:TEMP\cursor-id-modifier.exe"
77-
Invoke-WebRequest -Uri $url -OutFile $output
78-
Start-Process -FilePath $output -Verb RunAs
45+
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/bin/cursor_id_modifier_v2.0.0_windows_amd64.exe')); Remove-Item -Path "$env:TEMP\cursor-id-modifier.exe" -ErrorAction SilentlyContinue
7946
```
8047

81-
</details>
82-
83-
<details>
84-
<summary><b>2️⃣ Manual Download</b></summary>
85-
86-
Download from [Releases](https://github.com/yuaotian/go-cursor-help/releases/latest):
87-
88-
| Platform | Architecture | File |
89-
| ----------------------------------------------------------------------------------------------- | ------------- | -------------------------- |
90-
| ![Windows](https://img.shields.io/badge/Windows-0078D6?style=flat&logo=windows&logoColor=white) | x64 | `cursor-id-modifier.exe` |
91-
| ![macOS](https://img.shields.io/badge/macOS-000000?style=flat&logo=apple&logoColor=white) | Intel (x64) | `cursor-id-modifier-amd64` |
92-
| ![macOS](https://img.shields.io/badge/macOS-000000?style=flat&logo=apple&logoColor=white) | Apple Silicon | `cursor-id-modifier-arm64` |
93-
| ![Linux](https://img.shields.io/badge/Linux-FCC624?style=flat&logo=linux&logoColor=black) | x64 | `cursor-id-modifier` |
94-
| ![Linux](https://img.shields.io/badge/Linux-FCC624?style=flat&logo=linux&logoColor=black) | ARM64 | `cursor-id-modifier-arm64` |
95-
96-
</details>
97-
98-
### 📚 Usage Instructions
99-
100-
<details>
101-
<summary>Prerequisites</summary>
102-
103-
- 👑 Administrator/root privileges required
104-
- 🚫 Cursor should be completely closed
105-
- 🌐 Internet connection for installation
106-
107-
</details>
108-
109-
<details>
110-
<summary>Running the Tool</summary>
111-
112-
The tool will automatically:
113-
114-
1. 🔑 Check for and request admin privileges
115-
2. 🔍 Detect and close Cursor instances
116-
3. 💾 Backup existing configuration
117-
4. 🔄 Generate new identifiers
118-
5. ✅ Apply changes
119-
120-
Restart Cursor after completion.
121-
122-
</details>
123-
124-
### 🔧 Troubleshooting
125-
126-
<details>
127-
<summary>Common Issues</summary>
128-
129-
#### 🚫 Permission Denied
130-
131-
- Windows: Right-click → "Run as Administrator"
132-
- Linux/macOS: Use \`sudo\` when running
133-
134-
#### ⚠️ Cursor Still Running
135-
136-
- Tool will attempt auto-close
137-
- Manual close via Task Manager if needed
138-
139-
#### 🔒 macOS Security
140-
141-
If you see "unidentified developer" warning:
142-
143-
1. Right-click → Open
144-
2. Click "Open" in dialog
145-
146-
</details>
147-
148-
### ⚠️ Cautions
149-
150-
- 🛡️ Use at your own risk
151-
- 💾 Backup important data
152-
- 📚 Educational purposes only
48+
### 🔧 Technical Details
15349

154-
### 🤝 Contributing
50+
The program modifies Cursor's `storage.json` config file:
51+
- Windows: `%APPDATA%\Cursor\User\globalStorage\`
52+
- macOS: `~/Library/Application Support/Cursor/User/globalStorage/`
53+
- Linux: `~/.config/Cursor/User/globalStorage/`
15554

156-
We welcome contributions! Please ensure:
157-
158-
- ✅ Cross-platform compatibility
159-
- 🚫 No breaking changes
160-
- 🔍 Proper error handling
161-
- 📝 Documentation updates
55+
Generates new unique identifiers for:
56+
- `telemetry.machineId`
57+
- `telemetry.macMachineId`
58+
- `telemetry.devDeviceId`
16259

16360
---
16461

@@ -168,140 +65,44 @@ We welcome contributions! Please ensure:
16865

16966
### 📝 问题描述
17067

171-
解决Cursor在免费订阅期间出现以下提示的问题:
68+
当看到以下提示时重置Cursor试用期:
17269

173-
<table>
174-
<tr>
175-
<td>
176-
<pre>
70+
```
17771
Too many free trial accounts used on this machine.
17872
Please upgrade to pro. We have this limit in place
17973
to prevent abuse. Please let us know if you believe
18074
this is a mistake.
181-
</pre>
182-
</td>
183-
</tr>
184-
</table>
185-
186-
### ✨ 功能特性
187-
188-
- 🔄 重置Cursor免费试用限制
189-
- 🔍 自动检测和关闭运行中的实例
190-
- 🌐 跨平台支持,自动检测系统架构
191-
- 📦 自动化安装脚本
192-
- 🖥️ 支持图形界面和命令行
75+
```
19376

19477
### 💻 系统支持
19578

196-
| 平台 | 状态 |
197-
| ----------------------------------------------------------------------------------------------- | ---------------------- |
198-
| ![Windows](https://img.shields.io/badge/Windows-0078D6?style=flat&logo=windows&logoColor=white) | ✅ x64 |
199-
| ![macOS](https://img.shields.io/badge/macOS-000000?style=flat&logo=apple&logoColor=white) | ✅ Intel/Apple Silicon |
200-
| ![Linux](https://img.shields.io/badge/Linux-FCC624?style=flat&logo=linux&logoColor=black) | ✅ x64/ARM64 |
79+
**Windows** ✅ x64
80+
**macOS** ✅ Intel和M系列
81+
**Linux** ✅ x64和ARM64
20182

20283
### 📥 安装方法
20384

204-
<details open>
205-
<summary><b>1️⃣ 自动安装(推荐)</b></summary>
206-
207-
#### Linux/macOS
208-
209-
85+
**Linux/macOS**
21086
```bash
211-
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/install.sh | sudo bash
87+
curl -fsSL https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/install.sh | bash -s -- --auto-sudo && rm -f /tmp/cursor_id_modifier_*
21288
```
21389

214-
#### Windows PowerShell
215-
90+
**Windows** (以管理员身份运行PowerShell)
21691
```powershell
217-
# 下载管理员运行
218-
$url = "https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/bin/cursor_id_modifier_v2.0.0_windows_amd64.exe"
219-
$output = "$env:TEMP\cursor-id-modifier.exe"
220-
Invoke-WebRequest -Uri $url -OutFile $output
221-
Start-Process -FilePath $output -Verb RunAs
92+
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/yuaotian/go-cursor-help/refs/heads/master/bin/cursor_id_modifier_v2.0.0_windows_amd64.exe')); Remove-Item -Path "$env:TEMP\cursor-id-modifier.exe" -ErrorAction SilentlyContinue
22293
```
22394

224-
</details>
225-
226-
<details>
227-
<summary><b>2️⃣ 手动下载</b></summary>
228-
229-
[发布页面](https://github.com/yuaotian/go-cursor-help/releases/latest)下载:
230-
231-
| 平台 | 架构 | 文件 |
232-
| ----------------------------------------------------------------------------------------------- | ------------- | -------------------------- |
233-
| ![Windows](https://img.shields.io/badge/Windows-0078D6?style=flat&logo=windows&logoColor=white) | x64 | `cursor-id-modifier.exe` |
234-
| ![macOS](https://img.shields.io/badge/macOS-000000?style=flat&logo=apple&logoColor=white) | Intel (x64) | `cursor-id-modifier-amd64` |
235-
| ![macOS](https://img.shields.io/badge/macOS-000000?style=flat&logo=apple&logoColor=white) | Apple Silicon | `cursor-id-modifier-arm64` |
236-
| ![Linux](https://img.shields.io/badge/Linux-FCC624?style=flat&logo=linux&logoColor=black) | x64 | `cursor-id-modifier` |
237-
| ![Linux](https://img.shields.io/badge/Linux-FCC624?style=flat&logo=linux&logoColor=black) | ARM64 | `cursor-id-modifier-arm64` |
238-
239-
</details>
240-
241-
### 📚 使用说明
242-
243-
<details>
244-
<summary>使用前提</summary>
245-
246-
- 👑 需要管理员/root权限
247-
- 🚫 确保Cursor完全关闭
248-
- 🌐 需要网络连接进行安装
249-
250-
</details>
251-
252-
<details>
253-
<summary>运行工具</summary>
254-
255-
工具将自动执行:
256-
257-
1. 🔑 检查并请求管理员权限
258-
2. 🔍 检测并关闭Cursor进程
259-
3. 💾 备份现有配置
260-
4. 🔄 生成新的标识符
261-
5. ✅ 应用更改
262-
263-
完成后重启Cursor即可。
264-
265-
</details>
266-
267-
### 🔧 故障排除
268-
269-
<details>
270-
<summary>常见问题</summary>
271-
272-
#### 🚫 权限被拒绝
273-
274-
- Windows:右键 → "以管理员身份运行"
275-
- Linux/macOS:使用 \`sudo\` 运行
276-
277-
#### ⚠️ Cursor仍在运行
278-
279-
- 工具会尝试自动关闭
280-
- 如需要请通过任务管理器手动关闭
281-
282-
#### 🔒 macOS安全性问题
283-
284-
如果看到"未识别的开发者"提示:
285-
286-
1. 右键点击 → 打开
287-
2. 点击确认对话框中的"打开"
288-
289-
</details>
290-
291-
### ⚠️ 注意事项
292-
293-
- 🛡️ 使用本工具需自行承担风险
294-
- 💾 使用前请备份重要数据
295-
- 📚 仅用于学习研究目的
296-
297-
### 🤝 贡献
95+
### 🔧 技术细节
29896

299-
欢迎提交问题和改进建议!请确保:
97+
程序修改Cursor的`storage.json`配置文件:
98+
- Windows: `%APPDATA%\Cursor\User\globalStorage\`
99+
- macOS: `~/Library/Application Support/Cursor/User/globalStorage/`
100+
- Linux: `~/.config/Cursor/User/globalStorage/`
300101

301-
- ✅ 保持跨平台兼容性
302-
- 🚫 避免破坏性更改
303-
- 🔍 完善的错误处理
304-
- 📝 更新相关文档
102+
生成新的唯一标识符:
103+
- `telemetry.machineId`
104+
- `telemetry.macMachineId`
105+
- `telemetry.devDeviceId`
305106

306107
## 📄 License
307108

0 commit comments

Comments
 (0)