Skip to content

Commit 133cfaa

Browse files
author
cheng zhen
committed
Merge branch 'pr/yeongpin/7' into dev
2 parents 4bd09d9 + ab7f508 commit 133cfaa

24 files changed

+783
-75
lines changed

.env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Chrome浏览器路径
2+
CHROME_PATH=/Applications/Google Chrome.app/Contents/MacOS/Google Chrome # macOS
3+
# CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe # Windows

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build Executables
22

33
on:
44
push:
5+
branches:
6+
- dev
57
tags:
68
- 'v*' # 添加标签触发条件,匹配 v1.0.0 这样的标签
79

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ __pycache__/
2323
venv/
2424

2525
node_modules/
26+
27+
.env

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 dacrab
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+204-33
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,244 @@
1+
# Cursor Pro 自动化工具
12

3+
<div align="center">
24

3-
# Cursor Pro 自动化工具使用说明
5+
[![Release](https://img.shields.io/github/v/release/chengazhen/cursor-auto-free?style=flat-square&logo=github&color=blue)](https://github.com/chengazhen/cursor-auto-free/releases/latest)
6+
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square&logo=bookstack)](https://github.com/chengazhen/cursor-auto-free/blob/master/LICENSE)
7+
[![Stars](https://img.shields.io/github/stars/chengazhen/cursor-auto-free?style=flat-square&logo=github)](https://github.com/chengazhen/cursor-auto-free/stargazers)
48

5-
## 功能介绍
9+
[🌏 中文](#中文) | [🌟 English](#english)
10+
<p align="center">
11+
<img src="./screen/logo.png" alt="Cursor Pro Logo" width="200"/>
12+
</p>
13+
14+
</div>
15+
16+
## 🔄 更新日志
17+
<details>
18+
<summary>v0.0.6</summary>
19+
1. 修复了无法获取邮箱验证码的问题
20+
2. 增加了机器ID重置功能
21+
3. 增加了进度条显示
22+
<p align="center">
23+
<img src="./screen/run_2025-01-05_00-13-04.png" alt="ID" width="600"/>
24+
</p>
25+
</details>
26+
27+
## 中文
28+
29+
## 🚀 功能介绍
630
自动注册账号,自动刷新本地token,解放双手。
731

8-
## 下载地址
32+
## ⬇️ 下载地址
933
https://github.com/chengazhen/cursor-auto-free/releases
1034

11-
## 重要提示
12-
**1.确保你有一个chrome浏览器;如果你没有;[下载地址](https://www.google.com/intl/en_pk/chrome/)**
35+
## ⚠️ 重要提示
36+
1. **确保已安装 Chrome 浏览器**
37+
- 如果未安装,请从[官方网站下载](https://www.google.com/intl/en_pk/chrome/)
1338

14-
**2.首先,你要自己已经登录过账号不管你的账号是不是有效,登录是必须的。**
39+
2. **必须先完成账号登录**
40+
- 不论账号是否有效,必须先完成登录步骤
1541

16-
**3.有一个稳定的网络连接。尽量是国外的节点。不要开启全局代理。一定不要开启全局代理。**
42+
3. **网络要求**
43+
- 需要稳定的网络连接
44+
- 建议使用国外节点
45+
- ⚠️ 切勿开启全局代理
1746

47+
## 🛠️ 构建使用
48+
### Win / Mac / Linux 通用
1849

19-
## 运行方法
50+
<p align="center">
51+
<img src="./screen/build_2025-01-04_11-02-45.png" alt="构建步骤 1" width="400"/>
52+
<img src="./screen/build_2025-01-04_11-04-43.png" alt="构建步骤 2" width="600"/>
53+
</p>
54+
55+
```bash
56+
# 根据您的操作系统选择以下任一方式构建:
57+
Windows: build.bat
58+
macOS: build.mac.command
59+
Linux: build.sh
60+
```
2061

21-
### Mac 版本
22-
1. 打开终端,进入应用所在目录
23-
2. 运行命令:授权文件可以执行
62+
### .env文件中配置Chrome路径
63+
```bash
64+
CHROME_PATH=
65+
```
66+
67+
## 📱 运行方法
68+
69+
### 更直觀的查看進度條
70+
<p align="center">
71+
<img src="./screen/run_2025-01-04_23-26-22.gif" alt="Run Step 1" width="600"/>
72+
</p>
73+
<details>
74+
<summary>進度條</summary>
75+
<p align="center">
76+
<img src="./screen/run_2025-01-04_23-26-57.png" alt="Run Step 2" width="600"/>
77+
<img src="./screen/run_2025-01-04_23-28-29.png" alt="Run Step 3" width="600"/>
78+
<img src="./screen/run_2025-01-04_23-28-08.png" alt="Run Step 4" width="600"/>
79+
</p>
80+
</details>
81+
82+
83+
### macOS
84+
1. 打开终端,进入应用目录
85+
2. 授权执行权限:
2486
```bash
2587
chmod +x ./CursorPro
2688
```
2789
3. 运行程序:
28-
- 在终端中运行:
2990
```bash
3091
./CursorPro
3192
```
32-
- 或直接在访达(Finder)中双击运行
33-
34-
35-
提示:如果遇到下面的问题; [解决方案](https://sysin.org/blog/macos-if-crashes-when-opening/)
36-
93+
或直接在访达(Finder)中双击运行
3794

38-
![image](./screen/c29ea438-ee74-4ba1-bbf6-25e622cdfad5.png)
95+
> 💡 如遇到启动问题,请参考[解决方案](https://sysin.org/blog/macos-if-crashes-when-opening/)
3996
97+
<p align="center">
98+
<img src="./screen/c29ea438-ee74-4ba1-bbf6-25e622cdfad5.png" alt="macOS 错误示例" width="350"/>
99+
</p>
40100

41-
42-
### Windows 版本
101+
### Windows
43102
直接双击运行 `CursorPro.exe`
44103

104+
## ✅ 验证方法
105+
运行脚本完成后,重启编辑器,确认账号信息与脚本输出日志一致:
45106

46-
## 如何验证是否有效
47-
**运行脚本完成之后,重启你的编辑器,你会看到下面图片的账号和你的脚本输出的日志账号一致就搞定了。**
48-
![image](./screen/截屏2025-01-04%2009.44.48.png)
49-
107+
<p align="center">
108+
<img src="./screen/截屏2025-01-04 09.44.48.png" alt="验证成功示例" width="350"/>
109+
</p>
50110

51-
## 使用注意事项
111+
## 📝 使用注意事项
52112

53-
1. 运行环境要求
113+
1. **运行环境要求**
54114
- 稳定的网络连接
55115
- 足够的系统权限
56116

57-
2. 使用过程中
117+
2. **使用过程中**
58118
- 请勿手动关闭浏览器窗口
59-
- 等待程序自动完成所有操作
119+
- 耐心等待程序自动完成操作
60120
- 看到"脚本执行完毕"提示后再关闭程序
61121

62-
## 常见问题解决
122+
## 常见问题解决
63123

64-
1. 程序运行过程中卡住:
124+
1. **程序运行卡住**
65125
- 检查网络连接
66126
- 重启程序重试
67127

68-
69-
## 免责声明
128+
## ⚖️ 免责声明
70129
本工具仅供学习研究使用,请遵守相关服务条款。使用本工具产生的任何后果由使用者自行承担。
130+
仓库核心源码来自[gpt-cursor-auto](https://github.com/hmhm2022/gpt-cursor-auto);自行优化了验证和邮箱注册逻辑;解决了无法获取邮箱验证码的问题。
131+
132+
---
133+
134+
> 仓库源码来自开源;自行优化了验证和邮箱注册逻辑;解决了无法获取邮箱验证码的问题。
135+
136+
---
137+
## English
138+
139+
## 🚀 Features
140+
Automatic account registration and local token refresh, hands-free operation.
141+
142+
## ⬇️ Download
143+
https://github.com/chengazhen/cursor-auto-free/releases
144+
145+
## ⚠️ Important Notes
146+
1. **Ensure Chrome Browser is Installed**
147+
- If not installed, download from [Official Website](https://www.google.com/intl/en_pk/chrome/)
148+
149+
2. **Account Login Required**
150+
- Must complete login first, regardless of account validity
151+
152+
3. **Network Requirements**
153+
- Stable internet connection required
154+
- International network node recommended
155+
- ⚠️ Do not enable global proxy
156+
157+
## 🛠️ Build Instructions
158+
### For Win / Mac / Linux
159+
160+
<p align="center">
161+
162+
<img src="./screen/build_2025-01-04_11-02-45.png" alt="Build Step 1" width="400"/>
163+
<img src="./screen/build_2025-01-04_11-04-43.png" alt="Build Step 2" width="600"/>
164+
</p>
165+
166+
```bash
167+
# Choose the appropriate build method for your OS:
168+
Windows: build.bat
169+
macOS: build.mac.command
170+
Linux: build.sh
171+
```
172+
173+
### .env file configuration
174+
```bash
175+
CHROME_PATH=
176+
```
177+
178+
## 📱 Running Instructions
179+
180+
### Show Progress Bar
181+
<p align="center">
182+
<img src="./screen/run_2025-01-04_23-26-22.gif" alt="Run Step 1" width="600"/>
183+
</p>
184+
<details>
185+
<summary>Progress</summary>
186+
<p align="center">
187+
<img src="./screen/run_2025-01-04_23-26-57.png" alt="Run Step 2" width="600"/>
188+
<img src="./screen/run_2025-01-04_23-28-29.png" alt="Run Step 3" width="600"/>
189+
<img src="./screen/run_2025-01-04_23-28-08.png" alt="Run Step 4" width="600"/>
190+
</p>
191+
</details>
192+
193+
### macOS
194+
1. Open terminal and navigate to application directory
195+
2. Grant execution permissions:
196+
```bash
197+
chmod +x ./CursorPro
198+
```
199+
3. Run the program:
200+
```bash
201+
./CursorPro
202+
```
203+
Or double-click in Finder to run
204+
205+
> 💡 If you encounter startup issues, check the [Solution Guide](https://sysin.org/blog/macos-if-crashes-when-opening/)
206+
207+
<p align="center">
208+
<img src="./screen/c29ea438-ee74-4ba1-bbf6-25e622cdfad5.png" alt="macOS Error Example" width="350"/>
209+
</p>
210+
211+
### Windows
212+
Double-click `CursorPro.exe` to run
213+
214+
## ✅ Verification
215+
After running the script, restart your editor and verify that the account information matches the script output log:
216+
217+
<p align="center">
218+
<img src="./screen/截屏2025-01-04 09.44.48.png" alt="Verification Success Example" width="350"/>
219+
</p>
220+
221+
## 📝 Usage Notes
222+
223+
1. **System Requirements**
224+
- Stable network connection
225+
- Sufficient system permissions
226+
227+
2. **During Operation**
228+
- Do not manually close browser windows
229+
- Wait patiently for automatic completion
230+
- Close program only after seeing "Script Execution Complete"
231+
232+
## ❓ Troubleshooting
233+
234+
1. **Program Freezes**
235+
- Check network connection
236+
- Restart the program
237+
238+
## ⚖️ Disclaimer
239+
This tool is for learning and research purposes only. Please comply with relevant terms of service. Users assume all responsibility for any consequences of using this tool.
240+
Git Core Source Code: [gpt-cursor-auto](https://github.com/hmhm2022/gpt-cursor-auto);Optimized verification and email registration logic; solved the problem of not being able to retrieve email verification codes.
71241

242+
---
72243

73-
仓库核心源码来自[gpt-cursor-auto](https://github.com/hmhm2022/gpt-cursor-auto);自行优化了验证和邮箱注册逻辑;解决了无法获取邮箱验证码的问题。
244+
> Repository source code is open-source; verification and email registration logic optimized; fixed email verification code retrieval issues.

browser_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ def quit(self):
5757
try:
5858
self.browser.quit()
5959
except:
60-
pass
60+
pass

build.bat

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
@echo off
2+
set PYTHONWARNINGS=ignore::SyntaxWarning:DrissionPage
3+
echo Building Cursor Keep Alive...
4+
5+
:: Check if virtual environment exists
6+
if not exist "venv" (
7+
python -m venv venv
8+
if errorlevel 1 (
9+
echo Failed to create virtual environment!
10+
exit /b 1
11+
)
12+
)
13+
14+
:: Activate virtual environment and wait for activation to complete
15+
call venv\Scripts\activate.bat
16+
timeout /t 2 /nobreak > nul
17+
18+
:: Install dependencies
19+
echo Installing dependencies...
20+
python -m pip install --upgrade pip
21+
pip install -r requirements.txt
22+
23+
:: Run build script
24+
echo Starting build process...
25+
python build.py
26+
27+
:: Deactivate virtual environment
28+
deactivate
29+
30+
:: Keep window open
31+
echo Build completed!
32+
pause

build.mac.command

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
export PYTHONWARNINGS=ignore::SyntaxWarning:DrissionPage
3+
4+
# Get script directory
5+
cd "$(dirname "$0")"
6+
7+
echo "Creating virtual environment..."
8+
9+
# Check if virtual environment exists
10+
if [ ! -d "venv" ]; then
11+
python3 -m venv venv
12+
if [ $? -ne 0 ]; then
13+
echo "Failed to create virtual environment!"
14+
exit 1
15+
fi
16+
fi
17+
18+
# Activate virtual environment
19+
source venv/bin/activate
20+
21+
# Install dependencies
22+
echo "Installing dependencies..."
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
26+
# Run build script
27+
echo "Starting build process..."
28+
python build.py
29+
30+
# Keep window open
31+
echo "Build completed!"
32+
echo "Press any key to exit..."
33+
read -n 1

0 commit comments

Comments
 (0)