2 unstable releases
Uses new Rust 2024
| new 0.5.0 | Feb 13, 2026 |
|---|---|
| 0.4.0 | Dec 19, 2025 |
#1241 in Command line utilities
52KB
757 lines
🦦 Clawless CLI
clawless-cli is the official command-line tool for working with Clawless
projects. It provides scaffolding and code generation capabilities to help you
quickly build and extend command-line applications.
The CLI itself is built using the Clawless framework, serving as both a useful tool and a reference implementation.
Installation
Install the CLI using cargo:
cargo install clawless-cli
Commands
clawless new
Create a new Clawless project with a complete setup:
clawless new my-app
This command:
- Creates a new binary crate with
cargo new - Adds
clawlessas a dependency - Sets up the project structure with
main.rsandcommands.rs - Creates a sample
greetcommand to get you started
clawless generate command
Generate a new command in an existing Clawless project:
clawless generate command my-command
For nested commands, use slash notation:
clawless generate command db/migrate
This command:
- Creates the command file with boilerplate code
- Adds the necessary
modstatement to the parent module - Supports nested command hierarchies
Usage in Projects
The typical workflow is:
-
Create a new project:
clawless new my-cli cd my-cli -
Generate additional commands:
clawless generate command deploy clawless generate command config/set -
Build and run your CLI:
cargo run -- greet World
License
Licensed under either of
- Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (http://opensource.org/licenses/MIT)
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.
Dependencies
~4.5–8MB
~130K SLoC