Skip to content

cli:Unify machine-readable CLI output#1169

Closed
tao-hunter wants to merge 1 commit into
entrius:testfrom
tao-hunter:cli/unify-json-flag-and-errors
Closed

cli:Unify machine-readable CLI output#1169
tao-hunter wants to merge 1 commit into
entrius:testfrom
tao-hunter:cli/unify-json-flag-and-errors

Conversation

@tao-hunter
Copy link
Copy Markdown

@tao-hunter tao-hunter commented May 12, 2026

Summary

Unify machine-readable CLI output across gitt miner and the rest of the CLI: single --json flag (with --json-output kept as a deprecated alias on miner commands), shared error payload shape {"success": false, "error": {"type": "...", "message": "..."}}, and structured JSON for Click parse/usage failures when --json or --json-output appears on the command line (via GittensorRootCli).

Related Issues

Closes #1151

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • Tests added/updated (test_miner_commands, test_issues_list_json, test_cli_json_error_output parse-path cases; miner score alias test)
  • Manual: gitt issues list --json …, gitt miner post|check|score --json …, invalid args with --json → JSON error on stdout

Checklist

  • Code style (ruff/format as applicable)
  • Self-review
  • Documentation updated (README/help only if you want to mention --json vs --json-output publicly)

@xiao-xiao-mao xiao-xiao-mao Bot added the refactor Code restructuring without behavior change label May 12, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 12, 2026

Duplicate of #1152 which is better scoped — clean rename without a deprecated alias to carry forward. Closing.

@anderdc anderdc closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize --json behavior across codebase

2 participants