| Crates.io | clawless-derive |
| lib.rs | clawless-derive |
| version | 0.4.0 |
| created_at | 2025-06-20 19:33:31.218142+00 |
| updated_at | 2025-12-19 13:48:17.33227+00 |
| description | Derive macros for the Clawless CLI framework |
| homepage | |
| repository | https://github.com/aonyx-ai/clawless.git |
| max_upload_size | |
| id | 1720096 |
| size | 24,795 |
clawless-deriveclawless is a framework for building command-line applications with Rust, and
the clawless-derive crate implements the procedural macros that power this
framework.
The crate defines three main macros which the clawless crate re-exports:
main! - Generates the application entry point and main functioncommands! - Sets up the commands module with the root command and inventory#[command] - Marks functions as CLI commands and registers themThe typical structure is:
// src/main.rs
mod commands;
clawless::main!();
// src/commands.rs
mod my_command;
clawless::commands!();
The commands! macro generates the root command for your CLI, while the
#[command] macro does the heavy lifting of creating individual commands and
registering them with their parent module.
Check the documentation of the macros to get a better understanding of how this crate works.
Licensed under either of
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.