Skip to content

jsj/apple-docs-cli

Repository files navigation

Apple Docs CLI Hero

Install

Quick start

curl -fsSL https://github.com/jsj/apple-docs-cli/releases/latest/download/install.sh | sh; apple-docs init; apple-docs call search_apple_docs --args '{"query":"AlarmKit","type":"documentation"}' --compact

From npm

npm i -g @jsj/apple-docs-cli
apple-docs -h

From source

git clone https://github.com/jsj/apple-docs-cli.git
cd apple-docs-cli
bun install
bun run build
bun run src/cli.ts -h

Command model

apple-docs <command>

Commands:

  • list-tools list callable tools and schemas
  • call call a tool with JSON args
  • skill manage local skill folders (list, install, uninstall)

Core usage

1. Discover tool inputs

apple-docs list-tools --compact | jq

2. Call a tool with inline args

apple-docs call search_apple_docs --args '{"query":"EventKit","type":"documentation"}' --compact | jq

3. Call a tool with args file

cat > args.json <<'JSON'
{
  "url": "https://developer.apple.com/documentation/eventkit/"
}
JSON

apple-docs call get_apple_doc_content --args-file ./args.json --compact | jq

Practical examples

EventKit: what is it?

apple-docs call search_apple_docs --args '{"query":"EventKit","type":"documentation"}' --compact | jq '.result.text'
apple-docs call get_apple_doc_content --args '{"url":"https://developer.apple.com/documentation/eventkit/"}' --compact | jq '.result.text'

EventKit is the framework for calendar/reminder data (events, reminders, recurrence, alarms).

AlarmKit quick check

apple-docs call search_apple_docs --args '{"query":"AlarmKit","type":"documentation"}' --compact | jq '.result.text'
apple-docs call get_apple_doc_content --args '{"url":"https://developer.apple.com/documentation/alarmkit/"}' --compact | jq '.result.text'

Skill management

Skill root depends on your agent/runtime. Use --root to control it explicitly. A common default is ~/.agents/skills (for example: /Users/james/.agents/skills).

List skills:

apple-docs skill list --compact | jq

Install skill from folder:

apple-docs skill install --name apple-docs-cli --from ./skills/apple-docs-cli --compact | jq

Install skill into a custom root:

apple-docs skill install \
  --name apple-docs-cli \
  --from ./skills/apple-docs-cli \
  --root /Users/james/.agents/skills \
  --compact | jq

Uninstall:

apple-docs skill uninstall --name apple-docs-cli --compact | jq

JSON envelope

All commands return:

{
  "ok": true,
  "command": "call",
  "tool": "search_apple_docs",
  "args": {"query": "EventKit"},
  "result": {
    "text": "...",
    "parsedText": null,
    "response": {"content": [{"type": "text", "text": "..."}]}
  },
  "error": null
}

Development

bun run dev
bun run build
bun run test
bun run test:coverage
bun run lint

Attribution and license

This project is a fork of https://github.com/kimsungwhee/apple-docs-mcp. Credit to the original author and contributors. Licensed under MIT (see LICENSE).

About

Browse the latest sample code, articles, tutorials, API reference, and WWDC sessions.

Topics

Resources

License

Stars

Watchers

Forks

Contributors