explaingit

dhomyzolensky/homekit

0TypeScriptAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

Bridge that exposes Apple Home accessories, scenes, and automations to a CLI, an MCP server for AI assistants, and an openclaw plugin via a native macOS companion app.

Mindmap

mindmap
  root((homekit))
    Inputs
      CLI commands
      MCP tool calls
      Companion app permissions
    Outputs
      Accessory state changes
      Scene activations
      JSON scene exports
    Use Cases
      Script lights from terminal
      Let Claude run scenes
      Trigger automations from agents
    Tech Stack
      TypeScript
      Node.js
      Swift
      SwiftUI
      MCP

Things people build with this

USE CASE 1

Control Apple Home accessories from a terminal script

USE CASE 2

Let Claude Desktop or Cursor turn off lights via MCP

USE CASE 3

Export and version-control scenes as JSON files

Tech stack

TypeScriptNode.jsSwiftSwiftUIMCP

Getting it running

Difficulty · moderate Time to first run · 30min

Requires the native macOS companion app from the App Store to hold real HomeKit permissions; the Node packages talk to that app.

MIT license lets anyone use, modify, and redistribute the code as long as the copyright notice is kept.

In plain English

Homekit is a project that lets you control an Apple Home setup, meaning the lights, locks, thermostats, scenes, and automations registered in Apple's smart home app, by typing commands in a terminal or by talking to an AI assistant. Apple normally only exposes this through its own apps on iPhone or Mac, so this project acts as a bridge that opens it up to scripts and to AI agents. There are three ways to use it. The first is a command line tool called homekit-cli, installed with npm install -g homekit-cli. After running homekit auth once to grant access, the user can run commands like homekit list to see all accessories, homekit set "Living Room Lights" on, homekit set "Living Room Dimmer" 40 to dim to 40 percent, homekit scene "Good Morning" to activate a scene, or homekit automation run "Goodnight" to trigger an automation. Scenes can also be exported and imported as JSON files. The second way is an MCP server called homekit-mcp. MCP, the Model Context Protocol, is a standard for letting AI assistants call external tools. The README shows the config snippets needed to plug it into Claude Desktop, Cursor, and Windsurf, after which the user can ask the agent things like turn off all the lights in the bedroom or set the thermostat to 72 degrees. The server exposes a fixed set of tools, including listing and setting accessories, activating and creating scenes, and running automations. The third way is a plugin for an agent framework called openclaw, added with openclaw plugin add homekit and listed in openclaw.yaml. Under the hood, the CLI and MCP packages are pure Node.js. They talk to Apple Home through a native macOS companion app, written in Swift and SwiftUI and distributed on the App Store, which holds the actual HomeKit permissions. The repository is a monorepo with packages for the CLI, the MCP server, and the openclaw plugin. It is MIT licensed and currently has 0 stars.

Copy-paste prompts

Prompt 1
Install homekit-cli globally and walk me through the homekit auth flow
Prompt 2
Wire the homekit-mcp server into Claude Desktop and list the available tools
Prompt 3
Show me the MCP tool schema for setting an accessory value
Prompt 4
Add an openclaw plugin command that runs the Goodnight automation at sunset
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.