Skip to main content
This is unreleased documentation for the next Zaparoo Core release.
For up-to-date documentation, see the latest version (Stable).
Version: Next

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 settings, mappings, launchers, and platform launcher dependencies.
-pairNoneStarts app/client pairing and prints the pairing result when complete.
-updateNonePrints update status, checks for a new release, and installs it when one is waiting.
-backupNoneCreates a portable full-device backup ZIP on supported platforms.
-backupsNoneLists available full-device backup ZIPs.
-restoreBackup nameRestores a full-device backup ZIP and restarts Core.
-upload-logNoneUploads the log file for support and prints the link. Works while Core is not running. Not available on Windows.
-profilesNoneLists device profile IDs, roles, and names for local recovery.
-profile-reset-pinProfile IDReplaces a profile PIN with a generated eight-digit PIN.
-profile-reset-switch-idProfile IDGenerates a new profile switch ID and invalidates existing switch cards.

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. A tag is not scanned as a token while a write is pending; take it off the reader once the write finishes before scanning it again.

Reload Core​

Use -reload after editing the config file, mapping files, or custom launcher files while Core is running. It also refreshes supported platform launcher dependencies, including MiSTer RBF files and Batocera's EmulationStation system configuration.

./zaparoo -reload

This calls settings.reload followed by launchers.refresh. If either operation fails, the command reports which stage failed. 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.

Check for updates​

Use -update to check for a new release and install it when one is waiting. It prints the current version and update state first, and only installs when there is something to install.

./zaparoo -update

See Core updates for what blocks an install and how rollback works.

Back up and restore device data​

On supported platforms, -backup creates a portable full-device ZIP containing Zaparoo configuration and user data together with supported platform settings, inputs, saves, and save states. See Device Backups for included data, platform support, cloud backup, and restore behavior.

./zaparoo -backup

Use -backups to list local backup ZIPs, including their names.

./zaparoo -backups

Use -restore with a backup name to restore it. Active media must be stopped. Core validates the backup, creates a local safety backup, applies the restore transaction, and restarts.

./zaparoo -restore backup-20260720-120000-000000000-manual.zip

These flags call the settings.backup, settings.backup.list, and settings.backup.restore API methods.

Upload the log​

Use -upload-log to send the log to logs.zaparoo.org and print a link you can share on Discord or in a GitHub issue. It works even when Core will not start.

./zaparoo -upload-log

Database recovery​

Favorites, per-media launcher overrides, history, and token mappings live in the user database, separate from the rebuildable media database. Core keeps automatic safety copies of the user database and can rebuild a corrupt media database without losing that data.

After rebuilding the media database, Core starts a full media index and adds an Inbox message. Scraped artwork and metadata must be imported again. If recovery repeatedly fails, Core stops retrying until it restarts and prompts you to check the free space and storage device.

Recover profile access​

Use -profiles to find the IDs of device profiles:

./zaparoo -profiles

If a profile PIN is forgotten, use its profile ID to replace the PIN with a generated eight-digit value:

./zaparoo -profile-reset-pin 07e8e954-a624-4f49-a24e-4036ff6b1c32

If a profile card is lost, generate a new switch ID:

./zaparoo -profile-reset-switch-id 07e8e954-a624-4f49-a24e-4036ff6b1c32

The new switch ID is printed to the terminal. Existing switch cards for that profile stop working. These recovery commands call the local Core API, so Core must be running on the same device.

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 hardware; also steam-runtime on SteamOSInstalls one component.
-uninstallapplication, desktop, service, or hardware; also steam-runtime on SteamOSUninstalls one component.
-steam-runtime-statusNoneSteamOS only. Reports whether the Zaparoo Runtime Steam shortcut is installed and current.
-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 -install steam-runtime # SteamOS only
./zaparoo -steam-runtime-status # SteamOS only
./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​

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

RePlayOS​

FlagArgumentDescription
-installNoneInstalls the Zaparoo systemd service.
-uninstallNoneRemoves the Zaparoo systemd service.
-daemonNoneRuns the service in the foreground with no TUI.

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. Use Upload Log in the tray menu to share a log.

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