Skip to content

aonyx-ai/clawless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

437 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦦 Clawless

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.

Quick Start

Install the Clawless CLI:

cargo install clawless-cli

Create a new project:

clawless new my-cli
cd my-cli
cargo run -- greet

Read the Quick Start guide for a complete walkthrough.

Features

  • 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 new and clawless generate
  • Doc-driven help - Doc comments become help text

Documentation

Project Status

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.

License

Licensed under either of

at your option.

Contribution

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.

About

A framework to build command-line applications in Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Contributors