Skip to content

feat: add --json output mode - #69

Open
linuxdoctor213 wants to merge 1 commit into
promptpolish-ai:mainfrom
linuxdoctor213:feat/json-output
Open

feat: add --json output mode#69
linuxdoctor213 wants to merge 1 commit into
promptpolish-ai:mainfrom
linuxdoctor213:feat/json-output

Conversation

@linuxdoctor213

Copy link
Copy Markdown

Add --json flag to git-context. When enabled, outputs all collected repo data as structured JSON instead of markdown.

Changes

  • Added --json argument to argparse
  • When --json is set, collects repo_name, generated_at, path, git(branch, remote), changes(unstaged/staged/clean), commits, branches, tree, and file_contents into a JSON object
  • Standard markdown output unchanged when flag is absent

Example

git context --json | jq '.repo_name'

Payment

  • Bounty: USD crypto
  • My ETH wallet: 0x7625b7a47beaa21ab593d0d31c6b3520db2810fb
  • XMR: 46GxGR9YpQdG5weXhA9gcGixGGiUENpigZFrxmnct7xjTxgMRMSErsyUEda18ejQQVYCFTrn2ZwsFGc2DF1QVLnbLBiFzQz

Closes #2

Add --json flag to git-context CLI. Outputs all collected
repo data (git info, changes, commits, branches, tree,
file contents) as structured JSON.

Closes promptpolish-ai#2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --json output mode (Bounty: $2 crypto)

1 participant