Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cursor-markdown-docs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Cursor Markdown 文档管理工具
一个用于管理和部署 Markdown 文档到 Cursor commands 目录的工具。
功能特性
- 🚀 全局安装后自动部署文档
- 📁 支持批量管理多个文档
- 🔄 自动同步到
~/.cursor/commands目录 - 🧹 卸载时自动清理文件
- 📖 提供实用的开发指南和规范文档
安装
全局安装(推荐)
npm install cursor-markdown-docs -g安装完成后,文档会自动复制到 ~/.cursor/commands 目录。
本地开发安装
git clone https://github.com/yourusername/cursor-markdown-docs.git
cd cursor-markdown-docs
npm install
npm run build # 如果需要构建
npm link # 创建全局链接使用方法
在 Cursor 中使用
安装完成后,您可以在 Cursor 中通过以下方式访问文档:
- 打开 Cursor
- 使用
Cmd/Ctrl + Shift + P打开命令面板 - 输入文档名称或关键词
- 选择对应的文档查看
包含的文档
当前版本包含以下文档:
- 开发环境配置.md - 开发环境搭建和配置指南
- 代码规范.md - JavaScript/TypeScript 和 React 代码规范
- 项目管理.md - 项目结构、开发流程和最佳实践
自定义文档
添加新文档
- 在项目根目录的
docs/文件夹中添加您的 Markdown 文件 - 更新版本号
- 发布新版本
# 添加新文档
echo "# 新文档内容" > docs/新文档.md
# 更新版本
npm version patch
# 发布
npm publish文档格式要求
- 文件扩展名:
.md或.markdown - 编码:UTF-8
- 建议包含完整的标题和目录结构
- 支持标准的 Markdown 语法
开发
项目结构
cursor-markdown-docs/
├── bin/ # 可执行脚本
│ └── install.js # 安装脚本
├── docs/ # Markdown 文档目录
├── scripts/ # 安装和卸载脚本
│ ├── postinstall.js # 安装后执行脚本
│ └── preuninstall.js # 卸载前执行脚本
├── package.json # 项目配置
└── README.md # 项目说明开发命令
# 安装依赖
npm install
# 本地测试安装
npm run postinstall
# 发布新版本
npm version patch # 或 minor, major
npm publish脚本说明
- postinstall.js: 在 npm install 后自动执行,将文档复制到 Cursor 目录
- preuninstall.js: 在 npm uninstall 前执行,清理已安装的文档
- install.js: 手动安装脚本,可通过
cursor-docs命令调用
卸载
全局卸载
npm uninstall cursor-markdown-docs -g卸载时会自动清理 ~/.cursor/commands 目录中的相关文档。
本地开发卸载
npm unlink兼容性
- Node.js >= 14.0.0
- 支持 macOS、Linux、Windows
- Cursor 编辑器
许可证
MIT License - 查看 LICENSE 文件了解详情。
贡献
欢迎提交 Issue 和 Pull Request!
- Fork 本项目
- 创建特性分支 (
git checkout -b feature/AmazingFeature) - 提交更改 (
git commit -m 'Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 打开 Pull Request
更新日志
v1.0.0 (2025-11-01)
- ✨ 初始版本发布
- 📖 包含开发环境配置、代码规范、项目管理三个核心文档
- 🚀 支持自动部署到 Cursor commands 目录
- 🧹 支持自动清理功能
注意: 请确保您有足够的权限写入 ~/.cursor/commands 目录。