MBXHub

by HALRAD Research

Example charm manifest: IKANDY

Rendered from app.ikandy.md • back to worked examples

The manifest: app.ikandy.json

A charm manifest is a small JSON file that tells MBXHub about a charm: what it is called, what it looks like, and what happens when you click it. This example describes IKANDY, a desktop application.

What it does

It puts IKANDY in 3 places you can start it from, without leaving what you are doing:

  1. a link in MusicBee's Tools menu Tools: MBXHub: IKANDY
  2. as a charm that can be shown on the dashboard
  3. as a button in the HUD and the overlay Charm Bar. (Ctrl + Alt + B)

All three start the same application. The manifest launches IKANDY, it does not install it, so IKANDY has to be on the machine already — it is on Steam, with a free tier.

Using it

  1. Download app.ikandy.json.
  2. Put the file in your MBXHub charms folder:

    • normal install: %APPDATA%\MusicBee\MBXHub\charms\
    • portable install: <MusicBee folder>\AppData\MBXHub\charms\
  3. Restart MusicBee. The Tools menu is built when MusicBee starts.

Anatomy of the example

{
  "id": "app.ikandy",
  "kind": "proc",
  "label": "IKANDY",
  "publisher": "L&R Entertainment LLC",
  "version": "0.1.0",
  "icon": "🍬",
  "launch": "steam://run/4813240",
  "launchFallback":"drive:/pathto/IKANDY/IKANDY.exe",
  "expand": [
    { "label": "IKANDY", "icon": "🍬", "placement": "menu",    "action": "launch", "msg": "Starting IKANDY…" },
    { "label": "IKANDY", "icon": "🍬", "placement": "rail",    "action": "launch", "msg": "Starting IKANDY…" },
    { "label": "IKANDY", "icon": "🍬", "placement": "overlay", "action": "launch", "msg": "Starting IKANDY…" }
  ]
}

Who the charm is

FieldIn this exampleWhat it means
idapp.ikandyThe charm's unique name. Use a publisher-style dotted name such as com.example.thing; a charm that registers with the hub is refused without one.
kindprocWhere the charm's code lives. proc is a program on this machine. Leave it out and the charm is a page (HTML that MBXHub hosts).
labelIKANDYThe name people see.
icon🍬The emoji on the button.
publisherL&R Entertainment LLCWho made it. Free text.
version0.1.0The charm's own version. Free text; MBXHub shows it but does not compare versions.

What it starts

FieldIn this exampleWhat it means
launchsteam://run/4813240The first thing to start: here, IKANDY through Steam. A URL scheme is handed to Windows as written.
launchFallback"drive:/pathto/IKANDY/IKANDY.exe"Tried only when the first one can't start, for example when Steam isn't installed. NOTE: you may need to replace it with the real path, such as "C:\\Program Files (x86)\\Steam\\steamapps\\common\\IKANDY\\IKANDY.exe" [note: / or \\ is accepted as a path delimiter]

Successful dispatch never starts both targets.

Where the button appears

expand lists the charm's buttons. Each entry says where it appears (placement) and what clicking it does (action). This example puts the same button in three places:

Manifest saysWhere you see IKANDY
"placement": "menu"MusicBee's Tools > MBXHub > IKANDY
"placement": "rail"The charm rail on the dashboard web page
"placement": "overlay"The HUD and the Charm Bar (Ctrl+Alt+B)

In every entry:

When a launch is allowed

More

The full manifest reference is in llms.txt, under Manifest fields, Manifest registration fields and Placements, and how an activation reaches a charm.