Skip to content

feat: Refactor CLI commands to support JSON output and improve reporting#653

Open
kpob wants to merge 1 commit into
feature/replfrom
feature/cli-json-output
Open

feat: Refactor CLI commands to support JSON output and improve reporting#653
kpob wants to merge 1 commit into
feature/replfrom
feature/cli-json-output

Conversation

@kpob

@kpob kpob commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
  • Introduced CmdOutput trait for consistent output formatting across commands.
  • Added OutputFormat enum to handle human-readable and JSON output.
  • Updated ConfigCmd, ContractsCmd, CallCmd, PrintEventsCmd, InspectCmd, StatusCmd, TransferCmd, and WhoamiCmd to implement CmdOutput and return structured reports.
  • Enhanced StatusCmd to report on registered and unregistered contracts.
  • Refactored event logging in CallCmd to collect events for JSON output.
  • Created TransferReport, WhoamiReport, EventsReport, and ContractsSchemaReport for structured command outputs.
  • Added JSON serialization for command outputs using serde.
  • Updated command execution methods to return structured output instead of void.

- Introduced `CmdOutput` trait for consistent output formatting across commands.
- Added `OutputFormat` enum to handle human-readable and JSON output.
- Updated `ConfigCmd`, `ContractsCmd`, `CallCmd`, `PrintEventsCmd`, `InspectCmd`, `StatusCmd`, `TransferCmd`, and `WhoamiCmd` to implement `CmdOutput` and return structured reports.
- Enhanced `StatusCmd` to report on registered and unregistered contracts.
- Refactored event logging in `CallCmd` to collect events for JSON output.
- Created `TransferReport`, `WhoamiReport`, `EventsReport`, and `ContractsSchemaReport` for structured command outputs.
- Added JSON serialization for command outputs using `serde`.
- Updated command execution methods to return structured output instead of void.
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.

1 participant