From 796a2638fd2e839a5f331861d800ff7c60bacb4d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 Jun 2026 12:00:42 -0500 Subject: [PATCH] Add --json output mode for structured data export --- git-context | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/git-context b/git-context index 92e2b81..52ee01e 100755 --- a/git-context +++ b/git-context @@ -8,6 +8,7 @@ Usage: git context [--depth N] [--files] [--log N] [--output file] [--dir 0 else None, + "branches": branches, + "project_structure": tree_out, + "file_contents": file_contents(target) if args.files else None, + } + output = json.dumps(data, indent=2) + else: + output = "\n".join(sections) if args.output: Path(args.output).write_text(output)