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.2.tar.gz (40.7 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.2-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: browserfriend-0.3.2.tar.gz
  • Upload date:
  • Size: 40.7 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.2.tar.gz
Algorithm Hash digest
SHA256 f04bdbe45a564a3112ff88e2aab2e79607a50a639a9a11207ff483298e5d3618
MD5 984461240655ffa55b139cfcae58623b
BLAKE2b-256 670a1422f60179daca3a5005034ee47992ba855848633fc2d1381b206b078add

See more details on using hashes here.

File details

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

File metadata

  • Download URL: browserfriend-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 47.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20c90ea8232b77c6939a30db1887b1f5da8adf9ad5c3356097aca0c62902d76f
MD5 95ab6e9c78159d70fcb211234ff449cc
BLAKE2b-256 3a502ae3f575699f29763e41490f022d1c0430e861a84901c4dd1aa12ac7415b

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