Skip to content

oshtz/sumtab

Repository files navigation

sumtab logo

sumtab - AI Tab Summaries for Chrome and Firefox

sumtab is a browser extension that summarizes the content of your open tabs with your chosen AI provider. Select tabs, pick a model, and get concise or detailed summaries without leaving the browser.

Supported Browsers

Features

  • Summarize selected tabs from the current window in a popup or sidebar/side panel.
  • Provider and model selection with live model lists (cached locally).
  • Providers: OpenAI, OpenRouter, Anthropic, Google Gemini, Ollama (local), LM Studio (local), Custom OpenAI-compatible endpoints.
  • Tone (concise/neutral/detailed) and length (short/medium/long) controls.
  • Length also controls how much source text is sent to the provider: Short uses 12k characters, Medium 24k, and Long 48k.
  • Bullet-point toggle for summaries.
  • System prompt library with create/edit/delete.
  • Local summary caching with cache-age badges, clear/reset controls, and per-card regenerate.
  • Copy individual summaries or open them in a new tab.
  • Light/dark theme toggle with OS preference.

Installation

Chrome

Firefox

Usage

  1. Open the sidebar/side panel or popup.
  2. Choose a provider and model, then save your API key (not required for Ollama or LM Studio).
  3. Select tabs and click "Summarize Selected".
  4. Optionally switch to bullets, copy, or open the summary in a new tab.

Provider Setup

  • Cloud providers require an API key saved in the extension settings.
  • Ollama defaults to http://localhost:11434/v1 and LM Studio defaults to http://localhost:1234/v1.
  • Custom providers require an OpenAI-compatible base URL ending in /v1, a model name, and an API key if the endpoint requires one.
  • OpenRouter requests include HTTP-Referer and X-Title headers with safe defaults.

Notes

  • Works on http(s) pages only; browser internal pages cannot be summarized.
  • Ollama and LM Studio assume local servers running on localhost.
  • Firefox requires version 140 or newer so built-in data collection consent metadata is available.

Privacy

  • Requests go directly from your browser to the selected AI provider.
  • API keys and cached summaries are stored in browser local storage.
  • Only the tabs you explicitly select are processed.
  • Selected page content and provider authentication are sent directly to the provider you choose.
  • Diagnostics show the selected source-text input budget, whether extracted text was truncated, and provider retry/finish details.
  • No tracking or analytics.

Development

Run the validation suite before packaging:

npm run check

This checks JavaScript syntax, validates repo-specific invariants, lints HTML, and runs the Firefox add-on linter.

Shared content-extraction code lives in shared/content-core.js. After editing it, run:

npm run sync:shared

This copies the shared source into both packaged extension folders; npm run check fails if those copies drift.

Run rendered extension e2e tests:

npm install --no-package-lock
npx playwright install chromium firefox
npm run test:e2e

The e2e suite loads chrome-extension as a real Chromium extension, opens the popup and side panel pages through chrome-extension://, and checks the settings expansion, custom controls, Lucide theme icons, tab selection, Markdown/RTL rendering, summary export, Hebrew provider requests, and horizontal overflow behavior. It also opens the Firefox popup UI in Playwright's Firefox engine with mocked extension APIs to verify Firefox rendering, custom controls, Markdown/RTL output, and popup layout.

Useful focused commands:

npm run test:e2e:chrome
npm run test:e2e:firefox
npm run verify
npm run verify:chrome
npm run verify:firefox
npm run manual:check
npm run manual:store-check
npm run smoke:chrome:artifact
npm run smoke:firefox:addon
npm run smoke:firefox:artifact
npm run smoke:firefox:official-artifact
npm run smoke:firefox:artifact-ui

Release Packaging

Before a store release, run the full gate and build both browser packages:

npm run release:check

This creates:

dist/sumtab-chrome-<version>.zip
dist/sumtab-firefox-<version>.zip

npm run release:check runs validation, Chrome/Firefox e2e, packaging, zip artifact inspection, packaged Chrome popup/side-panel smoke, packaged Firefox temporary add-on startup smoke, and packaged Firefox popup/sidebar UI smoke. The automated Chrome extension e2e uses Playwright's bundled Chromium because official Chrome branded builds no longer support command-line side-loading of unpacked extensions. npm run check:repo verifies that package.json, chrome-extension/manifest.json, and firefox-extension/manifest.json all use the same version. npm run release:version:check also verifies manifest/package parity locally and, when running from a release tag, requires v<package version> to match exactly.

Run real-browser manual smoke checks before uploading to stores:

npm run manual:store-check
npm run manual:check
npm run manual:chrome
npm run manual:firefox
npm run manual:firefox:official
npm run smoke:firefox:official-artifact

manual:store-check fails unless official Google Chrome, official Mozilla Firefox, and both packaged zip files are present. manual:chrome launches Google Chrome with a temporary profile on chrome://extensions; enable Developer mode and use "Load unpacked" to select chrome-extension. manual:firefox launches Firefox through web-ext run with firefox-extension installed temporarily. If official Firefox is not installed, it falls back to Playwright's Firefox build for development checks; manual:firefox:official requires official Firefox and never uses the fallback. Set FIREFOX_BIN to force a store-target Firefox executable. smoke:chrome:artifact loads the packaged Chrome zip after extraction in Chromium and opens popup plus side panel. smoke:firefox:addon checks the source folder, smoke:firefox:artifact installs the packaged Firefox zip contents with official Firefox or Playwright fallback, smoke:firefox:official-artifact requires official Firefox, and smoke:firefox:artifact-ui opens packaged Firefox popup/sidebar UI with extension API mocks.

GitHub Actions has three workflows:

  • CI: validates the repo and runs Chrome/Firefox e2e tests on pushes and pull requests.
  • Release Artifacts: checks the release tag version, runs release:check, and uploads the Chrome/Firefox zip files as workflow artifacts on workflow_dispatch or v*.*.* tags.
  • Publish Stores: requires a v<package version> release tag, runs release:check, uploads the Chrome zip to the Chrome Web Store, and/or submits the Firefox add-on to AMO. It is workflow_dispatch only and uses the protected extension-stores environment. Select the release tag as the workflow ref, or run from main and set the release_tag input.

npm run check:repo also verifies those workflow contracts so CI/release/publish wiring does not silently drift.

Store publishing requires these GitHub secrets:

CHROME_WEBSTORE_PUBLISHER_ID
CHROME_WEBSTORE_EXTENSION_ID
CHROME_WEBSTORE_CLIENT_ID
CHROME_WEBSTORE_CLIENT_SECRET
CHROME_WEBSTORE_REFRESH_TOKEN
AMO_JWT_ISSUER
AMO_JWT_SECRET

Chrome publishing uses the Chrome Web Store API v2 upload/publish flow. Firefox publishing uses web-ext sign against AMO. You can check local secret wiring without publishing by running:

npm run publish:stores:check

Run local store publish commands only from a verified release build and only with the intended store credentials loaded:

npm run release:check
npm run release:version:tag-check
npm run publish:chrome:store
npm run publish:firefox:amo

License

MIT License

About

Generate concise summaries of your open browser tabs

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors