apfelclaw is an AI agent for tasks with macOS using Apple's Foundation model via apfel.
22
stars
45
commits
Swift
primary language
Sep 6, 2026
updated
Disclaimer: This project is in very early development. It is not intended for production use or real-world tasks and is provided for experimental purposes only. Use it at your own risk. We are not liable for any security issues, data loss, or other damages resulting from its use.
apfelclaw is a locally running AI agent for tasks with macOS using Apple's Foundation model via apfel.
The repository is organized as a small monorepo:
packages/apfelclaw-server: Swift backend runtime, local API, tool execution, and persistenceapps/cli: Node-based apfelclaw command tool with onboarding and lifecycle commandsapps/tui: Separate chat applicationapfelclaw: convenience launcher for the Node CLI in this repoThis project currently targets Apple Silicon Macs running macOS 26 Tahoe or newer. It depends on Apple platform APIs such as EventKit, Apple Mail, Apple Notes, and Spotlight-backed file search, and it expects apfel 1.8.4 or newer to be installed locally for model execution.
brew tap julianYaman/apfelclaw
brew install apfelclaw
The Homebrew formula can install the Node-based apfelclaw command tool, the separate chat app, and the Swift backend runtime together.
apfel 1.8.4 or newer installed and available on PATHapfelclaw inherits the same macOS baseline as apfel, because model execution is delegated to the local apfel server. GET /status and /apfel status report whether the installed binary meets that recommended minimum, plus live /health fields such as prewarmed and contextWindow.
bun install
./apfelclaw
The CLI runs the onboarding flow, can optionally set up Telegram remote control, and starts the backend in the background.
This launcher script runs the Node apfelclaw command tool from the repo root.
cd apps/tui
bun install
bun run dev
Or use the chat command through the CLI:
./apfelclaw chat
You can also use the root scripts:
./apfelclaw
./apfelclaw serve
./apfelclaw chat
npm run dev:server
npm run dev:tui
The backend keeps using apfel for model execution.
apfelclaw: onboarding on first run, then help and local statusapfelclaw setup: re-run the onboarding guideapfelclaw serve: run the backend in the foregroundapfelclaw chat: launch the terminal chat client when the backend is already runningapfelclaw stop: stop the managed backendapfelclaw --status: print backend, apfel, and remote-control statusapfelclaw --update: update apfelclaw and Homebrew-managed apfelAPI endpoints:
GET /healthGET /statusGET /configPATCH /configGET /toolsGET /sessionsPOST /sessionsGET /sessions/:id/messagesPOST /sessions/:id/messagesGET /sessions/:id/stream WebSocket stream for live session eventsHTTP response headers:
Server: apfelclaw/0.2.3Config API:
GET /config returns flat global app config JSON:{
"assistantName": "Apfelclaw",
"userName": "You",
"approvalMode": "trusted-readonly",
"debug": false,
"apfelHost": "127.0.0.1",
"apfelPort": 11434
}
PATCH /config accepts the same flat keys as optional fields and returns the updated config.approvalMode values are always, ask-once-per-tool-per-session, and trusted-readonly.debug is a boolean global flag for backend debug logging.apfelHost / apfelPort select the local apfel server. Defaults are 127.0.0.1:11434. If Ollama already uses that port, set a free apfelPort and restart apfelclaw.~/.apfelclaw/config.json and persists across server restarts.~/.apfelclaw/state.json.~/.apfelclaw/memory.sqlite.Ctrl+C triggers a graceful server shutdown before process exit.Server response header.debug is true, the server prints each HTTP request, the IntentRouter decision for chat turns, and tool call arguments and results.packages/apfelclaw-server/TOOLS.md and in the JSON catalog under Sources/ApfelClawCore/Resources/tools.json.Contribution guidelines live in CONTRIBUTING.md. Please read that file before opening a pull request.
This project is available under the MIT License. See LICENSE.
42 commits
3 commits
Swift
75.8%
Astro
9.0%
JavaScript
7.9%
TypeScript
7.3%
apfelclaw is an AI agent for tasks with macOS using Apple's Foundation model via apfel.
22
stars
45
commits
Swift
primary language
Sep 6, 2026
updated
Disclaimer: This project is in very early development. It is not intended for production use or real-world tasks and is provided for experimental purposes only. Use it at your own risk. We are not liable for any security issues, data loss, or other damages resulting from its use.
apfelclaw is a locally running AI agent for tasks with macOS using Apple's Foundation model via apfel.
The repository is organized as a small monorepo:
packages/apfelclaw-server: Swift backend runtime, local API, tool execution, and persistenceapps/cli: Node-based apfelclaw command tool with onboarding and lifecycle commandsapps/tui: Separate chat applicationapfelclaw: convenience launcher for the Node CLI in this repoThis project currently targets Apple Silicon Macs running macOS 26 Tahoe or newer. It depends on Apple platform APIs such as EventKit, Apple Mail, Apple Notes, and Spotlight-backed file search, and it expects apfel 1.8.4 or newer to be installed locally for model execution.
brew tap julianYaman/apfelclaw
brew install apfelclaw
The Homebrew formula can install the Node-based apfelclaw command tool, the separate chat app, and the Swift backend runtime together.
apfel 1.8.4 or newer installed and available on PATHapfelclaw inherits the same macOS baseline as apfel, because model execution is delegated to the local apfel server. GET /status and /apfel status report whether the installed binary meets that recommended minimum, plus live /health fields such as prewarmed and contextWindow.
bun install
./apfelclaw
The CLI runs the onboarding flow, can optionally set up Telegram remote control, and starts the backend in the background.
This launcher script runs the Node apfelclaw command tool from the repo root.
cd apps/tui
bun install
bun run dev
Or use the chat command through the CLI:
./apfelclaw chat
You can also use the root scripts:
./apfelclaw
./apfelclaw serve
./apfelclaw chat
npm run dev:server
npm run dev:tui
The backend keeps using apfel for model execution.
apfelclaw: onboarding on first run, then help and local statusapfelclaw setup: re-run the onboarding guideapfelclaw serve: run the backend in the foregroundapfelclaw chat: launch the terminal chat client when the backend is already runningapfelclaw stop: stop the managed backendapfelclaw --status: print backend, apfel, and remote-control statusapfelclaw --update: update apfelclaw and Homebrew-managed apfelAPI endpoints:
GET /healthGET /statusGET /configPATCH /configGET /toolsGET /sessionsPOST /sessionsGET /sessions/:id/messagesPOST /sessions/:id/messagesGET /sessions/:id/stream WebSocket stream for live session eventsHTTP response headers:
Server: apfelclaw/0.2.3Config API:
GET /config returns flat global app config JSON:{
"assistantName": "Apfelclaw",
"userName": "You",
"approvalMode": "trusted-readonly",
"debug": false,
"apfelHost": "127.0.0.1",
"apfelPort": 11434
}
PATCH /config accepts the same flat keys as optional fields and returns the updated config.approvalMode values are always, ask-once-per-tool-per-session, and trusted-readonly.debug is a boolean global flag for backend debug logging.apfelHost / apfelPort select the local apfel server. Defaults are 127.0.0.1:11434. If Ollama already uses that port, set a free apfelPort and restart apfelclaw.~/.apfelclaw/config.json and persists across server restarts.~/.apfelclaw/state.json.~/.apfelclaw/memory.sqlite.Ctrl+C triggers a graceful server shutdown before process exit.Server response header.debug is true, the server prints each HTTP request, the IntentRouter decision for chat turns, and tool call arguments and results.packages/apfelclaw-server/TOOLS.md and in the JSON catalog under Sources/ApfelClawCore/Resources/tools.json.Contribution guidelines live in CONTRIBUTING.md. Please read that file before opening a pull request.
This project is available under the MIT License. See LICENSE.
42 commits
3 commits
Swift
75.8%
Astro
9.0%
JavaScript
7.9%
TypeScript
7.3%