A privacy-first macOS menu bar app that monitors typing, detects self-critical language patterns locally, and gently prompts reframing with Claude API assistance.
- Privacy-First Design: All text monitoring and pattern detection happens 100% locally on your device
- Gentle Intervention: Non-intrusive floating indicator appears near cursor when self-critical language is detected
- Smart Detection: Uses hand-crafted regex patterns + Apple NLP sentiment analysis for accurate detection
- Built-in Reframes: Local library of compassionate reframe suggestions - works offline, no API needed
- Optional AI Enhancement: Claude API integration available for personalized AI-powered suggestions
- Menu Bar Only: Runs quietly in your menu bar without a dock icon
- macOS 13.0 or later
- Xcode 15.0 or later (for building)
- Anthropic API key (optional, for AI-powered suggestions)
- Clone or download the project
- Open
Axo.xcodeprojin Xcode - Build and run (Cmd+R)
- Grant Accessibility permission when prompted
- When Axo launches, you'll see a heart icon in your menu bar
- Click the icon to access the menu
- Grant Accessibility permission to enable keyboard monitoring
Axo detects self-critical language patterns including:
- Absolute negatives: "I always mess up", "I never get it right"
- Self-labeling: "I'm so stupid", "I'm such a failure"
- Self-blame: "It's all my fault", "I should have known better"
- Catastrophizing: "Nothing I do is good enough"
- Worthlessness: "I hate myself", "What's wrong with me"
- A small heart bubble appears near your cursor
- After 3 seconds, it expands showing the detected phrase
- Click "Yes, help me" to get reframe suggestions
- Click "Dismiss" to close the bubble
- If ignored, the bubble fades after 8 seconds
By default, Axo uses its built-in library of compassionate reframe suggestions. No API key is required for basic functionality.
For personalized AI-generated reframes:
- Open Settings from the menu bar
- Go to the API tab
- Enter your Anthropic API key
- AI suggestions will be available alongside local reframes
- Local Processing: All keyboard monitoring and pattern detection happens on your device
- No Persistent Storage: Text is stored in a rolling 500-character buffer that is never saved to disk
- Opt-in API: The Claude API is only called when you explicitly click "Help me"
- Secure Storage: API keys are stored in macOS Keychain
Axo/
├── App/
│ ├── AxoApp.swift # Main entry with MenuBarExtra
│ ├── AppDelegate.swift # Panel management
│ └── AppState.swift # Observable state manager
│
├── Core/
│ ├── Debug.swift # Conditional debug logging
│ ├── KeyboardMonitor/
│ │ ├── GlobalKeyboardMonitor.swift
│ │ ├── TextBuffer.swift
│ │ ├── PermissionManager.swift
│ │ └── CaretPositionHelper.swift
│ │
│ ├── PatternDetection/
│ │ ├── SelfCriticalPatternDetector.swift
│ │ ├── PatternLibrary.swift
│ │ └── DetectionResult.swift
│ │
│ ├── Reframes/
│ │ └── ReframeLibrary.swift
│ │
│ └── Services/
│ ├── ClaudeAPIService.swift
│ └── KeychainService.swift
│
├── UI/
│ ├── MenuBar/MenuBarView.swift
│ ├── Indicator/
│ │ ├── IndicatorPanel.swift
│ │ ├── IndicatorContentView.swift
│ │ └── IndicatorController.swift
│ ├── ReframeSheet/
│ │ ├── ReframeView.swift
│ │ └── SuggestionCard.swift
│ └── Settings/SettingsView.swift
│
├── Models/
│ ├── DetectedPhrase.swift
│ └── ReframeSuggestion.swift
│
└── Resources/
└── Assets.xcassets
AxoTests/
├── Core/
│ ├── TextBufferTests.swift
│ ├── PatternLibraryTests.swift
│ ├── ReframeLibraryTests.swift
│ └── PatternDetectorTests.swift
└── Integration/
└── DetectionPipelineTests.swift
- Keyboard Monitoring: Uses CGEventTap with
.listenOnlyoption (non-intercepting) - Floating Panel: NSPanel with
.nonactivatingPanelstyle (doesn't steal focus) - Pattern Detection: Hand-crafted regex patterns + Apple NLP sentiment analysis
- Local Reframes: Built-in library of compassionate reframe suggestions
- API Integration: Optional Anthropic Claude API for AI-powered suggestions (stored securely in Keychain)
Run tests via command line:
./run_tests.shOr via Xcode: Cmd+U to run all tests.
Test coverage includes:
- TextBuffer operations and edge cases
- Pattern matching accuracy (19 categories)
- Reframe library lookups
- Detection pipeline integration
MIT License