1use colored::*;
2
3pub fn print_help() {
4 println!(
5 "{}",
6 "Git Editor - Git History Rewriting Tool".green().bold()
7 );
8 println!();
9 println!("{}", "A powerful Rust-based command-line utility designed to safely rewrite Git commit metadata.".white());
10 println!();
11 println!("{}", "USAGE:".yellow().bold());
12 println!(" {} [OPTIONS]", "git-editor".cyan());
13 println!();
14 println!("{}", "OPERATION MODES:".yellow().bold());
15 println!(" {} Full History Rewrite (default)", "•".green());
16 println!(" Requires: --email, --name, --begin, --end");
17 println!(" Example: git-editor --email user@example.com --name \"User\" --begin \"2023-01-01 00:00:00\" --end \"2023-01-07 23:59:59\"");
18 println!();
19 println!(" {} Show History", "•".green());
20 println!(" Flag: -s, --show-history");
21 println!(" Example: git-editor -s");
22 println!();
23 println!(" {} Pick Specific Commits", "•".green());
24 println!(" Flag: -p, --pick-specific-commits");
25 println!(" Example: git-editor -p");
26 println!();
27 println!(" {} Range Editing", "•".green());
28 println!(" Flag: -x, --range");
29 println!(" Example: git-editor -x");
30 println!();
31 println!(" {} Simulation Mode (Dry-Run)", "•".green());
32 println!(" Flag: --simulate");
33 println!(" Shows what changes would be made without applying them");
34 println!(" Example: git-editor --simulate --name \"Author\" --email \"author@example.com\"");
35 println!(" Example: git-editor --simulate --show-diff --name \"Author\" --email \"author@example.com\"");
36 println!();
37 println!("{}", "OPTIONS:".yellow().bold());
38 println!(
39 " {:<25} Path to Git repository (defaults to current directory)",
40 "-r, --repo-path <PATH>".cyan()
41 );
42 println!(
43 " {:<25} Email for rewritten commits",
44 "--email <EMAIL>".cyan()
45 );
46 println!(
47 " {:<25} Name for rewritten commits",
48 "-n, --name <NAME>".cyan()
49 );
50 println!(
51 " {:<25} Start date (YYYY-MM-DD HH:MM:SS)",
52 "-b, --begin <DATE>".cyan()
53 );
54 println!(
55 " {:<25} End date (YYYY-MM-DD HH:MM:SS)",
56 "-e, --end <DATE>".cyan()
57 );
58 println!(" {:<25} Show commit history", "-s, --show-history".cyan());
59 println!(
60 " {:<25} Interactive commit selection",
61 "-p, --pick-specific-commits".cyan()
62 );
63 println!(" {:<25} Interactive range editing", "-x, --range".cyan());
64 println!(
65 " {:<25} Dry-run mode - preview changes without applying",
66 "--simulate".cyan()
67 );
68 println!(
69 " {:<25} Show detailed diff in simulation (requires --simulate)",
70 "--show-diff".cyan()
71 );
72 println!(" {:<25} Print help information", "-h, --help".cyan());
73 println!(" {:<25} Print version information", "-V, --version".cyan());
74 println!();
75 println!(
76 "{}",
77 "For more detailed usage information, use: git-editor --help"
78 .white()
79 .italic()
80 );
81}