volumio-plugin CLI
volumio-plugin is the command-line tool of the Volumio plugin SDK, published on npm as @volumio/plugin-sdk. It creates, checks, packages and installs plugins.
Run a command
Run any command through npx, from the plugin's folder:
npx --package=@volumio/plugin-sdk volumio-plugin <command> [arguments] [options]
The CLI needs Node.js 20 or later. deploy and logs need Node.js 22 or later, for its built-in WebSocket. --help, -h or help prints the usage.
| Command | Does |
|---|---|
init | Creates a new plugin from a template |
check | Runs the gates G1 and G2 on a plugin folder |
package | Builds the plugin package and runs every gate on it |
arch | Prints the architectures the plugin declares |
deploy | Installs the plugin on a Volumio device and starts it |
logs | Prints a Volumio device's log as it is written |
init
Creates a new plugin in a folder that does not exist or is empty. The plugin runs on Volumio and passes every check.
volumio-plugin init <dir> --id <id> --type <type> --function <function> --title <title> --description <text> [--author <name>] [--skip-install]
| Option | Required | Value |
|---|---|---|
<dir> | Yes | The folder to create |
--id | Yes | The plugin's id: 2 to 64 letters, digits and underscores, starting with a letter or a digit. No hyphens. |
--type | Yes | audio_interface, miscellanea, music_service, system_controller, system_hardware or user_interface |
--function | Yes | An id from the function registry, or a new id in lowercase words joined by hyphens |
--title | Yes | The name shown in the store and the UI, 80 characters at most |
--description | Yes | What the plugin does, in one sentence |
--author | No | The name in LICENSE. Default: The <title> authors |
--skip-install | No | Skips npm install, so no package-lock.json is written |
A music_service gets the music service template, with Browse, play and search. Every other type gets the generic template. Plugin files lists the files.
check
Runs gate G1, on the manifest and the required files, and gate G2, on the code and install.sh. Exits with 1 when any error is found.
volumio-plugin check [plugin-dir ...] [--built] [--json]
| Option | Value |
|---|---|
plugin-dir | One or more plugin folders. Default: the current folder |
--built | Checks a built package instead of the source. Adds G1.main and G1.file.i18n |
--json | Prints the result as JSON |
The first line counts the errors and warnings. Each finding has a severity, a rule id, a place and a fix:
✖ hello_volumio (v2): 1 error, no warnings
error G2.js.console-log index.js:82 console.log bypasses the Volumio logger
fix: Log through this.logger
| Severity | Meaning |
|---|---|
error | Blocks the pull request |
warning | Reported, does not block |
todo | A field a plugin without volumio-plugin.json can add |
A folder without volumio-plugin.json is read from its package.json. ShellCheck and gitleaks run only when they are installed. When one is missing, the last line says so: Not checked here: ShellCheck and gitleaks are not installed. The CI always has them. Plugin rules lists every rule.
package
Builds the plugin package for the architecture of the computer it runs on, when the manifest declares it, and runs every gate on the result. Otherwise it builds for the first architecture the manifest declares: on an arm64 Mac, a plugin that declares armhf and amd64 is built for armhf. G3 still stops a native module built for the wrong architecture. The CI runs it for each architecture, inside Volumio's build container.
volumio-plugin package [plugin-dir] [--out <dir>] [--report-only]
| Option | Value |
|---|---|
plugin-dir | The plugin folder. Default: the current folder |
--out | The folder to write to. Default: dist-plugin |
--report-only | Exits with 0 even when a gate finds an error |
package copies the plugin without .git, .github, .gitignore, node_modules, test folders, the --out folder, and AGENTS.md, CLAUDE.md and VOLUMIO_API.md, which are for you and your coding agent. It runs npm run build when the plugin has one. Then it installs the production dependencies and runs G1 with --built, G2 and G3. It writes three files:
| File | Holds |
|---|---|
<id>-<version>-<arch>.zip | The package |
<id>-<version>-<arch>.zip.sha256 | The package's SHA-256 checksum |
<id>-<version>-<arch>.provenance.json | The source repository and commit, the workflow run, the SDK version and every finding |
The same commit always gives the same zip: files are sorted and share one modification time. That time is the commit time, or SOURCE_DATE_EPOCH when it is set. Outside a git checkout, package uses the current time and warns that the zip is not reproducible.
arch
Prints the architectures in the manifest's arch field, as JSON.
volumio-plugin arch [plugin-dir]
["armhf","amd64"]
deploy
Installs the plugin on a Volumio device of the local network and starts it, as the web UI would. No SSH is needed.
volumio-plugin deploy <device> [plugin-dir] [--zip <zip>]
| Option | Value |
|---|---|
<device> | The device's IP address, such as 192.168.1.20. A .local name such as volumio.local does not resolve on every computer |
plugin-dir | The plugin folder. Default: the current folder |
--zip | Installs this package instead of building one. Use it for a plugin with native modules |
deploy builds the package, serves it from your computer, and asks the device to install it. Then it reboots the device and starts the plugin. It prints the lines the device logged about the plugin, and every warning and error, then how many other lines it left out. A plugin already on the device is updated and keeps its settings. When the plugin did not start, deploy prints the whole log and exits with 1. When it cannot reach the device, the error says what to check.
logs
Prints a Volumio device's log as it is written.
volumio-plugin logs <device> [--seconds <n>]
| Option | Value |
|---|---|
<device> | The device's address |
--seconds | Stops after this many seconds. Default: runs until Ctrl+C |