You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cli.rs
+97Lines changed: 97 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -290,6 +290,17 @@ pub enum Commands {
290
290
long_about = "AI-maintained documentation that stays in sync with the codebase. Docs are stored in .ai/docs/ and can be updated based on recent commits."
291
291
)]
292
292
Docs(DocsCommand),
293
+
#[command(
294
+
about = "Upgrade flow to the latest version.",
295
+
long_about = "Download and install the latest version of flow from GitHub releases. Checks for newer versions and replaces the current executable."
296
+
)]
297
+
Upgrade(UpgradeOpts),
298
+
#[command(
299
+
about = "Manage GitHub releases.",
300
+
long_about = "Create, list, and manage GitHub releases. Supports uploading release assets (binaries, tarballs) and generating release notes.",
301
+
alias = "rel"
302
+
)]
303
+
Release(GhReleaseCommand),
293
304
}
294
305
295
306
#[derive(Args,Debug,Clone)]
@@ -1655,6 +1666,92 @@ pub struct DocsCommand {
1655
1666
pubaction:Option<DocsAction>,
1656
1667
}
1657
1668
1669
+
#[derive(Args,Debug,Clone)]
1670
+
pubstructUpgradeOpts{
1671
+
/// Upgrade to a specific version (e.g., "0.2.0" or "v0.2.0").
1672
+
#[arg(value_name = "VERSION")]
1673
+
pubversion:Option<String>,
1674
+
/// Print what would happen without making changes.
1675
+
#[arg(long, short = 'n')]
1676
+
pubdry_run:bool,
1677
+
/// Force upgrade even if already on the latest version.
1678
+
#[arg(long, short)]
1679
+
pubforce:bool,
1680
+
/// Download to a specific path instead of replacing the current executable.
1681
+
#[arg(long, short)]
1682
+
puboutput:Option<String>,
1683
+
}
1684
+
1685
+
#[derive(Args,Debug,Clone)]
1686
+
pubstructGhReleaseCommand{
1687
+
#[command(subcommand)]
1688
+
pubaction:Option<GhReleaseAction>,
1689
+
}
1690
+
1691
+
#[derive(Subcommand,Debug,Clone)]
1692
+
pubenumGhReleaseAction{
1693
+
/// Create a new GitHub release.
1694
+
Create(GhReleaseCreateOpts),
1695
+
/// List recent releases.
1696
+
#[command(alias = "ls")]
1697
+
List{
1698
+
/// Number of releases to show.
1699
+
#[arg(short, long, default_value = "10")]
1700
+
limit:usize,
1701
+
},
1702
+
/// Delete a release.
1703
+
Delete{
1704
+
/// Release tag to delete.
1705
+
tag:String,
1706
+
/// Skip confirmation.
1707
+
#[arg(short, long)]
1708
+
yes:bool,
1709
+
},
1710
+
/// Download release assets.
1711
+
Download{
1712
+
/// Release tag (defaults to latest).
1713
+
#[arg(short, long)]
1714
+
tag:Option<String>,
1715
+
/// Output directory.
1716
+
#[arg(short, long, default_value = ".")]
1717
+
output:String,
1718
+
},
1719
+
}
1720
+
1721
+
#[derive(Args,Debug,Clone)]
1722
+
pubstructGhReleaseCreateOpts{
1723
+
/// Version tag (e.g., "v0.1.0"). Auto-detected from Cargo.toml if not provided.
1724
+
#[arg(value_name = "TAG")]
1725
+
pubtag:Option<String>,
1726
+
/// Release title (defaults to tag name).
1727
+
#[arg(short, long)]
1728
+
pubtitle:Option<String>,
1729
+
/// Release notes (reads from stdin or file if not provided).
1730
+
#[arg(short, long)]
1731
+
pubnotes:Option<String>,
1732
+
/// Read release notes from a file.
1733
+
#[arg(long)]
1734
+
pubnotes_file:Option<String>,
1735
+
/// Generate release notes automatically from commits.
1736
+
#[arg(long)]
1737
+
pubgenerate_notes:bool,
1738
+
/// Create as draft release.
1739
+
#[arg(long)]
1740
+
pubdraft:bool,
1741
+
/// Mark as prerelease.
1742
+
#[arg(long)]
1743
+
pubprerelease:bool,
1744
+
/// Asset files to upload (can be specified multiple times).
0 commit comments