XCDocs lets your agents quickly search local Apple docs without keeping Xcode open!
It uses the vector database powering Xcode's DocumentationSearch MCP tool under the hood, which is already on your Mac.
Includes:
xcdocsCLI & agent skill, designed for use by agents like Codex or Claude Code- Swift package, to integrate
XCDocsinto other tools
- macOS 26+
- Apple silicon only
- Xcode 26.3 RC or above has to be installed, but you don't need Xcode open.
Ask your agent to help!
Install with Homebrew:
brew install BitrigApp/tap/xcdocsDownload the CLI from Releases and put it in /usr/local/bin.
You can also clone the repo and run swift build yourself. The resulting binary will be in .build/debug/xcdocs.
- Codex: Tell agent to copy/symlink
.agents/skills/xcdocsto~/.agents/skills/xcdocs - Claude Code: Tell agent to copy/symlink
.agents/skills/xcdocsto~/.claude/skills/xcdocs
xcdocs --helpSearch for documentation:
xcdocs search "swift testing"
xcdocs search "swift testing" --framework "Swift Testing" --limit 5
xcdocs search "swift testing" --kind article --limit 5
xcdocs search "swiftui color" --json
xcdocs search "swiftui color" --omit-contentGet an entry by identifier:
xcdocs get /documentation/Testing
xcdocs get /documentation/Testing --jsonXCDocs also exposes a Swift package which you can integrate into other tools.
To get started, add the repo to your Package.swift.
import XCDocs
let client = Client()
let searchResults = try await client.search(
"swift testing",
frameworks: ["Swift Testing"],
kinds: [.article],
limit: 5,
omitContent: false
)
let entry = try await client.entry(
for: "/documentation/Testing"
)Run tests:
swift testRun formatting checks:
swift format lint --strict Package.swift
swift format lint --strict --recursive Sources Tests