romm-cli
Command-line interface for scripting and automation against a RomM server. Depends on romm-api for HTTP, config, and domain logic.
Crate path: romm-cli/ in the workspace. The romm-cli binary is the primary user-facing tool.
Install
Cargo
For the interactive terminal UI, install the separate romm-tui crate.
Binary releases
Prebuilt archives for Windows, Linux, and macOS are on the Releases page.
| Tag | Archives contain |
|---|---|
romm-cli-v* |
romm-cli only |
romm-tui-v* |
romm-tui only |
Release process and versioning: releases.md.
Configuration
Run the setup wizard:
Full details (environment variables, precedence, custom paths, keyring): romm-api configuration.
Auth troubleshooting: troubleshooting-auth.md.
Usage
Run romm-cli --help or romm-cli <command> --help for the full flag list. Many subcommands have short aliases (e.g. setup for init, p for platforms, r for roms, dl for download).
Common commands
# List platforms
# Search and print JSON
# Upload a ROM, then optionally rescan the library on the server
# Download covers, manuals, and sibling updates/DLC for one game
# Trigger a full library scan; optional --wait
# Save sync (RomM 4.9.0-alpha.2+)
# Self-update
# Cache utilities
# Rotate credentials without re-entering ROM path/base URL
On interactive startup, romm-cli checks for newer releases and can prompt to update. Disable with ROMM_CHECK_UPDATES=false (see api.md).
Post-upload library scan
After chunked uploads, RomM needs a library scan before new games appear in search and the TUI. See scan-after-upload.md.
Save sync
Save sync uses RomM sync endpoints from the 4.9.0-alpha.2 pre-release onward. See save-sync.md for manifest schema and conflict handling.
JSON output
Commands that support --json emit stable, machine-readable JSON on stdout. Progress and status go to stderr. See json-output.md for field reference and versioning policy.
Exit codes
| Code | Meaning | Typical cause |
|---|---|---|
| 0 | Success | Command completed (including user-cancelled downloads) |
| 1 | General failure | Unexpected error, app-level validation |
| 2 | Usage error | Invalid flags or arguments (clap) |
| 3 | Config / auth | Missing API_BASE_URL, bad credentials |
| 4 | API / network | Server errors, connection failures, download failures |
Example:
Errors are printed to stderr with actionable hints (for example, suggesting romm-cli init or romm-cli auth).
Shell completions
Tab completion is available for bash, zsh, fish, PowerShell, and Elvish. Scripts live in romm-cli/completions/ and can be regenerated at runtime:
Bash — user install:
Zsh — clap generates _romm-cli (underscore prefix required):
# Add to ~/.zshrc before compinit:
# fpath=(~/.zfunc $fpath); autoload -Uz compinit; compinit
Fish:
PowerShell:
romm-cli completions powershell > $PROFILE.CurrentUserCurrentHost
Start a new shell session after installing completions.
Library use
The romm-cli crate re-exports romm_api modules for backward compatibility with existing crates.io consumers:
use RommClient;
use load_config;
New embedders should depend on romm-api directly.
Related documentation
- romm-api — configuration, HTTP client, errors
- romm-tui — terminal UI
- Save sync
- Post-upload library scan
- JSON output