ava-labs / ava-labs/platform-cli

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

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1
Forks
5
PR merge metrics
No merged PRs in 30d

Description

## 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:

```bash
# 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.