//! CLI overrides (ADR-014). use clap::Parser; #[derive(Parser, Debug)] #[command(name = "simulator", about = "Headless Cartopolis simulation server")] pub struct SimCli { #[arg( long, help = "TCP listen address (overrides cartopolis.toml / CARTO_listen)" )] pub listen: Option, #[arg( long, help = "HTTP listen address for the browser transport (/ws) and the admin API" )] pub http_listen: Option, #[arg( long, help = "UDP listen address for the call forwarder (off when absent)" )] pub calls_listen: Option, #[arg( long, help = "IP:port clients reach the call forwarder at, when not the listen address" )] pub calls_public_addr: Option, /// Create-or-repair an admin account, then exit without serving. /// /// Takes the password from `CARTO_ADMIN_PASSWORD` rather than a flag: an /// argument is in the process table and in the operator's shell history, and /// this is the one credential that can grant itself everything else. #[arg( long, value_name = "USERNAME", help = "Create/repair an admin account (password from CARTO_ADMIN_PASSWORD) and exit" )] pub create_admin: Option, #[arg(long, help = "SQLite path (overrides CARTO_database_path)")] pub database_path: Option, #[arg(long, help = "Simulation tick rate (Hz)")] pub tick_hz: Option, #[arg(long, help = "Most prims this world may hold at once")] pub max_prims: Option, #[arg(long, help = "Most scripted prims this world may hold at once")] pub max_scripts: Option, #[arg( long, help = "OSM tile URL template with {z}/{x}/{y} (sent to clients at handshake)" )] pub osm_tile_url_template: Option, #[arg(long, help = "Directory serving texture PNG files to clients")] pub texture_dir: Option, }