chore: scaffold tvctl foundation
Set up the Rust crate, baseline module layout, and project docs so the repository matches the design bundle and builds cleanly as a starting point.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
/// The tvctl command-line interface.
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
name = "tvctl",
|
||||
version,
|
||||
about = "A local-first daemon and CLI for controlling smart TVs."
|
||||
)]
|
||||
pub struct Cli {
|
||||
/// Target a specific device by friendly name or UUID.
|
||||
#[arg(long, global = true)]
|
||||
pub device: Option<String>,
|
||||
|
||||
/// Emit JSON output suitable for scripting.
|
||||
#[arg(long, global = true)]
|
||||
pub json: bool,
|
||||
|
||||
/// The resource-oriented command to execute.
|
||||
#[command(subcommand)]
|
||||
pub command: Option<Command>,
|
||||
}
|
||||
|
||||
/// The top-level resource namespaces exposed by tvctl.
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub enum Command {
|
||||
/// Manage the background daemon.
|
||||
Daemon,
|
||||
/// Discover and manage devices.
|
||||
Device,
|
||||
/// List, launch, and stop applications.
|
||||
App,
|
||||
/// Send remote control input.
|
||||
Remote,
|
||||
/// Query device state.
|
||||
State,
|
||||
/// Use developer-oriented TV features.
|
||||
Dev,
|
||||
/// Inspect and modify tvctl configuration.
|
||||
Config,
|
||||
}
|
||||
|
||||
/// Parse the CLI and return successfully for the repository scaffold.
|
||||
pub async fn run() -> anyhow::Result<()> {
|
||||
let _ = Cli::parse();
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user