Skip to content

A Go-based personal telemetry agent for macOS that collects data about active applications, browser tabs, and more

Notifications You must be signed in to change notification settings

fkatada/go-insightloop-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InsightLoop Collector

InsightLoop Collector Logo

Go Report Card License: MIT Go Version PRs Welcome

A powerful, privacy-first personal telemetry agent for macOS

🔍 Overview

InsightLoop Collector is a lightweight, extensible personal telemetry agent that helps you understand your digital behavior patterns. By collecting data about your active applications, window focus, browser tabs, and more, InsightLoop provides insights into your productivity, work habits, and digital life—all while keeping your data private and under your control.

✨ Key Features

  • 🔒 Privacy-First Design: All data stays on your machine—no external servers or cloud dependencies
  • 🧩 Plugin Architecture: Easily extend functionality with custom input and output plugins
  • ⚡ Lightweight & Efficient: Minimal resource usage with configurable collection intervals
  • 🔌 Flexible Output Options: Store data in files, databases, or integrate with other tools
  • 📊 Rich Data Collection:
    • Active application monitoring
    • Window focus tracking with titles
    • Shell command history integration
    • Browser tab tracking (coming soon)
    • GitHub activity integration (coming soon)
    • And more...

🚀 Getting Started

Prerequisites

  • macOS (currently macOS-only, other platforms coming soon)
  • Go 1.18 or higher

Installation

From Source

# Clone the repository
git clone https://github.com/nslaughter/insightloop-collector.git
cd insightloop-collector

# Build the binary
go build -o insightloop-collector cmd/insightloop-collector/main.go

# Run the collector
./insightloop-collector

Configuration

InsightLoop Collector looks for a configuration file in the following locations:

  1. Path specified with the --config flag
  2. ~/.config/insightloop/config.yaml

A sample configuration file is provided in configs/config.yaml. Copy it to your config directory:

mkdir -p ~/.config/insightloop
cp configs/config.yaml ~/.config/insightloop/

🛠️ Usage

Basic Usage

# Run with default configuration
./insightloop-collector

# Specify a custom configuration file
./insightloop-collector --config /path/to/config.yaml

# Set log level
./insightloop-collector --log-level debug

Available Log Levels

  • debug: Detailed debugging information
  • info: General operational information
  • warn: Warning events
  • error: Error events but application can continue running

🧩 Architecture

InsightLoop Collector is built on a flexible, plugin-based architecture:

┌─────────────────────────────────────┐
│              Agent Core             │
├─────────────┬───────────────────────┤
│ Input       │ Output                │
│ Plugins     │ Plugins               │
├─────────────┼───────────────────────┤
│ ▪ Active    │ ▪ File                │
│   Window    │   (JSON/CSV)          │
│ ▪ App       │ ▪ Logger              │
│   Tracking  │ ▪ Database            │
│ ▪ Shell     │   (coming soon)       │
│   History   │ ▪ HTTP API            │
│ ▪ More...   │   (coming soon)       │
└─────────────┴───────────────────────┘
  • Core Agent: Manages the lifecycle and coordination of plugins
  • Input Plugins: Collect data from various sources
  • Output Plugins: Send data to different destinations
  • Configuration System: Customizes behavior via YAML config

📝 Configuration

InsightLoop Collector uses a YAML configuration file. Here's a sample:

# General settings
log_level: info
collection_interval: 30s
buffer_size: 1000
shutdown_timeout_seconds: 30

# Enabled plugins
enabled_input_plugins:
  - application
  - activewindow
enabled_output_plugins:
  - logger
  - file

# Input plugin configurations
input_plugins:
  activewindow:
    collection_interval: 5s
    include_window_title: true

# Output plugin configurations
output_plugins:
  file:
    path: "${HOME}/insightloop/telemetry.json"
    format: "json"
    pretty_json: true

🔮 Roadmap

  • Browser integration (Chrome, Firefox, Safari)
  • GitHub activity tracking
  • Database output plugins (SQLite, PostgreSQL)
  • Data visualization dashboard for insights
  • Windows and Linux support
  • Machine learning for shell history pattern recognition

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgements

  • Go Uber Zap for lightning-fast, structured logging
  • Viper for configuration management
  • UUID for unique identifier generation

Built with ❤️ by nslaughter

About

A Go-based personal telemetry agent for macOS that collects data about active applications, browser tabs, and more

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published