Back to MCP directory
publicPublicdnsLocal runtime

cupertino

Cupertino 是一个基于 Swift 的本地化工具,用于爬取、索引并通过模型上下文协议(MCP)向 AI 智能体提供苹果开发者文档。它支持离线访问超过 23 万页的苹果平台文档、Swift 提案、设计指南和示例代码,并通过 SQLite FTS5 搜索引擎实现快速检索。

article

README

🚀 ReleaseTool

ReleaseTool 是一款仅由维护者使用的命令行工具(CLI),用于自动化 Cupertino 项目的发布流程,极大地提高了发布效率和准确性。

🚀 快速开始

使用 cupertino-rel 可自动化多步骤的发布流程:

  1. bump - 更新 Constants.swiftREADME.mdCHANGELOG.mdDEPLOYMENT.md 中的版本号。
  2. tag - 提交更改并创建 Git 标签。
  3. databases - 打包并将数据库上传到 cupertino-docs
  4. homebrew - 用新的 SHA256 更新 Homebrew 公式。
  5. full - 按顺序运行所有步骤(默认)。

📦 安装指南

cd Packages
swift build --product cupertino-rel

💻 使用示例

基础用法

完整发布

# 通过版本号发布
cupertino-rel 0.5.0

# 通过版本更新类型发布
cupertino-rel patch   # 从 0.4.0 到 0.4.1
cupertino-rel minor   # 从 0.4.0 到 0.5.0
cupertino-rel major   # 从 0.4.0 到 1.0.0

# 预览更改而不实际执行
cupertino-rel 0.5.0 --dry-run

单个命令

# 仅更新版本号
cupertino-rel bump 0.5.0
cupertino-rel bump patch --dry-run

# 打标签并推送
cupertino-rel tag --push
cupertino-rel tag --version 0.5.0 --dry-run

# 上传数据库(需要 GITHUB_TOKEN)
export GITHUB_TOKEN="your-cupertino-docs-token"
cupertino-rel databases
cupertino-rel databases --dry-run

# 更新 Homebrew 公式
cupertino-rel homebrew --version 0.5.0
cupertino-rel homebrew --dry-run

跳过选项

# 跳过等待 GitHub Actions
cupertino-rel 0.5.0 --skip-wait

# 跳过数据库上传
cupertino-rel 0.5.0 --skip-databases

# 跳过 Homebrew 更新
cupertino-rel 0.5.0 --skip-homebrew

🔧 技术细节

环境变量

| 属性 | 详情 | |------|------| | GITHUB_TOKEN | 用于 databasesfull 命令,是对 cupertino-docs 仓库具有写入权限的令牌 |

修改的文件

bump 命令会更新以下文件: | 文件 | 字段 | |------|-------| | Packages/Sources/Shared/Constants.swift | version = "X.Y.Z" | | README.md | **Version:** X.Y.Z | | CHANGELOG.md | 添加 ## X.Y.Z 章节 | | docs/DEPLOYMENT.md | **Version:** X.Y.Z |

为何与 CLI 分离

  • 安全性 - 发布凭证不会暴露给用户。
  • 简洁的用户体验 - 用户仅看到所需的命令。
  • 可维护性 - 发布逻辑可以独立发展。

架构

ReleaseTool/
├── ReleaseCLI.swift           # @main 入口点,共享辅助函数
├── BumpCommand.swift          # 使用正则表达式进行版本更新
├── TagCommand.swift           # Git 操作
├── DatabaseReleaseCommand.swift  # GitHub Releases API
├── HomebrewCommand.swift      # 公式更新
├── FullCommand.swift          # 编排所有步骤
└── README.md                  # 本文件

相关链接

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client