mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
150a8175b0
Implements issue #477: Add anonymous usage telemetry using OpenPanel. Core Features: - Anonymous telemetry with random UUID installation ID - Homebrew-style opt-out (on by default, easy to disable) - Fire-and-forget tracking (errors never break the app) - No personal data or note content collection Configuration: - Added telemetry_enabled field to BasicMemoryConfig (default: True) - Added telemetry_notice_shown field to track first-run notice - Environment variable override: BASIC_MEMORY_TELEMETRY_ENABLED CLI Commands: - bm telemetry enable - Enable telemetry - bm telemetry disable - Disable telemetry - bm telemetry status - Show current status and what's collected Integration: - CLI app startup tracking with command name - MCP server startup tracking - Global properties sent with every event (version, OS, arch, etc.) Testing: - Comprehensive unit tests for all telemetry functions - Tests for config integration and environment variables - Tests for first-run notice behavior - Tests for error handling (telemetry never breaks the app) Files Changed: - pyproject.toml: Added openpanel dependency - src/basic_memory/config.py: Added telemetry configuration fields - src/basic_memory/telemetry.py: Core telemetry module - src/basic_memory/cli/commands/telemetry.py: CLI commands - src/basic_memory/cli/app.py: Added CLI startup tracking - src/basic_memory/mcp/server.py: Added MCP startup tracking - tests/test_telemetry.py: Comprehensive unit tests Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com> Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>