1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
use std::path::PathBuf;
use clap::{Parser, Subcommand};
use crate::providers::Provider;
use crate::usage;
#[derive(Parser, Debug)]
#[command(
name = "communique",
version,
about = "Editorialized release notes powered by AI"
)]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
/// Enable verbose logging output
#[arg(long, short, global = true)]
pub verbose: bool,
/// Suppress progress output
#[arg(long, short, global = true)]
pub quiet: bool,
/// Path to config file (default: communique.toml in repo root)
#[arg(long, short, global = true)]
pub config: Option<PathBuf>,
}
#[derive(Subcommand, Debug)]
pub enum Command {
/// Generate release notes for a git tag
Generate {
/// Git tag to generate release notes for
tag: String,
/// Previous tag (auto-detected if omitted)
prev_tag: Option<String>,
/// Push editorialized notes to the GitHub release
#[arg(long)]
github_release: bool,
/// Update CHANGELOG.md with the generated changelog entry
#[arg(long)]
changelog: bool,
/// Output concise changelog entry instead of detailed notes
#[arg(long)]
concise: bool,
/// Generate notes without updating GitHub or verifying links
#[arg(long, short = 'n')]
dry_run: bool,
/// GitHub repo in owner/repo format (auto-detected from git remote)
#[arg(long)]
repo: Option<String>,
/// LLM model to use
#[arg(long)]
model: Option<String>,
/// Max response tokens
#[arg(long)]
max_tokens: Option<u32>,
/// LLM provider (anthropic or openai, auto-detected from model if omitted)
#[arg(long)]
provider: Option<Provider>,
/// Base URL for the LLM API
#[arg(long)]
base_url: Option<String>,
/// Write output to a file instead of stdout
#[arg(long, short)]
output: Option<PathBuf>,
},
/// Generate a communique.toml config file in the repo root
Init {
/// Overwrite existing config file
#[arg(long)]
force: bool,
},
Usage(usage::Usage),
}