Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rust-cli/climake
The simplistic, dependency-free cli library ✨
https://github.com/rust-cli/climake
cli cli-library no-dependencies rust
Last synced: about 16 hours ago
JSON representation
The simplistic, dependency-free cli library ✨
- Host: GitHub
- URL: https://github.com/rust-cli/climake
- Owner: rust-cli
- License: apache-2.0
- Archived: true
- Created: 2020-06-10T01:26:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-03T23:47:24.000Z (almost 4 years ago)
- Last Synced: 2024-05-09T14:18:13.153Z (6 months ago)
- Topics: cli, cli-library, no-dependencies, rust
- Language: Rust
- Homepage: https://crates.io/crates/climake
- Size: 195 KB
- Stars: 133
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# climake
The simplistic, dependency-free cli library ✨
- **[Documentation](https://docs.rs/climake)**
- [Crates.io](https://crates.io/crates/climake)---
This branch represents the unpublished rewrite version of climake with many advantages compared to the original version which is no longer developed upon!
## Example 📚
Demo of a simple package manager:
```rust
use climake::prelude::*;fn main() {
let package = Argument::new(
"The package name",
vec!['p', 'i'],
vec!["pkg, package"],
Input::Text,
);let add = Subcommand::new("add", vec![&package], vec![], "Adds a package");
let rem = Subcommand::new("rem", vec![&package], vec![], "Removes a package");let cli = CliMake::new(
"MyPkg",
vec![],
vec![&add, &rem],
"A simple package manager demo",
"1.0.0",
);let parsed = cli.parse();
for subcommand in parsed.subcommands {
if subcommand.inner == &add {
println!("Adding package {:?}..", subcommand.arguments[0]);
} else if subcommand.inner == &rem {
println!("Removing package {:?}..", subcommand.arguments[0]);
}
}
}
```## Installation 🚀
Simply add the following to your `Cargo.toml` file:
```toml
[dependencies]
climake = "3.0.0-pre.1" # rewrite isn't out just yet!
```## License
This library is duel-licensed under both the [MIT License](https://opensource.org/licenses/MIT) ([`LICENSE-MIT`](https://github.com/rust-cli/climake/blob/master/LICENSE-MIT)) and [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) ([`LICENSE-APACHE`](https://github.com/rust-cli/climake/blob/master/LICENSE-APACHE)), you may choose at your discretion.