A Rust-based command-line interface for the Tab-Session-Manager extension. This tool allows you to extract, query, and export session data directly from Zen Browser IndexedDB storage on macOS.
- Direct Storage Access: Reads and parses the binary IndexedDB data (including Snappy compression and SpiderMonkey Structured Clone format) directly from the browser profile.
- Smart Formatting: Outputs sessions in a human-readable Markdown format with dates, titles, and session tags.
- JSON Export: Supports
--jsonflag for newline-delimited JSON output, perfect for scripting and integration with other tools. - Advanced Filtering:
- By Date: Use natural language queries like
--from "2 days","yesterday", or specific dates. - By Type: Default to "user" sessions or include auto-saved types with
--all.
- By Date: Use natural language queries like
- Profile Detection: Automatically detects Zen Browser profiles and the specific extension UUID.
- macOS (currently only macOS is supported)
- Zen Browser with Tab Session Manager extension installed
- Rust toolchain (for building from source)
cargo install --path .tsm --help
Tab Session Manager CLI
Usage: tsm [OPTIONS]
Options:
-j, --json Output as JSON lines
-p, --profile <PROFILE> Profile name to use
-f, --from <FROM> Filter sessions from a specific date (e.g. "2" or "2 days", "yesterday", "2024-01-01")
-a, --all Include all session types (default: only "user" sessions)
-h, --help Print help
-V, --version Print versionThis tool implements a custom parser for the internal storage format used by Firefox/Zen for IndexedDB, which involves:
- SQLite: Reading the backing store.
- Snappy: Decompressing value blobs.
- Structured Clone: Parsing the SpiderMonkey binary serialization format.
The core parsing logic is isolated in a separate crate moz-idb-sc (Mozilla IndexedDB Structured Clone), designed to be a re-usable library for:
- Raw Data Export: Includes a binary
sc-exportfor exporting raw data from any Firefox/SpiderMonkey IndexedDB. - Standalone Parsing: Can be used by other Rust projects to interpret proprietary Mozilla formats.
The moz-idb-sc crate includes a standalone binary sc-export that can parse any Firefox/Zen IndexedDB SQLite file containing structured clone data.
# Install
cargo install --path moz-idb-sc --bin sc-export
# Usage
sc-export <path/to/sqlite/file>It outputs newline-delimited JSON for every row found in the object_data table, making it an invaluable tool for debugging or data recovery.
- Currently macOS-only (Linux/Windows support not yet planned)
- Zen Browser specific (could be extended to Firefox)