Add --open flag support to the docs server

This commit is contained in:
2025-08-11 01:22:00 -03:00
parent 7bb3a3387a
commit 84e3b533f0
5 changed files with 82 additions and 15 deletions
+18
View File
@@ -37,6 +37,14 @@
//!
//! let args = Args::parse();
//! ```
//!
//! # Running the Bot
//!
//! To start the bot, run:
//!
//! ```shell
//! $ cargo run -- start [TOKEN]
//! ```
/// Payphone's argument parser.
#[derive(clap::Parser)]
@@ -130,5 +138,15 @@ pub enum Commands {
default_value_t = 3000
)]
port: u16,
#[arg(
long,
short,
env = "PAYPHONE_DOCS_OPEN",
value_name = "OPEN",
default_value_t = false,
help = "Open the documentation in the default browser after starting the server."
)]
open: bool,
},
}