[−][src]Crate climake
The simple, dependency-less cli library ✨
Example 📚
ⓘThis example panics
use climake::{Argument, CLIMake, DataType}; fn main() { let args = vec![ Argument::new( vec!['o'], vec![String::from("output"), String::from("out")], Some("Example output arg"), DataType::File, ).unwrap(), Argument::new( vec!['a', 'b', 'c'], vec![], Some("Alphabet!"), DataType::None, ).unwrap(), ]; let cli = CLIMake::new(args, Some("A showcase CLI to demonstrate climake"), None).unwrap(); println!("Args used:\n{:#?}", cli.parse()); }
Installation 🚀
Simply add the following to your Cargo.toml
file:
[dependencies]
climake = "2.0"
Structs
Argument | An allowed argument for a new CLI |
CLIMake | Main holder structure of entire climake library, used to create new CLIs. |
UsedArg | Given for when a user used a valid Argument and any data given alongside it |
Enums
CLIError | The primary error enum for climake, used when an error is encountered to use downstream |
CallType | The ways users can call a given Argument |
DataType | The type of data an argument accepts. The enum that hands the user's inputs to you is PassedData, extending from UsedArg |
PassedData | Data collected from user input based upon wanted data from PassedData |