Parse and analyze Chromium-based browser session files (Chrome, Vivaldi, Brave, Edge) with workspace support, history, bookmarks, and tab organization
Project description
chromium-session
Parse and analyze session files from Chromium-based browsers (Chrome, Vivaldi, Brave, Edge) with support for workspaces, profiles, bookmarks, history, and tab management.
Features
- ๐ Auto-detection: Automatically finds and uses the most recently modified session
- ๐ Multi-browser support: Chrome, Vivaldi, Brave, Edge, Opera, Arc, and more
- ๐ค Profile detection: Automatically detects and lists all browser profiles
- ๐ Workspace support: Parse Vivaldi workspaces and group tabs accordingly
- ๐ Session analysis: View active/deleted tabs, windows, and session statistics
- ๐พ Multiple export formats: Rich terminal display, JSON, or CSV export
- ๐ Bookmarks parser: View bookmarks with folder structure
- ๐ History parser: Browse browsing history with search and filtering
- ๐๏ธ Tab organization: Reorganize tabs by domain or title and write back to session files
Installation
From PyPI (Coming Soon)
pip install chromium-session
Using uv (recommended)
uv pip install chromium-session
From Source
git clone https://github.com/Asseel-Naji/chromium-session.git
cd chromium-session
uv pip install -e .
Requirements
- Python 3.12+
- Linux (primary support)
- Chromium-based browser(s) installed
Usage
Quick Start with Auto-Detection
All commands support auto-detection - just omit the browser parameter:
# Automatically detects and uses the most recent session
chromium-session summary
chromium-session parse
chromium-session bookmarks
chromium-session history --limit 20
List Detected Browsers
Show all detected Chromium-based browsers and their profiles:
chromium-session list
Example output:
Detected Browsers
โโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโ
โ ID โ Name โ Profiles โ Sessions โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ chrome โ Google Chrome โ Default โ 1/1 โ
โ vivaldi โ Vivaldi โ Default, Profile 2, Profile 4 โ 5/5 โ
โ brave โ Brave โ Default โ 1/1 โ
โ edge โ Microsoft Edge โ Default โ 1/1 โ
โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโ
List Browser Profiles
Show all profiles for a specific browser:
chromium-session profiles vivaldi
View Session Summary
Get a quick overview of tabs and windows:
chromium-session summary vivaldi
Example output:
Vivaldi / Default
Session: Session_13402871234567
โโโโโโโโโโโโโโโณโโโโโโโโ
โ Metric โ Value โ
โกโโโโโโโโโโโโโโโโโโโโโโฉ
โ Total tabs โ 127 โ
โ Active tabs โ 115 โ
โ Deleted tabsโ 12 โ
โ Windows โ 3 โ
โโโโโโโโโโโโโโโดโโโโโโโโ
Tabs by Workspace
โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Workspace โ Tabs โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Work โ 42 โ
โ Research โ 38 โ
โ Personal โ 35 โ
โ No Workspace โ 12 โ
โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Parse Session Files
Parse and display all tabs in the latest session:
# Parse latest session (default)
chromium-session parse vivaldi
# Parse specific profile
chromium-session parse vivaldi --profile "Default"
# Parse multiple recent sessions
chromium-session parse vivaldi --latest 3
# Show deleted tabs as well
chromium-session parse vivaldi --show-deleted
# Group tabs by workspace (Vivaldi)
chromium-session parse vivaldi --by-workspace
List Workspaces (Vivaldi)
Show all defined workspaces:
chromium-session workspaces vivaldi
Example output:
Workspaces in Vivaldi / Default
โโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโ
โ Emoji โ Name โ ID โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ ๐ผ โ Work โ 1 โ
โ ๐ฌ โ Research โ 2 โ
โ ๐ โ Personal โ 3 โ
โโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโ
Browse Bookmarks
Display bookmarks with folder structure:
# Auto-detect browser
chromium-session bookmarks
# Specific browser
chromium-session bookmarks --browser chrome
# Export as JSON
chromium-session bookmarks --json > bookmarks.json
Browse History
View browsing history with search and filtering:
# Show last 50 entries (default)
chromium-session history
# Search for specific term
chromium-session history --search "python"
# Filter by domain
chromium-session history --domain "github.com"
# Limit results
chromium-session history --limit 100
# Export as JSON
chromium-session history --json > history.json
Organize Tabs
Reorganize tabs by domain or title and write back to session files:
# Organize by domain (preview)
chromium-session organize --by-domain --dry-run
# Organize by domain (apply)
chromium-session organize --by-domain
# Sort alphabetically by title
chromium-session organize --by-title
# Organize specific browser
chromium-session organize --browser vivaldi --by-domain
Note: Automatic backup is created before modifying session files.
CSV Export
Export session data to CSV format:
# Export to CSV
chromium-session parse --csv > sessions.csv
# Include deleted tabs
chromium-session parse --csv --show-deleted > all_tabs.csv
JSON Output
Export session data as JSON:
# Export session data
chromium-session parse vivaldi --json > session.json
# Export workspaces
chromium-session workspaces vivaldi --json > workspaces.json
Command Reference
Global Options
| Option | Description |
|---|---|
--help |
Show help message |
--install-completion |
Install shell completion |
Commands
list
List all detected Chromium-based browsers.
chromium-session list
profiles <browser>
List all profiles for a specific browser.
chromium-session profiles vivaldi
Arguments:
browser: Browser ID (e.g.,chrome,vivaldi,brave,edge)
summary <browser>
Show quick summary statistics for the latest session.
chromium-session summary vivaldi [OPTIONS]
Arguments:
browser: Browser ID
Options:
--profile,-p: Specific profile name
parse <browser>
Parse and display session files.
chromium-session parse vivaldi [OPTIONS]
Arguments:
browser: Browser ID
Options:
--profile,-p: Specific profile name--latest,-n: Number of recent sessions to parse (default: 1)--json,-j: Output as JSON--show-deleted: Include deleted tabs and windows--by-workspace,-W: Group tabs by workspace (Vivaldi only)
workspaces <browser>
List defined workspaces (Vivaldi only).
chromium-session workspaces vivaldi [OPTIONS]
Arguments:
browser: Browser ID
Options:
--profile,-p: Specific profile name--json,-j: Output as JSON
Use Cases
Session Recovery
Recover tabs after a browser crash:
# View all tabs from the latest session
chromium-session parse vivaldi --show-deleted
# Export to JSON for processing
chromium-session parse vivaldi --json > crashed-session.json
Tab Management
Analyze your browsing habits:
# See how many tabs you have per workspace
chromium-session summary vivaldi
# Find specific tabs
chromium-session parse vivaldi --json | jq '.windows[].tabs[] | select(.title | contains("Python"))'
Multi-Profile Management
Work with multiple browser profiles:
# List all profiles
chromium-session profiles vivaldi
# Parse specific profile
chromium-session parse vivaldi --profile "Work"
Browser Support
| Browser | ID | Session Support | Workspace Support |
|---|---|---|---|
| Google Chrome | chrome |
โ | โ |
| Vivaldi | vivaldi |
โ | โ |
| Brave | brave |
โ | โ |
| Brave Nightly | brave-nightly |
โ | โ |
| Microsoft Edge | edge |
โ | โ |
Running as a Module
You can also run the package as a Python module:
python -m chromium_session list
Development
Setup Development Environment
git clone https://github.com/yourusername/chromium-session.git
cd chromium-session
uv venv
source .venv/bin/activate
uv pip install -e .
Project Structure
chromium-session/
โโโ src/
โ โโโ chromium_session/
โ โโโ __init__.py
โ โโโ __main__.py # Module entry point
โ โโโ cli.py # Typer CLI interface
โ โโโ parser.py # Session file parser
โ โโโ browsers.py # Browser detection logic
โโโ pyproject.toml
โโโ README.md
Troubleshooting
No browsers detected
Problem: chromium-session list shows no browsers.
Solution: Ensure you have at least one Chromium-based browser installed in the default location:
- Chrome:
~/.config/google-chrome/ - Vivaldi:
~/.config/vivaldi/ - Brave:
~/.config/BraveSoftware/Brave-Browser/ - Edge:
~/.config/microsoft-edge/
Session files not found
Problem: Browser is detected but sessions show 0/N.
Solution: The browser must have been run at least once. Session files are created in:
<browser-config-dir>/<profile>/Sessions/
Import errors after moving project
Problem: python -m chromium_session fails with import errors.
Solution: Reinstall the package in the new location:
uv pip install -e .
License
MIT License - See LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Author
Asseel Naji
Acknowledgments
Project details
Release history Release notifications | RSS feed
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 chromium_session-0.2.0.tar.gz.
File metadata
- Download URL: chromium_session-0.2.0.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36f82f6c14a52427a9a58f2bae825b612cc88f722bbeb3fc745cea53fcbe93b6
|
|
| MD5 |
d19f9f5e3cccdbf8918c6a1d7c9c6494
|
|
| BLAKE2b-256 |
22240bfc3f2fc07586adcf9a0cc48338a125bd36237b0bcb4619798cf356de91
|
Provenance
The following attestation bundles were made for chromium_session-0.2.0.tar.gz:
Publisher:
workflow.yml on Asseel-Naji/chromium-session
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chromium_session-0.2.0.tar.gz -
Subject digest:
36f82f6c14a52427a9a58f2bae825b612cc88f722bbeb3fc745cea53fcbe93b6 - Sigstore transparency entry: 890834594
- Sigstore integration time:
-
Permalink:
Asseel-Naji/chromium-session@5e89c40bdeb18ae6e00faeb0c5ccb8b59da4f8bd -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Asseel-Naji
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@5e89c40bdeb18ae6e00faeb0c5ccb8b59da4f8bd -
Trigger Event:
release
-
Statement type:
File details
Details for the file chromium_session-0.2.0-py3-none-any.whl.
File metadata
- Download URL: chromium_session-0.2.0-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a8042593d15c656832aedf0d1bd686b3a95248933135727794396a9b94c98e1
|
|
| MD5 |
417e9edc15a0f40cebbafa3a35d4abdb
|
|
| BLAKE2b-256 |
601082463eea21571611c6f295f851310b6317c92d77e8d430befb75734effca
|
Provenance
The following attestation bundles were made for chromium_session-0.2.0-py3-none-any.whl:
Publisher:
workflow.yml on Asseel-Naji/chromium-session
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chromium_session-0.2.0-py3-none-any.whl -
Subject digest:
0a8042593d15c656832aedf0d1bd686b3a95248933135727794396a9b94c98e1 - Sigstore transparency entry: 890834616
- Sigstore integration time:
-
Permalink:
Asseel-Naji/chromium-session@5e89c40bdeb18ae6e00faeb0c5ccb8b59da4f8bd -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Asseel-Naji
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@5e89c40bdeb18ae6e00faeb0c5ccb8b59da4f8bd -
Trigger Event:
release
-
Statement type: