HomeKit
Use homekit as the only HomeKit interface unless the user explicitly asks to leave this CLI. Start read-only, identify exact targets, then write only when the user has asked for the specific physical or structural change.
Progressive Disclosure
Do not memorize or duplicate the command schema. Ask the CLI for the level of detail you need:
homekit --help
homekit <group> --help
homekit <command> --schema --format json
homekit --llms
Use --format json for evidence you will parse or compare. Use --schema --format json before MCP/tool calls when argument names, output fields, or safety flags are uncertain.
Load References
Load only the reference that matches the user request:
references/setup-and-troubleshooting.md: HomeClaw setup, readiness, HomeKit permission, logs, MCP install.
references/inspection-workflows.md: homes, rooms, accessories, scenes, automations, zones, event logs, device-map, and anomaly investigation.
references/write-workflows.md: accessory control, room/zone/scene/automation mutations, exact-id writes, verification, and audit reporting.
references/command-groups.md: concise command group map and implementation caveats.
Use scripts/homekit-readiness.sh when you need a deterministic local setup/readiness check.
Operating Rules
- Treat locks, garage doors, gates, doors, windows, covers, security systems, cameras, doorbells, occupancy, presence, scenes, and automations as safety-critical.
- Never control a device just to test connectivity.
- Never use
--allow-actuation unless the user asked for the exact physical state change.
- Never use
--allow-mutation unless the user asked for the exact HomeKit structural change.
- Never wildcard writes. Resolve names to exact IDs first, then use those exact IDs.
- If multiple accessories, scenes, rooms, zones, or automations match, show candidates and ask the user to choose.
- After any accepted write, report the command family, target name/id, requested value/change, verification result, and returned
auditId when present.
Default Flow
Check HomeClaw readiness:
homekit bridge setup --format json
homekit status --format json
Build context with read-only commands:
homekit homes list --format json
homekit rooms list --format json
homekit accessories list --format json
homekit scenes list --format json
homekit automations list --format json
homekit events list --limit 50 --format json
Narrow to exact IDs:
homekit accessories search "<query>" --format json
homekit accessories get <accessoryId> --format json
homekit scenes get <sceneId> --format json
homekit automations get <automationId> --format json
Before a write, inspect the exact command schema:
homekit accessories control --schema --format json
homekit rooms rename --schema --format json
Verify with the narrowest relevant read and recent events:
homekit accessories get <accessoryId> --format json
homekit events list --limit 20 --format json
Scenario Routing
- Initial setup or “is it working?”: read
setup-and-troubleshooting.md, run the readiness script or bridge setup, then confirm status.
- Inventory or mapping request: read
inspection-workflows.md; prefer device-map for broad topology and get commands for exact details.
- Unexpected automation/device behavior: read
inspection-workflows.md; compare events list, automations list/get, scenes, and affected accessories before proposing writes.
- Physical control request: read
write-workflows.md; require exact accessory id, characteristic, value, and explicit actuation approval.
- Home structure change: read
write-workflows.md; require exact ids and --allow-mutation; prefer disable over delete when undo risk is unclear.
- Command uncertainty: read
command-groups.md, then ask the CLI for help/schema.
1---2name: homekit3description: Use the `homekit` CLI and MCP server safely with HomeClaw for HomeKit setup, read-only inspection, troubleshooting, explicit accessory control, webhooks, triggers, and structural HomeKit changes. Trigger when an agent needs to inspect or operate HomeKit accessories, rooms, zones, scenes, automations, events, webhooks, or triggers through homekit-cli.4---56# HomeKit78Use `homekit` as the only HomeKit interface unless the user explicitly asks to leave this CLI. Start read-only, identify exact targets, then write only when the user has asked for the specific physical or structural change.910## Progressive Disclosure1112Do not memorize or duplicate the command schema. Ask the CLI for the level of detail you need:1314```bash15homekit --help16homekit <group> --help17homekit <command> --schema --format json18homekit --llms19```2021Use `--format json` for evidence you will parse or compare. Use `--schema --format json` before MCP/tool calls when argument names, output fields, or safety flags are uncertain.2223## Load References2425Load only the reference that matches the user request:2627- `references/setup-and-troubleshooting.md`: HomeClaw setup, readiness, HomeKit permission, logs, MCP install.28- `references/inspection-workflows.md`: homes, rooms, accessories, scenes, automations, zones, event logs, device-map, and anomaly investigation.29- `references/write-workflows.md`: accessory control, room/zone/scene/automation mutations, exact-id writes, verification, and audit reporting.30- `references/command-groups.md`: concise command group map and implementation caveats.3132Use `scripts/homekit-readiness.sh` when you need a deterministic local setup/readiness check.3334## Operating Rules3536- Treat locks, garage doors, gates, doors, windows, covers, security systems, cameras, doorbells, occupancy, presence, scenes, and automations as safety-critical.37- Never control a device just to test connectivity.38- Never use `--allow-actuation` unless the user asked for the exact physical state change.39- Never use `--allow-mutation` unless the user asked for the exact HomeKit structural change.40- Never wildcard writes. Resolve names to exact IDs first, then use those exact IDs.41- If multiple accessories, scenes, rooms, zones, or automations match, show candidates and ask the user to choose.42- After any accepted write, report the command family, target name/id, requested value/change, verification result, and returned `auditId` when present.4344## Default Flow45461. Check HomeClaw readiness:4748 ```bash49 homekit bridge setup --format json50 homekit status --format json51 ```52532. Build context with read-only commands:5455 ```bash56 homekit homes list --format json57 homekit rooms list --format json58 homekit accessories list --format json59 homekit scenes list --format json60 homekit automations list --format json61 homekit events list --limit 50 --format json62 ```63643. Narrow to exact IDs:6566 ```bash67 homekit accessories search "<query>" --format json68 homekit accessories get <accessoryId> --format json69 homekit scenes get <sceneId> --format json70 homekit automations get <automationId> --format json71 ```72734. Before a write, inspect the exact command schema:7475 ```bash76 homekit accessories control --schema --format json77 homekit rooms rename --schema --format json78 ```79805. Verify with the narrowest relevant read and recent events:8182 ```bash83 homekit accessories get <accessoryId> --format json84 homekit events list --limit 20 --format json85 ```8687## Scenario Routing8889- **Initial setup or “is it working?”**: read `setup-and-troubleshooting.md`, run the readiness script or `bridge setup`, then confirm `status`.90- **Inventory or mapping request**: read `inspection-workflows.md`; prefer `device-map` for broad topology and `get` commands for exact details.91- **Unexpected automation/device behavior**: read `inspection-workflows.md`; compare `events list`, `automations list/get`, scenes, and affected accessories before proposing writes.92- **Physical control request**: read `write-workflows.md`; require exact accessory id, characteristic, value, and explicit actuation approval.93- **Home structure change**: read `write-workflows.md`; require exact ids and `--allow-mutation`; prefer disable over delete when undo risk is unclear.94- **Command uncertainty**: read `command-groups.md`, then ask the CLI for help/schema.