Muxy

Commands

Commands appear in the command palette (Cmd+Shift+P), can have a shortcut, and run when a bar item or panel header button is clicked.

"commands": [
  { "id": "ping", "title": "Hello: Ping" },
  {
    "id": "toggle",
    "title": "Hello: Toggle Notes",
    "action": { "kind": "togglePanel", "panel": "notes" },
    "defaultShortcut": "cmd+shift+y"
  }
]
FieldNotes
id, titleRequired. Palette entries are searchable by title and extension name.
subtitleExtra search keywords.
actionWhat it does. Defaults to event.
defaultShortcutLike cmd+shift+y. Needs cmd, ctrl, or opt.

Actions

kindFieldsDoesNeeds
eventSends command.<id> to the extension's pages and background script
openTabtabType, dataOpens one of its tab typestabs:write
togglePanelpanelShows or hides a panelpanels:write
openPanelpanelShows a panelpanels:write
openPopoverpopoverOpens a popover from a bar item. Not listed in the palettepanels:write
openModalentry, width, height, dismissOnOutsideClick, dataOpens a modal web viewpanels:write
runScriptscriptRuns a scriptcommands:run-script

Shortcuts

  • A defaultShortcut is used unless a built-in shortcut or another extension already has those keys.
  • Extension shortcuts are listed in Settings → Keyboard, where users can change or unassign them.
  • Add shortcuts at runtime with muxy.shortcuts.register.

Scripts

A runScript command runs a JavaScript file once, without a page. Use it for quick automation.

{ "id": "count", "title": "Hello: Count Tabs", "action": { "kind": "runScript", "script": "scripts/count.js" } }
// scripts/count.js (needs tabs:read and notifications:write)
const tabs = muxy.tabs.list();
muxy.notifications.notify({ title: "Tabs", body: `${tabs.length} open` });
  • Calls are synchronous. Timers keep the script alive until they finish.
  • Scripts can use the workspace, files, Git, exec, dialogs, and the picker. See availability.
  • The file is read fresh on every run, so edits apply without reloading.
  • Errors go to the extension's log.