apple-docs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

apple-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-docs
bash
npx apple-docs search "SwiftUI"
或全局安装:
bash
npm i -g apple-docs

Instructions

使用说明

Based on the user's question: $ARGUMENTS
  1. Determine which
    apple-docs
    command(s) best answer the question
  2. Run them using the Bash tool
  3. Present the results concisely, focusing on what the user needs
基于用户的问题:$ARGUMENTS
  1. 确定哪个/哪些
    apple-docs
    命令最能回答该问题
  2. 使用Bash工具运行这些命令
  3. 简洁地呈现结果,聚焦用户所需信息

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 references
apple-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

可选参数

  • --type <type>
    — Symbol type filter (class, struct, enum, protocol)
  • --limit <n>
    — Max results
  • --year <year>
    — Year filter
  • --framework <fw>
    — Framework filter
  • --topic <topic>
    — Topic filter
  • --platform <p>
    — Platform filter (ios, macos, watchos, tvos, visionos)
  • --language <lang>
    — Language filter (swift, occ)
  • --depth <d>
    — Search depth (shallow, medium, deep)
  • --type <type>
    — 符号类型筛选(class、struct、enum、protocol)
  • --limit <n>
    — 最大结果数
  • --year <year>
    — 年份筛选
  • --framework <fw>
    — 框架筛选
  • --topic <topic>
    — 主题筛选
  • --platform <p>
    — 平台筛选(ios、macos、watchos、tvos、visionos)
  • --language <lang>
    — 语言筛选(swift、occ)
  • --depth <d>
    — 搜索深度(shallow、medium、deep)

Tips

使用技巧

  • Start with
    search
    for general questions
  • Use
    doc <url>
    to get full details on a specific API found in search results
  • Use
    symbols <framework> --type <type>
    to find specific classes/structs/protocols
  • Use
    platform <url>
    to check OS version requirements
  • Use
    wwdc-search
    to find implementation guidance from WWDC talks
  • Chain commands when needed: search → doc → related
  • 通用问题先使用
    search
    命令
  • 若在搜索结果中找到特定API,使用
    doc <url>
    获取完整详情
  • 使用
    symbols <framework> --type <type>
    查找特定类/结构体/协议
  • 使用
    platform <url>
    检查OS版本要求
  • 使用
    wwdc-search
    从WWDC演讲中查找实现指导
  • 必要时可链式使用命令:search → doc → related