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:

FileWhat it holds
main.jsExports a View with init, render and close
mod.jsonplace, 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 }; on names another of your machines;
  • hc(), the runtime, and fetch.

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:

LabelSays
execRuns programs on the machine
shellRuns a shell or a program name it computes
terminalTypes into or starts terminals
onActs on other machines
files-outReads or writes files outside its own folder
netUses the network
socketOpens raw sockets or WebSockets
controlDrives the app through its control socket
herdr-pathsReaches herdr's folders directly
helpersShips helper scripts
overlayDraws frameless overlays
globalShares globalThis with other mods; lost in the web console
companionNeeds 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

  1. Make your publisher key, once: mpod publish keygen. mpod publish key prints its public half.
  2. Register the public half on the web console's Publish page. It needs a second factor.
  3. Submit a version from your repository:
mpod publish submit --repo owner/name --path mods/x --commit <sha> --ref main --version 1.2.0

submit 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.