use crate::plugin::Command;
use anyhow::Result;
pub struct VersionCommand;
impl Command for VersionCommand {
fn name(&self) -> &str {
"version"
}
fn description(&self) -> &str {
"Display version information"
}
fn execute(&self, _args: &[String]) -> Result<()> {
println!("ff-cli version {}", env!("CARGO_PKG_VERSION"));
Ok(())
}
}
pub struct HelpCommand;
impl Command for HelpCommand {
fn name(&self) -> &str {
"help"
}
fn description(&self) -> &str {
"Display help information"
}
fn execute(&self, _args: &[String]) -> Result<()> {
println!("ff-cli - A pluggable command-line framework\n");
println!("Usage: ff-cli <command> [args]\n");
println!("Available commands:");
println!(" help - Display this help message");
println!(" version - Display version information");
println!("\nFor more information about a command, use: ff-cli <command> --help");
Ok(())
}
}