upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/cli.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-09-04 08:04:48 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-09-04 13:30:59 +0100
commit949c6459aa7683453a7160423b689ceadb08954b (patch)
tree230c26ecb11b99916e5570e548673eb09ecf0a36 /src/cli.rs
parenta825311f2c55661aaab3a163bda9109295c96044 (diff)
refactor: organise into lib and bin structure
the make the code more readable this commit just moves the files, the next commit should fix the imports
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/cli.rs b/src/cli.rs
deleted file mode 100644
index d0f934e..0000000
--- a/src/cli.rs
+++ /dev/null
@@ -1,44 +0,0 @@
1use clap::{Parser, Subcommand};
2
3use crate::sub_commands;
4
5#[derive(Parser)]
6#[command(author, version, about, long_about = None)]
7#[command(propagate_version = true)]
8pub struct Cli {
9 #[command(subcommand)]
10 pub command: Commands,
11 /// remote signer address
12 #[arg(long, global = true)]
13 pub bunker_uri: Option<String>,
14 /// remote signer app secret key
15 #[arg(long, global = true)]
16 pub bunker_app_key: Option<String>,
17 /// nsec or hex private key
18 #[arg(short, long, global = true)]
19 pub nsec: Option<String>,
20 /// password to decrypt nsec
21 #[arg(short, long, global = true)]
22 pub password: Option<String>,
23 /// disable spinner animations
24 #[arg(long, action)]
25 pub disable_cli_spinners: bool,
26}
27
28#[derive(Subcommand)]
29pub enum Commands {
30 /// update cache with latest updates from nostr
31 Fetch(sub_commands::fetch::SubCommandArgs),
32 /// signal you are this repo's maintainer accepting proposals via nostr
33 Init(sub_commands::init::SubCommandArgs),
34 /// issue commits as a proposal
35 Send(sub_commands::send::SubCommandArgs),
36 /// list proposals; checkout, apply or download selected
37 List,
38 /// send proposal revision
39 Push(sub_commands::push::SubCommandArgs),
40 /// fetch and apply new proposal commits / revisions linked to branch
41 Pull,
42 /// run with --nsec flag to change npub
43 Login(sub_commands::login::SubCommandArgs),
44}