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:
| Connection | Triggers on |
|---|---|
| Google search results | |
| Google Scholar | Scholar results |
| Google Docs | An open Google Doc |
| Gmail | Gmail |
| PubMed | PubMed results |
| Wikipedia Article | A Wikipedia article, segmented into sections |
| Wikipedia References | A Wikipedia article’s reference list |
| LinkedIn Home | The 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.
- Start the backend. Clone KellisLab/MantisExtensionsBackend, create a virtualenv,
pip install -r src/requirements.txt, thenpython -m playwright install. It is a Flask service using Celery for the asynchronous scraping work. - Build the extension. Clone KellisLab/MantisExtensions,
yarn install, thenyarn devfor a watch build oryarn buildfor a production one.yarn packageproduces a distributable archive. - Load it. Open
chrome://extensions, enable developer mode, and load the unpacked build frombuild/chrome-mv3-dev/. - Point it at a Mantis deployment. Set the environment variables below in
.env, or in an untracked.env.developmentfor local work.
Configuration
| Variable | Meaning |
|---|---|
PLASMO_PUBLIC_FRONTEND | Where spaces are embedded from. Set to http://localhost:3000 for a local frontend. |
PLASMO_PUBLIC_MANTIS_API | The backend serving that frontend. Used for space logging and WebSocket setup. |
PLASMO_PUBLIC_SDK | The 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
.mantisxfile: 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.