Skip to main content

Crate romm_cli

Crate romm_cli 

Source
Expand description

§romm-cli

romm-cli is a powerful command-line interface and terminal user interface (TUI) for interacting with the RomM API.

It provides tools for:

  • Browsing and searching your ROM collection.
  • Downloading ROMs and game saves.
  • Uploading new ROMs and saves.
  • Managing server-side tasks (library scans, etc.).
  • Securely managing authentication via the OS keyring.

§Quick Start

Most users will interact with the crate through the romm-cli binary. For library consumers, the core entry point is the client::RommClient.

use romm_cli::config::load_config;
use romm_cli::client::RommClient;
use romm_cli::error::RommError;

#[tokio::main]
async fn main() -> Result<(), RommError> {
    let config = load_config()?;
    let client = RommClient::new(&config, false)?;

    let version = client.rom_server_version_from_heartbeat().await;
    println!("Connected to RomM server version: {:?}", version);

    Ok(())
}

Re-exports§

pub use error::exit;

Modules§

cli_presentation
CLI output presentation (color, progress, JSON vs text). CLI output presentation: color, progress, and JSON vs text stdout rules.
client
HTTP client implementation for the RomM API. HTTP client wrapper around the ROMM API.
commands
CLI command handlers. Top-level CLI command handling.
config
Configuration and authentication management. Configuration and authentication for the ROMM client.
core
Internal core logic and shared utilities. Core application logic and shared utilities.
endpoints
Type-safe API endpoint definitions.
error
Typed error hierarchy (ApiError, ConfigError, DownloadError, RommError). Typed error hierarchy for the romm-cli library.
feature_compat
Feature compatibility helpers based on OpenAPI endpoint availability.
frontend
Frontend-specific logic (shared between CLI and TUI). Frontend routing helpers.
log_redact
Redaction helpers for tracing output (no secrets in logs). Redaction helpers for tracing and debug output (Gap 6: secrets never in logs).
openapi
OpenAPI parsing and endpoint lookup helpers. Parse a subset of OpenAPI 3.x JSON into a flat endpoint list.
tui
TUI implementation (requires the tui feature). Terminal UI module.
types
Shared data models and types.
update
Auto-update logic.