From 9bed16badc27d8cf9e3026f22e935476fe70d549 Mon Sep 17 00:00:00 2001 From: ozzy Date: Sun, 30 Aug 2026 15:12:25 -0500 Subject: [PATCH] feat(cli): implement clap added clap, justfile now allows passing args to run recipe --- justfile | 4 ++-- src/main.rs | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 178e507..bae980c 100644 --- a/justfile +++ b/justfile @@ -3,8 +3,8 @@ _default: # Run the bot [group('dev')] -run: - cargo run +run *args: + cargo run {{args}} # Clean up previous builds [group('build')] diff --git a/src/main.rs b/src/main.rs index a9e675d..1b29a3b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,13 @@ +use clap::Parser; + +#[derive(Parser, Debug)] +#[command(version, about, long_about = None)] +struct Args { + word: String, +} + #[tokio::main] async fn main() { - println!("Hello, dictionary!"); + let args = Args::parse(); + println!("{:?}", args); }