romm_cli/lib.rs
1//! # romm-cli
2//!
3//! `romm-cli` is a powerful command-line interface and terminal user interface (TUI)
4//! for interacting with the [RomM](https://github.com/romm-apps/romm) API.
5//!
6//! It provides tools for:
7//! - Browsing and searching your ROM collection.
8//! - Downloading ROMs and game saves.
9//! - Uploading new ROMs and saves.
10//! - Managing server-side tasks (library scans, etc.).
11//! - Securely managing authentication via the OS keyring.
12//!
13//! ## Quick Start
14//!
15//! Most users will interact with the crate through the `romm-cli` binary.
16//! For library consumers, the core entry point is the [`client::RommClient`].
17//!
18//! ```no_run
19//! use romm_cli::config::load_config;
20//! use romm_cli::client::RommClient;
21//!
22//! #[tokio::main]
23//! async fn main() -> anyhow::Result<()> {
24//! let config = load_config()?;
25//! let client = RommClient::new(&config, false)?;
26//!
27//! let version = client.rom_server_version_from_heartbeat().await;
28//! println!("Connected to RomM server version: {:?}", version);
29//!
30//! Ok(())
31//! }
32//! ```
33
34/// HTTP client implementation for the RomM API.
35pub mod client;
36/// CLI command handlers.
37pub mod commands;
38/// Configuration and authentication management.
39pub mod config;
40/// Internal core logic and shared utilities.
41pub mod core;
42/// Type-safe API endpoint definitions.
43pub mod endpoints;
44/// Frontend-specific logic (shared between CLI and TUI).
45pub mod frontend;
46/// High-level service objects for common operations.
47pub mod services;
48/// TUI implementation (requires the `tui` feature).
49#[cfg(feature = "tui")]
50pub mod tui;
51/// Shared data models and types.
52pub mod types;
53/// Auto-update logic.
54pub mod update;