Clawless is a batteries-included framework that provides everything you need for production CLIs: structured output, configuration management, environment context, and scaffolding tools. You write command functions; Clawless provides the infrastructure.
use clawless::prelude::*;
#[derive(Debug, Args)]
pub struct GreetArgs {
/// The name to greet
#[arg(default_value = "World")]
name: String,
}
/// Greet the user
#[command]
pub async fn greet(args: GreetArgs, context: Context) -> CommandResult {
println!("Hello, {}!", args.name);
Ok(())
}That's it. The function name becomes your command name, doc comments become help
text, and the Context parameter gives you access to environment info,
configuration, and output abstractions. Everything you need to build a
professional CLI is already there.
Install the Clawless CLI:
cargo install clawless-cliCreate a new project:
clawless new my-cli
cd my-cli
cargo run -- greetRead the Quick Start guide for a complete walkthrough.
- Convention over configuration - File hierarchy maps to command hierarchy
- Type-safe arguments - Full compiler guarantees via Clap's derive API
- Async by default - Tokio runtime managed automatically
- Context system - Access environment info and framework features
- Scaffolding tools - Generate projects and commands with
clawless newandclawless generate - Doc-driven help - Doc comments become help text
- clawless.rs - Full documentation and guides
- docs.rs/clawless - API reference
- crates.io/crates/clawless - Published crate
Clawless is actively used in our internal projects and continues to evolve based on real-world needs. The core concepts are stable, but we will add new features and refine APIs as we expand its capabilities.
Check out the roadmap to see what we're working on and share your ideas.
If you're building internal tools or prototyping, Clawless is a great choice. For production applications, review the open issues to understand current limitations and upcoming features.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.