apple-docs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseapple-docs
apple-docs
Query Apple Developer Documentation from the command line. Provides real-time access to API docs, framework symbols, WWDC video transcripts and code examples, sample code, and platform compatibility info.
从命令行查询Apple开发者文档。可实时访问API文档、框架符号、WWDC视频文字稿及代码示例、示例代码和平台兼容性信息。
When to use
使用场景
- When you need up-to-date Apple API documentation (SwiftUI, UIKit, Foundation, etc.)
- When checking platform availability or minimum OS versions
- When looking for WWDC session content, transcripts, or code examples
- When exploring framework symbols (classes, structs, protocols, enums)
- When finding sample code from Apple
- When discovering related or alternative APIs
- 当你需要获取最新的Apple API文档时(如SwiftUI、UIKit、Foundation等)
- 当你需要检查平台可用性或最低OS版本要求时
- 当你查找WWDC会话内容、文字稿或代码示例时
- 当你探索框架符号(类、结构体、协议、枚举)时
- 当你寻找Apple官方示例代码时
- 当你发现相关或替代API时
Setup
安装配置
bash
npx apple-docs search "SwiftUI"Or install globally:
bash
npm i -g apple-docsbash
npx apple-docs search "SwiftUI"或全局安装:
bash
npm i -g apple-docsInstructions
使用说明
Based on the user's question: $ARGUMENTS
- Determine which command(s) best answer the question
apple-docs - Run them using the Bash tool
- Present the results concisely, focusing on what the user needs
基于用户的问题:$ARGUMENTS
- 确定哪个/哪些命令最能回答该问题
apple-docs - 使用Bash工具运行这些命令
- 简洁地呈现结果,聚焦用户所需信息
Commands
命令列表
apple-docs version # Show current version
apple-docs search <query> # Search Apple documentation
apple-docs doc <url> # Get full doc page content
apple-docs tech [category] # List Apple technologies/frameworks
apple-docs symbols <framework> # Browse framework symbols (--type class|struct|enum|protocol)
apple-docs wwdc [year] # Browse WWDC videos
apple-docs wwdc-search <query> # Search WWDC transcripts & code
apple-docs wwdc-video <year> <id> # Get WWDC video transcript + code
apple-docs wwdc-code [framework] # Get WWDC code examples
apple-docs wwdc-topics [topicId] # Browse WWDC topics
apple-docs wwdc-years # List available WWDC years
apple-docs sample [query] # Browse sample code
apple-docs related <url> # Find related APIs
apple-docs similar <url> # Find similar/alternative APIs
apple-docs platform <url> # Check platform compatibility
apple-docs updates [category] # Documentation updates
apple-docs overviews [category] # Technology overviews
apple-docs references <url> # Resolve API referencesapple-docs version # 显示当前版本
apple-docs search <query> # 搜索Apple文档
apple-docs doc <url> # 获取完整文档页面内容
apple-docs tech [category] # 列出Apple技术/框架
apple-docs symbols <framework> # 浏览框架符号(--type class|struct|enum|protocol)
apple-docs wwdc [year] # 浏览WWDC视频
apple-docs wwdc-search <query> # 搜索WWDC文字稿及代码
apple-docs wwdc-video <year> <id> # 获取WWDC视频文字稿+代码
apple-docs wwdc-code [framework] # 获取WWDC代码示例
apple-docs wwdc-topics [topicId] # 浏览WWDC主题
apple-docs wwdc-years # 列出可用的WWDC年份
apple-docs sample [query] # 浏览示例代码
apple-docs related <url> # 查找相关API
apple-docs similar <url> # 查找类似/替代API
apple-docs platform <url> # 检查平台兼容性
apple-docs updates [category] # 文档更新内容
apple-docs overviews [category] # 技术概述
apple-docs references <url> # 解析API引用Flags
可选参数
- — Symbol type filter (class, struct, enum, protocol)
--type <type> - — Max results
--limit <n> - — Year filter
--year <year> - — Framework filter
--framework <fw> - — Topic filter
--topic <topic> - — Platform filter (ios, macos, watchos, tvos, visionos)
--platform <p> - — Language filter (swift, occ)
--language <lang> - — Search depth (shallow, medium, deep)
--depth <d>
- — 符号类型筛选(class、struct、enum、protocol)
--type <type> - — 最大结果数
--limit <n> - — 年份筛选
--year <year> - — 框架筛选
--framework <fw> - — 主题筛选
--topic <topic> - — 平台筛选(ios、macos、watchos、tvos、visionos)
--platform <p> - — 语言筛选(swift、occ)
--language <lang> - — 搜索深度(shallow、medium、deep)
--depth <d>
Tips
使用技巧
- Start with for general questions
search - Use to get full details on a specific API found in search results
doc <url> - Use to find specific classes/structs/protocols
symbols <framework> --type <type> - Use to check OS version requirements
platform <url> - Use to find implementation guidance from WWDC talks
wwdc-search - Chain commands when needed: search → doc → related
- 通用问题先使用命令
search - 若在搜索结果中找到特定API,使用获取完整详情
doc <url> - 使用查找特定类/结构体/协议
symbols <framework> --type <type> - 使用检查OS版本要求
platform <url> - 使用从WWDC演讲中查找实现指导
wwdc-search - 必要时可链式使用命令:search → doc → related