Plugins
The mod format, the layout format, what a mod's label says, and publishing to the marketplace
A plugin is a mod, a layout, or a package of several. Pod Console keeps herdr's plugin format unchanged, so a plugin written for herdr-app runs here, and the reverse. The app writes the full API into your app home on every start: gpui-kit.d.ts for the elements and herdr.d.ts for the app's data and commands. Those files are the truth for the version you run.
A mod
A mod is a folder mods/<name>/ in the app home:
| File | What it holds |
|---|---|
main.js | Exports a View with init, render and close |
mod.json | place, title, overlay, focusable, size, cloned_from |
Mods are JavaScript that describes native elements: div(), flex, children, .on_click. There is no DOM, HTML or CSS. A mod imports the modules herdr, gpui-kit and gpui-base, and files of its own folder.
What a mod can reach:
- the app's data and actions: spaces, panes, terminals, agents, machines, settings, notifications, shared state and every app command through
run(); exec(cmd, args, { cwd, on, timeout }), which runs a program with your environment and returns{ code, stdout, stderr };onnames another of your machines;hc(), the runtime, andfetch.
setTimeout throws: use the context's timer. There is no Intl.
A layout
A layout is layouts/<name>.json: blocks arranged as rows, columns and stacks, each holding a mod, a tab or an agent, with the theme, fonts and pane frames. Pick one in Settings, Look, Layout, or with Ctrl+Shift+L.
Check a mod
mpod mods scan <folder>scan reads the files without running them and prints the mod's label:
| Label | Says |
|---|---|
exec | Runs programs on the machine |
shell | Runs a shell or a program name it computes |
terminal | Types into or starts terminals |
on | Acts on other machines |
files-out | Reads or writes files outside its own folder |
net | Uses the network |
socket | Opens raw sockets or WebSockets |
control | Drives the app through its control socket |
herdr-paths | Reaches herdr's folders directly |
helpers | Ships helper scripts |
overlay | Draws frameless overlays |
global | Shares globalThis with other mods; lost in the web console |
companion | Needs a program on the machine |
The marketplace refuses a plugin that fetches or writes its own code, contains a symbolic link or a native program, has over 10,000 files or 64 MiB, or cannot be hashed.
Publish to the marketplace
- Make your publisher key, once:
mpod publish keygen.mpod publish keyprints its public half. - Register the public half on the web console's Publish page. It needs a second factor.
- Submit a version from your repository:
mpod publish submit --repo owner/name --path mods/x --commit <sha> --ref main --version 1.2.0submit reads the plugin from git at that commit, signs the release, submits it and follows the review until it is listed or refused. A refusal names its reason. Versions are semantic, such as 1.2.0 or 1.2.0-beta.1. A plugin without an open source license file needs --redistribution-grant. submit reads your session token from MPOD_TOKEN or --token-file, which the Publish page gives you.
Listed plugins carry Verified publisher or Reviewed by Mapier. Paid plugins and ratings are not part of the marketplace.