39 lines
1.7 KiB
Markdown
39 lines
1.7 KiB
Markdown
# CLAUDE.md
|
|
|
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
./gradlew run # App starten
|
|
./gradlew compileKotlin # Nur kompilieren
|
|
./gradlew packageDmg # macOS DMG bauen
|
|
```
|
|
|
|
## Architecture
|
|
|
|
**AnyTask** ist eine Kotlin/Compose-Desktop-App, die im Hintergrund läuft und über eine globale Tastenkombination (Ctrl+Shift+Space) ein Fenster zum Erstellen von AnyType-Tasks zeigt.
|
|
|
|
### Komponenten
|
|
|
|
- **`Main.kt`** — Einstiegspunkt. Setzt `apple.awt.UIElement=true` (kein Dock-Icon), startet die Compose-`application {}`, richtet System-Tray und HotkeyManager ein.
|
|
- **`hotkey/HotkeyManager.kt`** — JNativeHook-Wrapper. Registriert Ctrl+Shift+Space als systemweiten Hotkey und dispatcht den Callback auf den AWT-EDT.
|
|
- **`ui/TaskWindow.kt`** — Compose-UI mit Formular (Titel, Details). Escape schliesst, ⌘↵ erstellt.
|
|
- **`api/AnyTypeClient.kt`** — Ktor-HTTP-Client für die lokale AnyType-API (`localhost:31007`). Momentan Skeleton — API-Details müssen noch verifiziert werden.
|
|
|
|
### Stack
|
|
|
|
- Kotlin 2.1.0 / Compose Multiplatform 1.7.1
|
|
- JNativeHook 2.2.2 (globale Hotkeys)
|
|
- Ktor 3.0.0 + kotlinx.serialization (AnyType API)
|
|
- Gradle 9.2.1
|
|
|
|
## macOS-Hinweise
|
|
|
|
- **Accessibility-Berechtigung** für JNativeHook: System Settings → Privacy & Security → Accessibility → App hinzufügen. Ohne diese Berechtigung funktioniert der globale Hotkey nicht.
|
|
- Das Tray-Icon erscheint in der Menüleiste (kein Dock-Icon, da `apple.awt.UIElement=true`).
|
|
|
|
## AnyType API
|
|
|
|
Die lokale AnyType-API läuft via `anytype-heart` auf `http://localhost:31007`. Der `appKey` und die `spaceId` in `AnyTypeClient` müssen noch konfigurierbar gemacht werden.
|