xacli

Crates.ioxacli
lib.rsxacli
version0.2.0
created_at2025-11-27 10:45:28.71298+00
updated_at2026-01-15 18:31:06.04364+00
descriptionA modern, developer-friendly CLI framework for Rust
homepage
repositoryhttps://github.com/yufeiminds/xacli
max_upload_size
id1953509
size85,586
Yufei Li (yufeiminds)

documentation

https://docs.rs/xacli

README

XaCLI

A powerful, type-safe CLI framework for Rust.

Features

  • Derive Macros: #[derive(App)], #[derive(Subcommand)], #[derive(ValueEnum)]
  • Type-safe Parsing: Define CLI structure using structs and enums
  • Interactive Components: Prompts, spinners, progress bars, and more
  • Shell Completion: Auto-generation for Bash, Zsh, Fish, PowerShell
  • Validation: Built-in validators for arguments

Installation

[dependencies]
xacli = "0.1"

Quick Start

use xacli::App;

#[derive(App)]
#[command(name = "myapp", about = "My CLI app")]
struct Cli {
    /// The name to greet
    #[arg(short = 'n', long = "name", default_value = "World")]
    name: String,

    /// Enable verbose output
    #[arg(short = 'v', long = "verbose")]
    verbose: bool,
}

fn main() {
    let cli = Cli::parse();
    println!("Hello, {}!", cli.name);
}

Crates

Crate Description
xacli Umbrella crate (re-exports all)
xacli-core Core framework
xacli-derive Procedural macros
xacli-components Interactive components

Documentation

License

Apache-2.0

Commit count: 0

cargo fmt