Roam Research Docs · Developer documentation
extension.js / extension.css
username+extension-id+pr-number — e.g. digitalmaster+roam-memo+668
README.md and extension.js are required, extension.css and CHANGELOG.md optional. The files have to be publicly accessible
https://my-extension.pages.dev, the file https://my-extension.pages.dev/extension.js must resolve
https:// prefix
main — a persistent link, without opening a PR in roam-depot just to test:
ctrl-d ctrl-r calls onunload, loads the new code, and calls onload — for all loaded developer extensions
onunload, reload the page and hit ctrl-d ctrl-r to completely clear the state
ctrl-d ctrl-r
onload and onunload functions
onload should be removed in onunload.
onload receives an object with the Roam Depot/Extension API in it
export default {
onload: ({extensionAPI}) => {},
onunload: () => {}
};
rm- in front of all our css classes, rm-modal
import from the window object to make it easier to import global dependencies
react
18.2.0
window.React
react-dom
18.2.0
window.ReactDOM
react-dom/client
18.2.0
window.ReactDOMClient
react-youtube
^7.13.1
window.ReactYoutube
@blueprintjs/core
^3.50.4
window.Blueprint.Core
@blueprintjs/select
^3.18.6
window.Blueprint.Select
@blueprintjs/datetime
^3.23.14
window.Blueprint.DateTime
chrono-node
^2.3.2
window.ChronoNode
idb
^7.1.1
window.idb
nanoid
^2.0.4
window.Nanoid
file-saver
^2.0.2
window.FileSaver
crypto-js
^3.1.9-1
window.CryptoJS
tslib
2.2.0
window.TSLib
marked-react
1.1.2
RoamLazy.MarkedReact
marked
4.3.0
RoamLazy.Marked
jszip
^3.10.0
RoamLazy.JSZip
cytoscape
^3.7.2
RoamLazy.Cytoscape
insect.js
5.6.0
RoamLazy.Insect
build.sh file
build.sh file will be invoked before looking for extension.js (required) or extension.css (optional)
extensions/tonsky/roam-calculator.json
{
"name": "Test Extension 1",
"short_description": "Prints 'Test message 1'",
"author": "Nikita Prokopov",
"tags": ["print", "test"], //optional
"source_url": "https://github.com/tonsky/roam-calculator",
"source_repo": "https://github.com/tonsky/roam-calculator.git",
"source_commit": "d5ecd16363975b2e7a097d46e5f411c95e16682d",
"stripe_account": "acct_1LGASrQVCl6NYjck" // optional only include if you want to be eligible for payouts from Roam
}
name (string, required) — your extension's display name in Roam Depot
short_description (string, required) — one-line description shown in the extension list
author (string, required) — the author name shown to users
tags (array of strings, optional) — keywords for finding your extension
source_url (string, required) — link to your extension's repo, shown to users
source_repo (string, required) — the git URL your code is fetched from (ends in .git)
source_commit (string, required) — the exact commit that gets reviewed, built, and published — bump this to release an update
stripe_account (string, optional) — your Stripe account ID; only include it if you want payouts from Roam