updated docs for release
This commit is contained in:
32
src/cli.rs
32
src/cli.rs
@@ -1,3 +1,8 @@
|
||||
//! Defines the command-line interface for `ember-tune`.
|
||||
//!
|
||||
//! This module uses the `clap` crate to define the CLI arguments, subcommands,
|
||||
//! and help text.
|
||||
|
||||
use clap::{Parser, builder::styling};
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -7,27 +12,28 @@ const STYLES: styling::Styles = styling::Styles::styled()
|
||||
.literal(styling::AnsiColor::Cyan.on_default().bold())
|
||||
.placeholder(styling::AnsiColor::Cyan.on_default());
|
||||
|
||||
/// Scientifically-driven hardware power and thermal optimizer.
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(
|
||||
name = "ember-tune",
|
||||
author = "Nils Pukropp <nils@narl.io>",
|
||||
version = "1.0.0",
|
||||
about = "ember-tune: Scientifically-driven hardware power and thermal optimizer.",
|
||||
long_about = "ember-tune transforms manual laptop tuning into a rigorous, automated engineering workflow. \nIt executes a state machine to find the 'Physical Sweet Spot' of your specific hardware by measuring \nthe Silicon Knee, Thermal Resistance (Rθ), and Thermal Inertia, then outputs optimal \nconfigurations for tools like 'throttled' or 'ryzenadj'.",
|
||||
version = "1.1.0",
|
||||
about = "ember-tune: A physically-grounded thermal and power optimizer for Linux.",
|
||||
long_about = "ember-tune transforms manual laptop tuning into a rigorous, automated engineering workflow. \nIt executes a state machine to find the 'Physical Sweet Spot' of your specific hardware by measuring \nthe Silicon Knee, Thermal Resistance (Rθ), and Thermal Inertia, then outputs optimal \nconfigurations for tools like 'throttled' or 'i8kmon'.",
|
||||
styles = STYLES,
|
||||
after_help = "EXAMPLES:\n sudo ember-tune run # Run standard optimization\n sudo ember-tune run --dry-run # Audit and simulate without changes\n sudo ember-tune run --mock # Safe demo with fake hardware"
|
||||
after_help = "EXAMPLES:\n sudo ember-tune # Run standard optimization\n sudo ember-tune --audit-only # Validate system requirements only\n sudo ember-tune --mock # Safe demo with fake hardware"
|
||||
)]
|
||||
pub struct Cli {
|
||||
/// Path to output the optimized configuration file
|
||||
/// Path to output the final `throttled.conf` file.
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
default_value = "throttled.conf",
|
||||
help = "Destination for the generated configuration file (e.g. /etc/throttled.conf)"
|
||||
value_name = "THROTTLED_PATH",
|
||||
help = "Optional: Overrides the discovered or default path for throttled.conf."
|
||||
)]
|
||||
pub config_out: PathBuf,
|
||||
pub config_out: Option<PathBuf>,
|
||||
|
||||
/// Maximum safe temperature (Celsius) for the benchmark
|
||||
/// Maximum safe temperature (Celsius) for the benchmark.
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
@@ -36,7 +42,7 @@ pub struct Cli {
|
||||
)]
|
||||
pub max_temp: f32,
|
||||
|
||||
/// Enable verbose debug logging
|
||||
/// Enable verbose debug logging.
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
@@ -44,17 +50,17 @@ pub struct Cli {
|
||||
)]
|
||||
pub verbose: bool,
|
||||
|
||||
/// Use a mock hardware layer for safe testing
|
||||
/// Use a mock hardware layer for safe testing.
|
||||
#[arg(
|
||||
long,
|
||||
help = "Emulates hardware responses. Ideal for testing UI/Logic on unsupported systems."
|
||||
)]
|
||||
pub mock: bool,
|
||||
|
||||
/// Run pre-flight audit only
|
||||
/// Run pre-flight audit only, then exit.
|
||||
#[arg(
|
||||
long,
|
||||
help = "Validate system requirements and conflict management without starting the benchmark."
|
||||
help = "Validate system requirements and conflicts without starting the benchmark."
|
||||
)]
|
||||
pub audit_only: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user