From ecae4bd13c1e28d7efd9ee9bb106ff27fa0451f6 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 4 Mar 2026 16:59:45 +0000 Subject: add `ngit repo --json` for machine-readable repo detection Outputs {"is_nostr_repo": false} when not in a nostr repository, or full structured JSON (name, identifier, description, nostr_url, coordinate, maintainers, grasp_servers, git_servers, relays, hashtags) when it is. Always exits 0. Also adds --title as an alias for --name on `ngit init`. --- src/bin/ngit/cli.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/bin/ngit/cli.rs') diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index 5ee9165..5feaf31 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -158,6 +158,9 @@ 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 + #[arg(long)] + pub json: bool, } // --------------------------------------------------------------------------- -- cgit v1.2.3