https://github.com/akkyie/xcdoc
A fully offline command-line explorer for Xcode documentation.
https://github.com/akkyie/xcdoc
documentation swift xcode
Last synced: about 2 months ago
JSON representation
A fully offline command-line explorer for Xcode documentation.
- Host: GitHub
- URL: https://github.com/akkyie/xcdoc
- Owner: akkyie
- License: mit
- Created: 2025-12-07T05:16:18.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-12-14T10:10:48.000Z (3 months ago)
- Last Synced: 2025-12-16T13:46:55.543Z (3 months ago)
- Topics: documentation, swift, xcode
- Language: Swift
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xcdoc
Command-line explorer for the documentation included with Xcode. `xcdoc` lets you list the documentation hierarchy, search symbols instantly, and render any article as Markdown, all without launching Xcode.
`xcdoc` works fully offline and read-only on the Xcode installed on your machine.
## Requirements
- macOS 13 or later
- Xcode 15 or later
The Xcode version used by `xcdoc` is determined by `xcode-select -p`.
You can change it with `xcode-select -s path/to/Xcode.app`, or override it by setting the `DEVELOPER_DIR` environment variable when running a command:
```sh
DEVELOPER_DIR=/Applications/Xcode-26.0.0.app/Contents/Developer xcdoc search liquid glass
```
`xcdoc` relies on Xcode's internal formats and may (likely will) break with future Xcode releases.
## Installation
```bash
git clone https://github.com/akkyie/xcdoc.git
cd xcdoc
swift build -c release
cp .build/release/xcdoc /usr/local/bin # or anywhere in the $PATH
```
### [Mint](https://github.com/yonaskolb/Mint)
```bash
mint install akkyie/xcdoc
```
## Usage
### List categories
Shows the documentation hierarchy.
```bash
$ xcdoc list
```
### Search keywords
Full-text search across Swift, Objective-C, and other documents (REST APIs, JS frameworks, etc.) using the offline index files.
```bash
$ xcdoc search String
# You can filter by a language (--swift, --objc, --other)
$ xcdoc search --swift View
# You can pass multiple keywords, including symbols
$ xcdoc search String +
$ xcdoc search app life cycle
```
### Show an article as Markdown
Accepts a documentation path found via `xcdoc list` or `xcdoc search`.
```bash
$ xcdoc show /documentation/uikit/uiview
# You can specify the language to show (--swift, --objc, --other)
$ xcdoc show --objc /documentation/uikit/uiview
```
## Development
- Build: `swift build`
- Run: `swift run xcdoc `
- Tests: `swift test`
## Disclaimer
- `xcdoc` runs locally against the documentation files already installed with your copy of Xcode; it does not ship or redistribute any Apple documentation or data files.
- Implementation is based solely on observations of on-disk data layouts and published SwiftDocC APIs; no Apple executables are reverse-engineered.
- Generated Markdown is for personal/internal use only; do not republish Apple documentation extracted with this tool. Ensure your usage complies with Apple’s terms and applicable laws.
- This project is an independent open-source tool and is not authorized, sponsored, or otherwise approved by Apple Inc.
- Swift®, Xcode®, and macOS® are trademarks of Apple Inc.
## License
xcdoc is available under the MIT License. See `LICENSE` for details.
Note: All output generated by this tool remains the copyrighted material of Apple Inc. and is not covered by this license.