A Rust toolkit for building reliable, polished, and developer-friendly command-line applications.
Cliva is a collection of focused Rust libraries designed to make CLI development faster, cleaner, and less repetitive.
The project is organized as a Cargo workspace containing independently usable crates that share the same repository and development environment.
The core CLI development library.
It provides the building blocks required to create command-line applications, including command definitions, argument handling, options, flags, subcommands, parsing, and related CLI functionality.
Crate: cliva
[dependencies]
cliva = "0.1"A standalone terminal input and output toolkit for Rust CLI applications.
It focuses on making terminal interaction easier and more consistent, providing utilities for things such as formatted output, user input, prompts, status messages, and other terminal UI functionality.
cliva-io is independent from cliva and can be used on its own.
Crate: cliva-io
[dependencies]
cliva-io = "0.1"Cliva is intentionally split into focused libraries.
Cliva Workspace
|
+------------+------------+
| |
cliva cliva-io
| |
CLI Development Terminal I/O
| |
+------+-------+ +------+-------+
| | | |
Commands Parsing Input Output
Arguments Routing Prompts Formatting
Options Macros Selection Status
Flags Confirmation Tables
The crates are independently usable. Using one does not require using the other.
This allows developers to choose only the functionality their CLI actually needs.
Building a CLI should not require repeatedly solving the same problems.
cliva aims to provide well-designed primitives for common CLI development tasks while keeping the APIs simple, modular, and predictable.
The project focuses on:
- Less boilerplate
- Clear and expressive APIs
- Independent components
- Consistent terminal interaction
- Developer-friendly abstractions
- Reliable CLI behavior
- Minimal unnecessary dependencies
A CLI can combine both crates when needed:
use cliva::Command;
use cliva_io::output;
fn main() {
// CLI logic
// ...
output::success("Operation completed successfully.");
}The exact API is currently under development and may change before the first stable release.
The repository is a Cargo workspace containing independently versioned crates.
cliva/
├── Cargo.toml
├── Cargo.lock
├── README.md
├── LICENSE
│
├── cliva/
│ ├── Cargo.toml
│ └── src/
│
└── cliva-io/
├── Cargo.toml
└── src/
• Each crate has its own version and release cycle while sharing common workspace metadata such as the repository, license, authorship, Rust edition, and minimum supported Rust version.
Cliva is currently under active development.
APIs may change as the project evolves. Until the crates reach a stable release, users should expect breaking changes between versions.
Clone the repository:
git clone https://github.com/theNexmentProject/cliva.git
cd clivaBuild the entire workspace:
cargo build --workspaceRun tests:
cargo test --workspaceCheck the workspace:
cargo check --workspaceFormat the code:
cargo fmt --allRun Clippy:
cargo clippy --workspace --all-targets --all-featuresDocumentation will be available through docs.rs once the crates are published.
Visit website for more details.
Contributions are welcome.
Before submitting a pull request:
- Format the code with cargo fmt.
- Run cargo check --workspace.
- Run cargo test --workspace.
- Run Clippy and address relevant warnings.
- Keep changes focused and consistent with the project's design.
For larger changes, open an issue first to discuss the proposed design.
If you discover a security vulnerability, please report it privately.
Security contact: admin@nexment.in
Please do not publicly disclose security vulnerabilities before they have been reviewed.
This project is licensed under the terms of Apache License 2.0.
See the LICENSE file for details.
This Library is made under The Nexment Project.