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(())
}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.
- 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.
- 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
tuifeature). Terminal UI module. - types
- Shared data models and types.
- update
- Auto-update logic.