Lightweight starter for a Rust command-line tool built with clap plus the interactive prompts in cliclack.
clap-driven commands (init,greet,config show,config path) with a sharedcorelibrary.cliclackprompts (intro,input,confirm,note,outro) that show how to do an interactive setup flow.ConfigStorehelper that serializes aConfigto the platform config directory used across commands.- Workspace aliases
cargo format/cargo lintplus CI that runs format, lint, build, and test on every push/PR.
cargo run -- init
cargo run -- greet
cargo run -- greet --user-name "Ada Lovelace"
cargo run -- config show
cargo run -- config pathinit prompts for the user name (unless you pass --user-name) and persists it via ConfigStore. The other commands load the same config and either greet that user or dump the config state.
core/: reusable library that holdsConfig,ConfigStore, and the samplegreetinghelper.cli/: binary that wiresclap,cliclack, and the core library into a tiny example CLI.
Use the provided workspace aliases:
cargo format # runs `cargo fmt --all`
cargo lint # runs `cargo clippy --workspace --all-targets --all-features`
cargo testEvery push/PR also triggers .github/workflows/ci.yml, which enforces the same format, lint, build, and test flow.