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.1.tar.gz (40.5 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.1-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: browserfriend-0.3.1.tar.gz
  • Upload date:
  • Size: 40.5 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.1.tar.gz
Algorithm Hash digest
SHA256 3ad2f3ece7107d4e14f485fb9f727a10827836a57dc31822f5a5ffbbbeab13f9
MD5 229742f27a8afac63be2d06c2d950926
BLAKE2b-256 3e1c418897d8a38caebf7cb01e81bb6a9b9a15919c749cecef144ea6b8d25252

See more details on using hashes here.

File details

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

File metadata

  • Download URL: browserfriend-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97d977b3725b03bdd24f68292d551bbb9852fdcb96b3ea760eaf309e7f13a364
MD5 52a5905aa4084bcd7bf2e92b3ae796f3
BLAKE2b-256 bea246ac1cbcc42f5063e2e8a80089fc83b2d8b0ce4badb04236c52a3bcaeebb

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