Line data Source code
1 : mod app;
2 : mod diff;
3 : mod git;
4 : mod logger;
5 : mod syntax;
6 : mod ui;
7 : mod watcher;
8 :
9 : use anyhow::Result;
10 : use app::App;
11 : use clap::Parser;
12 :
13 : #[derive(Parser, Debug)]
14 : #[command(name = "hunky")]
15 : #[command(about = "A TUI for streaming git changes in real-time", long_about = None)]
16 : struct Args {
17 : /// Path to the git repository to watch
18 : #[arg(short, long, default_value = ".")]
19 : repo: String,
20 : }
21 :
22 : #[tokio::main]
23 0 : async fn main() -> Result<()> {
24 0 : let args = Args::parse();
25 0 : logger::init();
26 :
27 : // Initialize the application with the specified repository
28 0 : let mut app = App::new(&args.repo).await?;
29 :
30 : // Run the application
31 0 : app.run().await?;
32 :
33 0 : Ok(())
34 0 : }
35 :
36 : #[cfg(test)]
37 : #[path = "../tests/main.rs"]
38 : mod tests;
|