macOS activity tracker using KnowledgeC database. Track focus time, context switches, and usage patterns.
- Focus Time Analysis - Your uninterrupted usage sessions per app
- Context Switch Tracking - Identification of frequent app switching patterns
- Daily/Weekly Metrics - Usage breakdowns and trends
- Web Dashboard - Local-first visualization
- MCP Server - Query stats via Claude
Grant Full Disk Access to your Terminal application:
- Open System Settings → Privacy & Security → Full Disk Access
- Click + and add your terminal app (Terminal.app, iTerm, etc.)
- Restart your terminal
# Install dependencies
uv sync
# Run dashboard (production mode - uses real KnowledgeC database)
SENSE_ENV=prod uv run uvicorn sense.api.main:app
# Open browser
open http://localhost:8000# Get daily stats
curl http://localhost:8000/api/stats/daily?date=2024-10-31
# Get weekly summary
curl http://localhost:8000/api/stats/weekly
# Top context switches
curl http://localhost:8000/api/switches/top?limit=10- Backend: FastAPI + SQLite (KnowledgeC)
- Cache: In-memory (dict with TTL)
- Frontend: Jinja2 templates
- Packaging: uv + pyproject.toml
- All data stays local
- Read-only access to KnowledgeC
- No external services
# Install dev dependencies
uv sync --all-extras
# Sync the KnowledgeC database (for development mode)
./scripts/sync_db.sh
# Run tests
uv run pytest
# Run locally (dev environment - uses data/knowledgeC.db)
uv run uvicorn sense.api.main:app --reload
# Run with production database (uses ~/Library/Application Support/Knowledge/knowledgeC.db)
SENSE_ENV=prod uv run uvicorn sense.api.main:app --reload- macOS with Full Disk Access
- Python 3.11+
- Access to
~/Library/Application Support/Knowledge/knowledgeC.db
If you find Sense useful:
- ⭐ Star this repo to show your support
- ☕ Buy me a coffee to fuel development
Your support helps keep this project maintained and improved!
MIT