Machine ID Modifier
A VS Code extension that helps you modify machine IDs with automatic backup functionality.
一个用于修改机器 ID 的 VS Code 扩展,具有自动备份功能。
Disclaimer / 免责声明
This tool is for learning and communication purposes only. It should not be used for any illegal purposes.
The author assumes no responsibility for any issues or consequences arising from the use of this tool.
本工具仅用于学习交流。不得用于任何非法用途。
使用本工具所产生的任何问题与作者无关。
Features
- Modify machine IDs with automatic backup
- Restore from previous backups
- Cross-platform support
- Configurable paths for storage and main.js files
Configuration
This extension contributes the following settings:
machineIdModifier.storagePath
: Custom path to the storage.json file
machineIdModifier.mainJsPath
: Custom path to the main.js file
If not configured, the extension will use platform-specific default paths:
macOS
- Storage:
~/Library/Application Support/Cursor/User/globalStorage/storage.json
- Main.js:
/Applications/Cursor.app/Contents/Resources/app/out/main.js
Windows
- Storage:
%APPDATA%/Cursor/User/globalStorage/storage.json
Linux
- Storage:
~/.config/Cursor/User/globalStorage/storage.json
Commands
This extension contributes the following commands:
Machine ID Modifier: Modify IDs
: Generate and apply new machine IDs
Machine ID Modifier: Restore from Backup
: Restore settings from a previous backup
Error Handling
The extension provides detailed error messages and logs in the output channel. Common errors include:
- Invalid storage path
- Invalid main.js path
- Failed to create backup
- Failed to restore from backup
Check the "Machine ID Modifier" output channel for detailed error logs.
Security
- All modifications are automatically backed up
- Backups are stored with timestamps for easy identification
- Confirmation is required for potentially destructive operations
Requirements
Release Notes
1.0.0
Initial release with the following features:
- Machine ID modification
- Automatic backup creation
- Backup restoration
- Configurable paths
- Cross-platform support
Features in Detail / 功能详情
Backup System / 备份系统
- Automatic backup creation / 自动创建备份
- Maximum 5 backups per file / 每个文件最多保留5个备份
- Time-stamped backup files / 带时间戳的备份文件
- Automatic cleanup of old backups / 自动清理旧备份
- Backup verification / 备份验证
- Safe restoration process / 安全的恢复流程
Error Handling / 错误处理
- Detailed error messages / 详细的错误信息
- Comprehensive error types / 全面的错误类型
- Full error logging in output panel / 完整的错误日志输出
Process Management / 进程管理
- Safe process termination / 安全的进程终止
- Cross-platform support / 跨平台支持
- Graceful error handling / 优雅的错误处理
Security / 安全性
- All generated IDs use cryptographically secure random number generation / 所有生成的 ID 使用加密安全的随机数生成
- No external network calls / 无外部网络调用
- Local file operations only / 仅本地文件操作
- Automatic backup management for safety / 自动备份管理确保安全
Troubleshooting / 故障排除
Common Issues / 常见问题
Backup Management / 备份管理
- Only 5 most recent backups are kept / 仅保留最近5个备份
- Older backups are automatically removed / 自动删除旧备份
- Check backup timestamps for version history / 检查备份时间戳以查看版本历史
Permission Errors / 权限错误
- Run VS Code with appropriate permissions / 使用适当的权限运行 VS Code
- Check file and directory permissions / 检查文件和目录权限
- Ensure no other processes are locking the files / 确保没有其他进程锁定文件
Process Management / 进程管理
- Close applications before modification / 修改前关闭应用程序
- Check running processes / 检查运行中的进程
- Use Task Manager/Activity Monitor if needed / 必要时使用任务管理器/活动监视器
Logs / 日志
The extension provides detailed logs in the Output panel (View → Output → Machine ID Modifier)
扩展在输出面板中提供详细日志(查看 → 输出 → Machine ID Modifier)
Notes / 注意事项
- Always ensure you have a backup before modifying IDs / 修改 ID 前请确保有备份
- The extension automatically manages backups / 扩展自动管理备份文件
- Only the 5 most recent backups are kept / 仅保留最近5个备份
- You can restore from any available backup / 可以从任何可用备份恢复
- Backups are sorted by date (newest first) / 备份按日期排序(最新的在前)
License / 许可证
MIT
Author / 作者
liulei
Support / 支持
If you encounter any problems, please file an issue at: / 如果遇到任何问题,请在以下地址提交问题:
GitHub Issues