Plugin CLI
macrodeck-plugin scaffolds, builds, checks, runs and packages a Macro Deck plugin without Macro Deck
installed.
Installing
Section titled “Installing”dotnet tool install --global MacroDeck.Plugin.Cli --prerelease--prereleaseis required until a stable 3.0 build ships: only-previewversions are published, anddotnet tool installskips prereleases unless asked.- The tool needs the ASP.NET Core shared framework, not just the .NET runtime, because
runandteststart a real Kestrel loopback host (viaMacroDeck.Plugin.Testing). If they report thatMicrosoft.AspNetCore.Appis missing, install the ASP.NET Core runtime or SDK.
Typical workflow
Section titled “Typical workflow”macrodeck-plugin new --name "Spotify Controller" --publisher "Example Publisher" --yescd SpotifyController/src/SpotifyControllermacrodeck-plugin run --project SpotifyController.csproj --stub-hostmacrodeck-plugin build --output ../../artifactsmacrodeck-plugin validate --artifact ../../artifacts/com.example.spotify-controller-1.0.0.macroDeckPluginThe artifact build (or pack) produces is what your publishing workflow submits to the Creator Portal,
which signs it - see Publishing to the Store. There is no keygen or sign step on
the way to the Store: those commands are for artifacts distributed outside the Store and for Macro Deck’s
own infrastructure.
Commands
Section titled “Commands”| Command | What it does |
|---|---|
new |
Scaffold a plugin project from the official template. |
build |
Build every runtime identifier the manifest declares and package the result. |
validate |
Validate a manifest, a version directory or a packed artifact. |
inspect |
Report what installing an artifact would find, without a running host. |
pack |
Pack an existing payload directory into a .macroDeckPlugin artifact. |
run |
Run a plugin against the running host or a disposable stub host. |
test |
Run the conformance suite and write a text, JSON or Markdown report. |
keygen / sign / verify |
Creator key pairs and package signatures, for artifacts distributed outside the Store. |
Run macrodeck-plugin <command> --help for a command’s options.
Global options
Section titled “Global options”These work on every command, before or after the command name:
| Option | Default | Description |
|---|---|---|
--verbosity <quiet|normal|diagnostic> |
normal |
How much a command narrates while it works. |
--no-color |
off | Disable ANSI colour in text output. |
quiet hides progress lines only. A command’s result - a validation report, a conformance report, a
plugin’s own console output, any error or warning line - always prints.
--output is not global. validate and inspect use it for a render format (text/json), pack and
test for a destination file, and new, build and keygen for a destination directory.
Errors and warnings
Section titled “Errors and warnings”$ macrodeck-plugin builderror manifest-not-found: No manifest at '~/src/SpotifyController/manifest.json'.- Failures print one line on stderr:
error <kebab-case-code>: <sentence>, red unless--no-coloris given. - Non-fatal observations (a missing foreign-RID entrypoint, a Debug-looking source tree, missing
publication metadata) print the same way as
warning <code>: <sentence>, also on stderr. A warning never changes the exit code. validateis the exception: itserror/warninglines are its result, so they go to stdout andvalidate ... > report.txtcaptures them.- Paths in messages are always resolved and absolute.
Running with no arguments prints the command list (exit 2). A mistyped command gets a suggestion when one
command name is close, otherwise a pointer to --help:
$ macrodeck-plugin pakc --source .error unknown-command: 'pakc' is not a macrodeck-plugin command. Did you mean 'pack'?Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Success, or conformant. |
| 1 | The subject is wrong: validation failed, or a required conformance check failed. |
| 2 | Usage error: bad arguments, an unknown --check/--category token, or an output file that already exists without --force. |
| 3 | The input could not be read: a missing file, something that is not a ZIP, or a permissions failure. |
| 4 | Cancelled (Ctrl-C). |
| 70 | An error the command did not anticipate. |
1 and 3 are kept apart so CI can tell a broken plugin from a broken environment. run is
the one exception on a normal exit: it returns the launched plugin’s own exit code.
See also
Section titled “See also”- Testing plugins -
MacroDeck.Plugin.Testing, whichrunandtestare built on. - Conformance - the suite
testruns and its report shape. - Plugin hosting - the artifact format
pack/validate/inspectread, and what the supervisor injects thatrunreproduces. - Publishing to the Store - how a plugin is published and signed.
- Security model - the trust model
verifychecks against. MacroDeck.Signingpackage README - the library behindsignandverify.- Certificate schema and package signature schema.
MacroDeck.Plugin.Clipackage README.