Skip to content

Add --json / --output json flag for machine-readable output #25

Description

@devrel-ditto

Problem

There's no way to get structured output from commands. For scripting and automation (CI/CD pipelines, monitoring, agent workflows), parsing human-readable text is fragile.

Examples where JSON output would help:

# Scripting balance checks
platform wallet balance --network fuji --key-name mykey --json
# {"address": "P-fuji1...", "balance_navax": 0, "balance_avax": "0.000000000"}

# Programmatic key management  
platform keys list --json
# [{"name": "mykey", "encrypted": false, "default": true, "created": "2026-03-20"}]

# Node info for monitoring
platform node info --ip 127.0.0.1 --json
# {"node_id": "NodeID-...", "bls_public_key": "...", "bls_pop": "..."}

Suggested Implementation

A global --json or --output json flag that switches all commands to emit JSON to stdout. Human-readable remains the default.

This would make platform-cli much more useful for:

  • CI/CD pipelines
  • Monitoring scripts
  • AI agent integrations (relevant given the AI agent angle in the docs)
  • Composing with jq and other unix tools

Environment

  • platform-cli v1.0.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions