Skip to content

Features

Epos is packed with built-in tools designed to streamline the extension development lifecycle. Each tool is pre-configured to function across all execution contexts without additional setup.

Below are some of the core features that make Epos unique. You can find the complete list of capabilities in the API Reference.

Messaging System

Epos provides a built-in, unified messaging system called bus. It's like chrome.runtime.sendMessage, but 10x better.

Simply call epos.bus.send from any context, and Epos will deliver the message to every epos.bus.on listener — no matter where they are located.

The engine handles the routing automatically across all contexts, meaning you no longer have to juggle with chrome.runtime.sendMessage, chrome.tabs.sendMessage, and window.postMessage. Just broadcast the message, and Epos ensures it arrives.

Every epos.bus.on listener can return a value, which will be sent back to the sender as a resolved promise. This allows you to implement request-response patterns with ease.

ts
// background.js
epos.bus.on('getUserData', async userId => {
  const user = await fetchUserData(userId)
  return user // This value is sent back to the caller
})

// injected-script.js
const user = await epos.bus.send('getUserData', 123)

Binary Data Support

Standard extension messaging is limited to JSON-serializable data, which means it does not support Blob or File objects. If you want to transfer binary data the "standard" way, you are forced to manually serialize it into a Base64 string — a process that is slow, memory-intensive, and increases payload size.

The Epos bus natively supports Blob objects. It uses a smarter transfer logic that avoids Base64 serialization entirely, allowing you to move files, images, or any large binary data across contexts without the performance overhead.

INFO

You can learn more about how bus works, its features and capabilities in the API Reference.

State Management

With epos.state API you can connect to the state and work with it like a regular JavaScript object. Epos automatically persists and synchronizes every change across all extension contexts. And react components with also react to any changes and keep your UI in sync with the state.

TODO: mention IDB for persistence.

Epos provides state management which allows you to work with a state like with a regular JavaScript object. Epos automatically persists and synchronizes every change across all extension contexts. When the state updates, your React components re-render automatically.

ts
// Connect to the state using { value: 10, items: [] } as the initial value
const state = await epos.state.connect({ value: 10, items: [] })

// Update like a regular JS object.
// Every change is automatically persisted and synced across all contexts!
state.value = 20
state.items.push({ id: 1, name: 'Item 1' })

Chrome APIs

Standard chrome.* APIs can be called only from special extension contexts. Epos removes these boundaries, allowing you to call Extension APIs via epos.browser.* from any context — including regular web pages.

ts
// injected-script.js on https://example.com
const tabs = await epos.browser.tabs.query({})
// Works! Even though we are executing the code on a regular web page
// without direct access to chrome.* APIs

Storage

Epos provides a built-in storage system for files and data. It acts as a smart wrapper around IndexedDB, offering a simple key-value API that works across all extension contexts with zero setup required.

ts
// popup.js
await epos.storage.set('my-image', image)

// injected-script.js
const image = await epos.storage.get('my-image')

Simplified Setup

Just tell Epos what files to load and where — it handles the rest. Epos abstracts the complexity of manual script injection or the technical differences between "isolated" and "main world" content scripts.

json
{
  "name": "My Extension",
  "targets": [
    {
      "matches": "*://*.example.com/*",
      "load": ["content-script.js", "content-script.css"]
    },
    {
      "matches": "<popup>",
      "load": ["popup.js", "popup.css"]
    },
    {
      "matches": "<background>",
      "load": ["background.js"]
    }
  ]
}

More

Beside these highlighted features, Epos also provides a variety of other built-in utilities.

Epos includes a variety of built-in utilities designed to streamline the extension development lifecycle. Each feature is pre-configured to function across all execution contexts without additional setup.

You can find the complete list of capabilities in the API Reference.