Skip to content

Mantis Connection browser extension ​

Two different things are called "extension" around Mantis. This page is about the other one.

  • Mantis extensions are packages you install into Mantis. They add panels, commands, and Python actions to the workspace. Everything else in this section documents those. Start at Overview.
  • Mantis Connection is a browser add-on you install into Chrome. It watches supported websites and turns their content into a Mantis space, then embeds that space back into the page you are reading.

They share no code, no manifest format, and no install path.

KellisLab/MantisExtensionsThe "Mantis Connection" browser extension, built with Plasmo, React, and Tailwind.KellisLab/MantisExtensionsBackendCompanion Flask and Celery service that does the scraping and space creation.

What it does ​

On a supported page, the extension shows a floating action button. Click it and the matching connection extracts the page's content, hands it to the companion service, which creates a Mantis space from it, and then injects the resulting space back into the page as an embedded widget. Spaces you create this way are cached in browser storage with their name, id, creation date, source URL, host, and the connection that produced them, so the extension can re-attach the same space the next time you visit.

The connections that currently ship:

ConnectionTriggers on
GoogleGoogle search results
Google ScholarScholar results
Google DocsAn open Google Doc
GmailGmail
PubMedPubMed results
Wikipedia ArticleA Wikipedia article, segmented into sections
Wikipedia ReferencesA Wikipedia article's reference list
LinkedIn HomeThe LinkedIn feed

A connection is a small module declaring a trigger(url) predicate, a createSpace routine, and an injectUI routine. Adding a site means adding one of those and registering it in the connection list.

Running it ​

There is no store listing documented in the repository. Both halves are built and run from source, and the extension is loaded unpacked.

  1. Start the backend. Clone KellisLab/MantisExtensionsBackend, create a virtualenv, pip install -r src/requirements.txt, then python -m playwright install. It is a Flask service using Celery for the asynchronous scraping work.
  2. Build the extension. Clone KellisLab/MantisExtensions, yarn install, then yarn dev for a watch build or yarn build for a production one. yarn package produces a distributable archive.
  3. Load it. Open chrome://extensions, enable developer mode, and load the unpacked build from build/chrome-mv3-dev/.
  4. Point it at a Mantis deployment. Set the environment variables below in .env, or in an untracked .env.development for local work.

Configuration ​

VariableMeaning
PLASMO_PUBLIC_FRONTENDWhere spaces are embedded from. Set to http://localhost:3000 for a local frontend.
PLASMO_PUBLIC_MANTIS_APIThe backend serving that frontend. Used for space logging and WebSocket setup.
PLASMO_PUBLIC_SDKThe extension backend that creates and manages spaces.

PLASMO_PUBLIC_FRONTEND and the extension backend must agree on a hostname. The extension forwards the session cookie taken from PLASMO_PUBLIC_FRONTEND, and that cookie will not authenticate against a backend on a different domain.

Which one do I want? ​

Ask what you are extending.

  • Adding a panel, a command, or a Python action inside the Mantis workspace, distributed as a .mantisx file: that is the in-app platform. See Quick start.
  • Turning a webpage you are reading into a Mantis space, from your browser: that is Mantis Connection, this page.
Read nextExtensions overviewThe in-app extension platform: hosts, panels, permissions, and packages.