A safe and easy-to-use script to manage custom modes in Cursor IDE.
- ✅ Cross-platform support (macOS, Linux, Windows)
- ✅ Automatic database backup
- ✅ Safe deletion (protects default modes)
- ✅ List all modes
- ✅ Batch delete multiple custom modes
- ✅ Automatic Cursor process management
- ✅ Multi-language support (English/Chinese)
# Make script executable
chmod +x remove_cursor_custom_mode.sh
# List all modes
./remove_cursor_custom_mode.sh --list
# Delete custom modes
./remove_cursor_custom_mode.sh "mode1" "mode2"./remove_cursor_custom_mode.sh --list./remove_cursor_custom_mode.sh "mode name"./remove_cursor_custom_mode.sh "mode1" "mode2" "mode3"./remove_cursor_custom_mode.sh --lang en --list
./remove_cursor_custom_mode.sh --lang zh --list./remove_cursor_custom_mode.sh --help# View all modes in English
./remove_cursor_custom_mode.sh --lang en --list
# Delete a mode named "claude3.7"
./remove_cursor_custom_mode.sh "claude3.7"
# Delete multiple modes at once
./remove_cursor_custom_mode.sh "claude3.7" "architecture" "my custom mode"# Set default language
export CURSOR_SCRIPT_LANG=en # or zh
./remove_cursor_custom_mode.sh --list- Automatic Backup: Database is backed up before any operation
- Process Management: Automatically closes Cursor processes
- Protected Default Modes: Default modes (Agent, Careful, Ask, Background) cannot be deleted
- Confirmation Prompt: Requires user confirmation before deletion
- macOS: Supported
- Linux: Supported
- Windows: Supported (requires Git Bash or WSL)
- Dependencies: sqlite3, python3
- macOS:
brew install sqlite python3 - Linux:
sudo apt-get install sqlite3 python3 - Windows: Install via official websites
Ensure Cursor is installed and has been run at least once.
chmod +x remove_cursor_custom_mode.shInstall sqlite3 and python3 as shown above.
Backup files are saved in the same directory as the original database:
state.vscdb.backup_YYYYMMDD_HHMMSS
一个安全易用的 Cursor IDE 自定义模式管理脚本。
- ✅ 跨平台支持 (macOS, Linux, Windows)
- ✅ 自动备份数据库
- ✅ 安全删除,不会影响默认模式
- ✅ 列出所有模式
- ✅ 批量删除多个自定义模式
- ✅ 自动关闭 Cursor 进程
- ✅ 多语言支持 (中英文)
# 给脚本执行权限
chmod +x remove_cursor_custom_mode.sh
# 列出所有模式
./remove_cursor_custom_mode.sh --list
# 删除自定义模式
./remove_cursor_custom_mode.sh "模式1" "模式2"./remove_cursor_custom_mode.sh --list./remove_cursor_custom_mode.sh "模式名称"./remove_cursor_custom_mode.sh "模式名称1" "模式名称2" "模式名称3"./remove_cursor_custom_mode.sh --lang zh --list
./remove_cursor_custom_mode.sh --lang en --list./remove_cursor_custom_mode.sh --help# 用中文查看所有模式
./remove_cursor_custom_mode.sh --lang zh --list
# 删除名为 "claude3.7" 的自定义模式
./remove_cursor_custom_mode.sh "claude3.7"
# 同时删除多个自定义模式
./remove_cursor_custom_mode.sh "claude3.7" "架构模式" "我的自定义模式"# 设置默认语言
export CURSOR_SCRIPT_LANG=zh # 或 en
./remove_cursor_custom_mode.sh --list- 自动备份: 每次操作前都会自动备份数据库文件
- 进程管理: 自动关闭 Cursor 进程,避免数据冲突
- 保护默认模式: 默认模式 (Agent、Careful、Ask、Background) 永远不会被删除
- 确认提示: 删除前会要求用户确认
- macOS: 支持
- Linux: 支持
- Windows: 支持 (需要 Git Bash 或 WSL)
- 依赖: sqlite3, python3
- macOS:
brew install sqlite python3 - Linux:
sudo apt-get install sqlite3 python3 - Windows: 通过官方网站安装
确保 Cursor 已安装并至少运行过一次。
chmod +x remove_cursor_custom_mode.sh按上述方法安装 sqlite3 和 python3。
备份文件保存在与原数据库相同的目录下,文件名格式:
state.vscdb.backup_YYYYMMDD_HHMMSS
MIT License
Created to solve the issue of not being able to delete custom modes through Cursor IDE's UI.
为了解决 Cursor IDE 中无法通过 UI 删除自定义模式的问题而创建。