upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/ngit
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/ngit')
-rw-r--r--src/bin/ngit/cli.rs18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs
index ade7861..7baa1d3 100644
--- a/src/bin/ngit/cli.rs
+++ b/src/bin/ngit/cli.rs
@@ -8,7 +8,7 @@ use crate::sub_commands;
8#[command( 8#[command(
9 author, 9 author,
10 version, 10 version,
11 help_template = "{name} {version}\nnostr plugin for git\n - clone a nostr repository, or add as a remote, by using the url format nostr://npub123/identifier\n - remote branches beginning with `pr/` are open PRs from contributors; `ngit list` can be used to view all PRs\n - to open a PR, push a branch with the prefix `pr/` or use `ngit send` for advanced options\n set title and description via push options:\n git push -o 'title=My PR' -o 'description=line1\\n\\nline2' -u origin pr/branch\n- publish a repository to nostr with `ngit init`\n\n{usage}\n{all-args}" 11 help_template = "{name} {version}\nnostr plugin for git\n includes a remote helper so native git commands (clone, fetch, push) work with nostr:// URLs\n - clone a nostr repository, or add as a remote, by using the url format nostr://npub123/identifier\n - remote branches beginning with `pr/` are open PRs from contributors; `ngit list` can be used to view all PRs\n - to open a PR, push a branch with the prefix `pr/` or use `ngit send` for advanced options\n set title and description via push options:\n git push -o 'title=My PR' -o 'description=line1\\n\\nline2' -u origin pr/branch\n - publish a repository to nostr with `ngit init`\n\n{usage}\n{all-args}"
12)] 12)]
13#[command(propagate_version = true)] 13#[command(propagate_version = true)]
14#[allow(clippy::struct_excessive_bools)] 14#[allow(clippy::struct_excessive_bools)]
@@ -103,11 +103,15 @@ pub fn extract_signer_cli_arguments(args: &Cli) -> Result<Option<SignerInfo>> {
103 103
104#[derive(Subcommand)] 104#[derive(Subcommand)]
105pub enum Commands { 105pub enum Commands {
106 /// signal you are this repo's maintainer accepting PRs and issues via nostr 106 /// publish a repository to nostr; signal you are its maintainer accepting
107 /// PRs and issues
107 Init(sub_commands::init::SubCommandArgs), 108 Init(sub_commands::init::SubCommandArgs),
108 /// submit PR with advanced options 109 /// submit PR with advanced options
110 #[command(
111 long_about = "submit PR with advanced options\n\nfor a simpler flow, push a branch with the `pr/` prefix using native git:\n git push -o 'title=My PR' -o 'description=details here' -u origin pr/my-branch"
112 )]
109 Send(sub_commands::send::SubCommandArgs), 113 Send(sub_commands::send::SubCommandArgs),
110 /// list PRs; checkout, apply or download selected 114 /// list PRs and view details
111 List { 115 List {
112 /// Filter by status (comma-separated: open,draft,closed,applied) 116 /// Filter by status (comma-separated: open,draft,closed,applied)
113 #[arg(long, default_value = "open,draft")] 117 #[arg(long, default_value = "open,draft")]
@@ -122,6 +126,9 @@ pub enum Commands {
122 offline: bool, 126 offline: bool,
123 }, 127 },
124 /// checkout a proposal branch by event-id or nevent 128 /// checkout a proposal branch by event-id or nevent
129 #[command(
130 long_about = "checkout a proposal branch by event-id or nevent\n\nuse `ngit list` to find proposal IDs"
131 )]
125 Checkout { 132 Checkout {
126 /// Proposal event-id (hex) or nevent (bech32) 133 /// Proposal event-id (hex) or nevent (bech32)
127 id: String, 134 id: String,
@@ -130,6 +137,9 @@ pub enum Commands {
130 offline: bool, 137 offline: bool,
131 }, 138 },
132 /// apply proposal patches to current branch 139 /// apply proposal patches to current branch
140 #[command(
141 long_about = "apply proposal patches to current branch\n\nuse `ngit list` to find proposal IDs"
142 )]
133 Apply { 143 Apply {
134 /// Proposal event-id or nevent 144 /// Proposal event-id or nevent
135 id: String, 145 id: String,
@@ -143,7 +153,7 @@ pub enum Commands {
143 /// update repo git servers to reflect nostr state (add, update or delete 153 /// update repo git servers to reflect nostr state (add, update or delete
144 /// remote refs) 154 /// remote refs)
145 Sync(sub_commands::sync::SubCommandArgs), 155 Sync(sub_commands::sync::SubCommandArgs),
146 /// login, logout or export keys 156 /// create account, login, logout or export keys
147 Account(AccountSubCommandArgs), 157 Account(AccountSubCommandArgs),
148} 158}
149 159