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:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-11-27 09:42:37 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-11-27 09:44:24 +0000
commitcb92d2ac8a7e014eac28ddf9ad1e6500b840739f (patch)
tree15fc284c905a9ac636fada066ed3caa933ce562f /src/bin/ngit/cli.rs
parentc002cef1e5d19946244086531f1178446fed8545 (diff)
feat(account): move login/out cmds to account
move login, logout export-keys commands to sub commands under account
Diffstat (limited to 'src/bin/ngit/cli.rs')
-rw-r--r--src/bin/ngit/cli.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs
index fce5664..851dd70 100644
--- a/src/bin/ngit/cli.rs
+++ b/src/bin/ngit/cli.rs
@@ -57,8 +57,6 @@ pub enum Commands {
57 Fetch(sub_commands::fetch::SubCommandArgs), 57 Fetch(sub_commands::fetch::SubCommandArgs),
58 /// signal you are this repo's maintainer accepting proposals via nostr 58 /// signal you are this repo's maintainer accepting proposals via nostr
59 Init(sub_commands::init::SubCommandArgs), 59 Init(sub_commands::init::SubCommandArgs),
60 /// export nostr keys to login to other nostr clients
61 ExportKeys,
62 /// issue commits as a proposal 60 /// issue commits as a proposal
63 Send(sub_commands::send::SubCommandArgs), 61 Send(sub_commands::send::SubCommandArgs),
64 /// list proposals; checkout, apply or download selected 62 /// list proposals; checkout, apply or download selected
@@ -67,8 +65,22 @@ pub enum Commands {
67 Push(sub_commands::push::SubCommandArgs), 65 Push(sub_commands::push::SubCommandArgs),
68 /// fetch and apply new proposal commits / revisions linked to branch 66 /// fetch and apply new proposal commits / revisions linked to branch
69 Pull, 67 Pull,
68 /// login, logout or export keys
69 Account(AccountSubCommandArgs),
70}
71
72#[derive(Subcommand)]
73pub enum AccountCommands {
70 /// run with --nsec flag to change npub 74 /// run with --nsec flag to change npub
71 Login(sub_commands::login::SubCommandArgs), 75 Login(sub_commands::login::SubCommandArgs),
72 /// remove nostr account details stored in git config 76 /// remove nostr account details stored in git config
73 Logout, 77 Logout,
78 /// export nostr keys to login to other nostr clients
79 ExportKeys,
80}
81
82#[derive(clap::Parser)]
83pub struct AccountSubCommandArgs {
84 #[command(subcommand)]
85 pub account_command: AccountCommands,
74} 86}