An advanced, lightweight extension for Firefox, Chrome, and Brave to quickly save bookmarks to customizable or date-organized folders with rich metadata and duplicate detection.
- 1-Click Right-Click Quick Save: Right-click any link or webpage background and select "Bag It (Save to BagMark)" to save directly into your default folder.
- Context Submenus for Custom Folders: Right-click submenu (
"Bag It to ▸") dynamically lists your favorite / pinned bookmark folders. - Chronological Date Organization: Optional auto-filing into year-month subfolders (e.g.
BagMark / 2026-09 / ...), created on the fly. - Rich Metadata Capture: Automatically records exact timestamps (
dateAdded), originating webpage URL/title, and any highlighted quote/text excerpt into local storage. - Duplicate Link Detection: Skips links already saved in the destination folder while allowing the same link in other collections. Compares both URLs without known tracking parameters, preserving meaningful query parameters, fragments, and path differences. Disable this in Settings to allow repeated links in the same folder.
- Interactive Popup Dashboard: Fast, search-as-you-type dashboard to filter bookmarks by title, URL, quote, or tags, with folder filters, relative time badges, and 1-click clipboard copy.
- Save Open Tabs: Expand Save open tabs in the popup, choose an existing folder or create a new subfolder, and save all web tabs from the current window in tab order. Tabs stay open, browser pages are skipped, and the result shows saved, skipped, and failed counts. The chosen folder is used directly, without automatic date subfolders.
- Options & Customization: Configure default folder name, toggle date-based subfolders, manage pinned submenu folders, and adjust alert notifications.
- Modern Stack: Built with TypeScript, Vite, Vitest, and Manifest V3.
- Node.js (v18+)
- npm or pnpm
- Mozilla Firefox (v115+), Chrome (v123+), or Brave based on Chromium v123+
-
Clone the repository:
git clone https://github.com/sonuKumar03/bagmark.git cd bagmark -
Install dependencies:
npm install
-
Run tests:
npm test -
Build the extension:
npm run build
-
Load in Firefox:
- Open Firefox and navigate to
about:debugging#/runtime/this-firefox. - Click "Load Temporary Add-on...".
- Select
dist/manifest.jsonfrom this project directory. - Right-click any link on the web to start bagging links!
- Open Firefox and navigate to
Both browsers use the same Chromium build:
npm run build:chromium- Open
chrome://extensionsin Chrome orbrave://extensionsin Brave. - Enable Developer mode.
- Click Load unpacked and select the project's
dist-chromiumfolder. - Pin BagMark to the toolbar, then right-click a webpage or link to save it.
Firefox builds remain in dist; Chromium builds go to dist-chromium so rebuilding one does not remove the other. After rebuilding, click Reload on the extension's card. The existing packaging and signing commands produce Firefox artifacts; Chrome and Brave use the unpacked Chromium folder for local testing.
To generate a local .zip bundle for manual testing or upload:
npm run packageThe resulting zip will be created in web-ext-artifacts/.
The source archive contains the original TypeScript, assets, build configuration, and npm lockfile. On Linux, macOS, or Windows, install Node.js 22 with its bundled npm, extract the archive, and run from its root:
npm ci
npm run buildThe Firefox extension is generated in dist/. No credentials, environment variables, external services, or private dependencies are needed to reproduce this build. The release workflow uploads the source archive to Mozilla with the extension, for both listed and unlisted submissions.
This repository is configured with a GitHub Actions workflow that automatically builds, tests, signs with Mozilla AMO, and publishes a GitHub Release when a git tag is pushed:
# 1. Tag a new version
git tag v1.0.3
# 2. Push tag to GitHub
git push origin v1.0.3GitHub Actions will automatically:
- Extract the version (
1.0.3) and syncpackage.json&manifest.json. - Run test suites (
npm test) and build the extension. - Sign the
.xpivia Mozilla Add-ons (AMO) API using repository secrets (AMO_JWT_ISSUER,AMO_JWT_SECRET). - Publish a GitHub Release with the signed
.xpiattached for 1-click install in Firefox.
bagmark/
├── manifest.json # Source Firefox MV3 manifest
├── package.json # Dependencies & scripts
├── tsconfig.json # Strict TypeScript configuration
├── vite.config.ts # Vite multi-page build with manifest generation
├── public/assets/ # Brand icons (SVG & PNGs)
├── src/
│ ├── background/
│ │ └── index.ts # Context menu management & save event handlers
│ ├── popup/ # Interactive popup dashboard
│ │ ├── index.html
│ │ ├── popup.ts
│ │ └── popup.css
│ ├── options/ # Settings & folder picker page
│ │ ├── index.html
│ │ ├── options.ts
│ │ └── options.css
│ └── lib/ # Core business logic modules
│ ├── types.ts # TypeScript interfaces
│ ├── utils.ts # Date formatters & URL normalizer
│ ├── storage.ts # Metadata local storage manager
│ ├── config.ts # Settings persistence
│ └── bookmarks.ts # Cross-browser bookmark tree traversal & creation
└── tests/ # Vitest automated test suite
MIT © sonuKumar03