Skip to main content

Browser tracking and analytics with CLI, dashboard, and LLM integration

Project description

BrowserFriend

Track, analyse and understand your browsing habits. BrowserFriend is a browser analytics tool that silently records your tab activity, generates AI-powered insights, and emails you a dashboard with session summaries.

  • Chrome extension — tracks tab switches and page visits
  • Local server — stores data in SQLite on your machine
  • AI insights — Gemini-powered analysis of your browsing patterns
  • Email dashboard — HTML report sent to your inbox via Resend or SMTP

Installation

pip install browserfriend

Requires Python 3.12+.


Quick Start

# 1. Configure your email
bf setup

# 2. Start the tracking server
bf start

# 3. Load the Chrome extension (see below)

# 4. Browse as usual — the extension sends visits to the server

# 5. Stop tracking and get your dashboard
bf stop
bf dashboard   # Generates AI insights and sends to your email

Chrome Extension Setup

The extension is not included in the PyPI package. You must load it from the repository.

Option A: Clone the extension directory

  1. Clone or download the extension folder from the repo:

    git clone https://github.com/prabhakar1234pr/browserfriend.git
    cd browserfriend/extension
    

    Or download the extension folder directly:
    https://github.com/prabhakar1234pr/browserfriend/tree/main/extension

  2. Open Chrome Extensions
    Go to chrome://extensions in your browser.

  3. Enable Developer mode
    Toggle Developer mode on (top-right corner).

  4. Load unpacked
    Click Load unpacked and select the extension folder (the one containing manifest.json).

  5. Verify
    The BrowserFriend icon should appear in your toolbar. Click it to see the popup — it should show "Server Offline" until you run bf start.

Option B: Download as ZIP

  1. Go to https://github.com/prabhakar1234pr/browserfriend
  2. Click CodeDownload ZIP
  3. Extract the archive and navigate to the extension folder
  4. Follow steps 2–5 from Option A above

CLI Commands

Command Description
bf setup Configure your email (required before first use)
bf start Start the tracking server
bf stop Stop the server and show session summary
bf status Show server and session status
bf dashboard Generate AI insights and send dashboard to your email

bf setup

Registers your email so visits and dashboards are associated with you. Run this first.

bf setup

bf start

Starts the local server at http://localhost:8000. The extension connects to this server.

# Run until you stop it
bf start

# Auto-stop after 5 minutes
bf start --duration 5m

# Auto-stop after 2 hours
bf start -d 2h

# Auto-stop after 1 day
bf start -d 1d

Duration format: 5m (minutes), 2h (hours), 1d (days).

bf stop

Stops the server and displays a summary of the session (duration, visits, top domains).

bf stop

bf status

Shows whether the server is running and the current session details.

bf status

bf dashboard

Generates an AI-powered dashboard for your latest (or specified) session and sends it to your email.

# Use latest session
bf dashboard

# Use a specific session
bf dashboard --session-id e939917b-7888-4f5c-8ef8-610ec02a6a22

Admin Dashboard

When the server is running, open the admin dashboard in your browser:

http://localhost:8000/admin

  • Sessions — All browsing sessions with visit counts and durations
  • Dashboards — All generated dashboards (view past reports, preview HTML)

The admin URL is also shown when you run bf start.


Configuration

Create a .env file in your project directory (or current working directory) to customise:

# Required for AI insights
GEMINI_API_KEY=your_gemini_api_key

# Required for email delivery
RESEND_API_KEY=your_resend_api_key
# Or use SMTP:
# EMAIL_PROVIDER=smtp
# SMTP_HOST=smtp.gmail.com
# SMTP_PORT=587
# SMTP_USERNAME=your@email.com
# SMTP_PASSWORD=your_app_password

# Optional
USER_EMAIL=your@email.com

Database location: ~/.browserfriend/browserfriend.db


Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

browserfriend-0.3.0.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

browserfriend-0.3.0-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file browserfriend-0.3.0.tar.gz.

File metadata

  • Download URL: browserfriend-0.3.0.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for browserfriend-0.3.0.tar.gz
Algorithm Hash digest
SHA256 eb90f5d956cfa6461a37a8a6705dd934a0413ec639fe4c47680fba05d6a78666
MD5 215ca44b3269203fa3028f8432a52201
BLAKE2b-256 c403674189c179508d1573f7c3c741dc80a6c97d0fca60793ab8b226fa5b56a1

See more details on using hashes here.

File details

Details for the file browserfriend-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: browserfriend-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for browserfriend-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7a736c627cd1bf35a89208654055011b4aab05d802ada090f1ed037d120bae5
MD5 40ded90f7e2b241e2b2d34345a99ebb0
BLAKE2b-256 ea6670e61188880b2df24ac7dd5bd73acd32f69ba280bad1db6e8ba193698691

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page