upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/ngit/cli.rs')
-rw-r--r--src/bin/ngit/cli.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs
index 76874c3..d2246d7 100644
--- a/src/bin/ngit/cli.rs
+++ b/src/bin/ngit/cli.rs
@@ -11,6 +11,7 @@ use crate::sub_commands;
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://pub123/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- publish a repository to nostr with `ngit init`\n\n{usage}\n{all-args}" 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://pub123/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- 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)]
14pub struct Cli { 15pub struct Cli {
15 #[command(subcommand)] 16 #[command(subcommand)]
16 pub command: Option<Commands>, 17 pub command: Option<Commands>,
@@ -32,6 +33,15 @@ pub struct Cli {
32 /// show customization options via git config 33 /// show customization options via git config
33 #[arg(short, long, global = true)] 34 #[arg(short, long, global = true)]
34 pub customize: bool, 35 pub customize: bool,
36 /// Use default values without prompting (non-interactive mode)
37 #[arg(short = 'd', long, global = true, conflicts_with = "interactive")]
38 pub defaults: bool,
39 /// Enable interactive prompts (default behavior)
40 #[arg(short = 'i', long, global = true)]
41 pub interactive: bool,
42 /// Force operations, bypass safety guards
43 #[arg(short = 'f', long, global = true)]
44 pub force: bool,
35} 45}
36 46
37pub const CUSTOMISE_TEMPLATE: &str = r" 47pub const CUSTOMISE_TEMPLATE: &str = r"
@@ -111,6 +121,8 @@ pub enum AccountCommands {
111 Logout, 121 Logout,
112 /// export nostr keys to login to other nostr clients 122 /// export nostr keys to login to other nostr clients
113 ExportKeys, 123 ExportKeys,
124 /// create a new nostr account
125 Create(sub_commands::create::SubCommandArgs),
114} 126}
115 127
116#[derive(clap::Parser)] 128#[derive(clap::Parser)]