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
-
Clone or download the
extensionfolder from the repo:git clone https://github.com/prabhakar1234pr/browserfriend.git cd browserfriend/extension
Or download the
extensionfolder directly:
https://github.com/prabhakar1234pr/browserfriend/tree/main/extension -
Open Chrome Extensions
Go tochrome://extensionsin your browser. -
Enable Developer mode
Toggle Developer mode on (top-right corner). -
Load unpacked
Click Load unpacked and select theextensionfolder (the one containingmanifest.json). -
Verify
The BrowserFriend icon should appear in your toolbar. Click it to see the popup — it should show "Server Offline" until you runbf start.
Option B: Download as ZIP
- Go to https://github.com/prabhakar1234pr/browserfriend
- Click Code → Download ZIP
- Extract the archive and navigate to the
extensionfolder - 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 end-sessions |
End all active browsing sessions |
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 end-sessions
Ends all active (unended) browsing sessions. Useful when sessions are left open for a long time.
# End active sessions for your user only
bf end-sessions
# End active sessions for all users
bf end-sessions --all-users
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:
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file browserfriend-0.3.3.tar.gz.
File metadata
- Download URL: browserfriend-0.3.3.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78e90da32662d327cb5878b0ed3214aee11ddffbae0729f911634c8f2bc92831
|
|
| MD5 |
cae6d59d02c30a1727cb5c7c14a92833
|
|
| BLAKE2b-256 |
b65e76d240fdfc5ea4eebd47a21cc1b6b2288723ea28e114d34db48d28a41580
|
File details
Details for the file browserfriend-0.3.3-py3-none-any.whl.
File metadata
- Download URL: browserfriend-0.3.3-py3-none-any.whl
- Upload date:
- Size: 48.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c8df5336e53ecb637c9d1b4ea1dd316b4f39c503c10e03f1925d7561d5375f7
|
|
| MD5 |
f55283b584574003a3e607bb72f807ba
|
|
| BLAKE2b-256 |
43a2cbb87133f07fa7c337225bc7cbfab35169a9d2512445245fd12d494d331b
|