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;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    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(())
}

Modules§

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.
feature_compat
Feature compatibility helpers based on OpenAPI endpoint availability.
frontend
Frontend-specific logic (shared between CLI and TUI). Frontend routing helpers.
openapi
OpenAPI parsing and endpoint lookup helpers. Parse a subset of OpenAPI 3.x JSON into a flat endpoint list.
services
High-level service objects for common operations. Small service objects that wrap RommClient for higher-level operations.
tui
TUI implementation (requires the tui feature). Terminal UI module.
types
Shared data models and types.
update
Auto-update logic.