From 2f2819cc2365be07fedfd35ab3654b3607e29e76 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 5 Mar 2026 10:58:37 +0000 Subject: add `ngit account whoami` command Shows currently logged-in account(s) with name and npub. When both a local (repo-scoped) and global account are configured, displays both with local marked as active. Supports --json (returns local, global, and active objects each with name, npub, nip05, scope) and --offline (reads from cache only, no network). Fixes doc_markdown clippy warning in cli.rs. --- src/bin/ngit/cli.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/bin/ngit/cli.rs') diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index 5feaf31..ccf25bb 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -143,6 +143,8 @@ pub enum AccountCommands { ExportKeys, /// create a new nostr account Create(sub_commands::create::SubCommandArgs), + /// show currently logged-in account(s) + Whoami(sub_commands::whoami::SubCommandArgs), } #[derive(clap::Parser)] @@ -158,7 +160,7 @@ pub struct RepoSubCommandArgs { /// Use local cache only, skip network fetch #[arg(long)] pub offline: bool, - /// Output repository info as JSON; is_nostr_repo is false when not in a nostr repository + /// Output repository info as JSON; `is_nostr_repo` is false when not in a nostr repository #[arg(long)] pub json: bool, } -- cgit v1.2.3