Skip to main content
Version: Stable

Command Line

Zaparoo Core includes a command line interface for local scripting, quick tests, and platform service management. Most action flags call the local Core API, so Core needs to be running and reachable on the same device unless the flag starts or manages the service itself.

The executable name depends on the platform. MiSTer FPGA uses zaparoo.sh, while Linux usually uses zaparoo. Replace the executable name in the examples with the one from your platform.

./zaparoo -version
./zaparoo -run "**launch.system:menu"

Run -help on your installed binary for the exact flags supported by that build.

Common flags

These flags are defined by the shared Core CLI and are available in current command-line builds.

FlagArgumentDescription
-helpNonePrints the available flags for the current binary.
-versionNonePrints the binary version and platform ID, then exits.
-runZapScript stringRuns text as ZapScript, like a scanned token.
-launchZapScript stringDeprecated alias of -run.
-apimethod:paramsCalls one Core API method and prints the response.
-readNonePrints the next scanned token without running its actions.
-writeText stringWrites text to the next token found by a write-capable reader.
-reloadNoneReloads config.toml and mapping files from disk.
-pairNoneStarts app/client pairing and prints the pairing result when complete.

The -config flag may appear in -help output because it is still defined by the shared parser. In current Core source it does not run a separate action; start the TUI or use the Web UI for configuration instead.

Run ZapScript

Use -run when you want the CLI to behave like a scanned token. The argument is ZapScript, so it can be a media path, launcher command, input command, or several commands joined with ||.

./zaparoo -run "**launch.system:menu"
./zaparoo -run "SNES/Super Metroid.sfc"

-launch still works as an alias for older scripts, but new scripts should use -run.

Call the API

Use -api to send one raw API call to the local Core service. The format is the method name, a colon, then the JSON parameters for that method.

./zaparoo -api 'run:{"text":"**launch.system:menu"}'
./zaparoo -api 'settings.reload'

If the method does not need parameters, omit the colon and JSON body. The CLI prints the response body returned by Core.

For method names and parameter shapes, see the API methods reference.

Read or write tokens

Use -read to wait for the next token scan and print its stored text without running the token.

./zaparoo -read

Use -write to write text to the next token detected by a write-capable reader.

./zaparoo -write "SNES/Super Metroid.sfc"
./zaparoo -write "**launch.system:menu"

While reading or writing, Core temporarily disables normal ZapScript execution so the scanned token is handled by the CLI action instead of launching media.

Reload settings

Use -reload after editing the config file or mapping files while Core is running.

./zaparoo -reload

This calls the settings.reload API method. Settings that require a full service restart still need the service to be restarted.

Pair a client

Use -pair to start the same pairing flow used by clients such as the Zaparoo App.

./zaparoo -pair

Core prints a PIN to the terminal. Enter that PIN in the client app. When pairing succeeds, the CLI prints the pairing response as a single line.

Platform flags

Platform builds add their own service, UI, and installer flags. These are the user-facing flags in current Core source.

Linux, SteamOS, Bazzite, and ChimeraOS

These Linux desktop-style builds share the same extra flags.

FlagArgumentDescription
-installapplication, desktop, service, or hardwareInstalls one component.
-uninstallapplication, desktop, service, or hardwareUninstalls one component.
-daemonNoneRuns the service in the foreground with no TUI.
-startNoneStarts the user service if needed and opens the Web UI in the browser.

Examples:

./zaparoo -install service
./zaparoo -install hardware
./zaparoo -start

Outside install and uninstall commands, do not run these builds as root. The Linux service is a user service, and Core exits if normal service or UI mode starts with root privileges.

MiSTer FPGA and MiSTeX

FlagArgumentDescription
-servicestart, stop, restart, or statusManages the Zaparoo service.
-add-startupNoneAdds Zaparoo to MiSTer startup if it is not already there.
-show-loaderJSON file pathShows a MiSTer loading widget.
-show-noticeJSON file pathShows a MiSTer notice widget.
-show-pickerJSON file pathShows a MiSTer picker widget.

Examples:

/media/fat/Scripts/zaparoo.sh -service restart
/media/fat/Scripts/zaparoo.sh -add-startup

The widget flags are mainly used by Core and MiSTer integrations. They expect a JSON configuration file path.

Batocera

FlagArgumentDescription
-servicestart, stop, restart, or statusManages the Zaparoo service.
-installNoneInstalls the Batocera service file.
-uninstallNoneRemoves the Batocera service file.

Examples:

/userdata/system/zaparoo -service restart
/userdata/system/zaparoo -install

LibreELEC

FlagArgumentDescription
-servicestart, stop, restart, or statusManages the Zaparoo service.

Example:

/storage/zaparoo -service restart

macOS

FlagArgumentDescription
-daemonNoneRuns the service without the TUI or system tray UI.
-guiNoneRuns the service with the system tray UI.

Without either flag, the macOS build starts the local TUI after starting or connecting to the Core service.

Windows

Windows does not support CLI arguments. The Windows build is compiled as a GUI application and starts Core in the system tray.

Windows also refuses to run with elevated administrator rights. Start it as your normal user.