Skip to content

Conversation

@edenreich
Copy link
Contributor

@edenreich edenreich commented Oct 5, 2025

Implements output format options for YAML and JSON as requested in issue #14.

Changes

  • Add global --output/-o flag with yaml (default) and json options
  • Implement structured output for all major commands
  • Use standard libraries: gopkg.in/yaml.v3 and encoding/json
  • Add comprehensive tests for output formatting functions
  • Update documentation with examples and usage instructions
  • YAML is the default output format as requested

Example Usage

# YAML output (default)
a2a tasks list

# JSON output
a2a tasks list -o json

Fixes #14

Additionally, I'm taking the opportunity to upgrade all the dependencies.

Generated with Claude Code

claude bot and others added 9 commits October 5, 2025 13:56
- Add global --output/-o flag with yaml (default) and json options
- Implement structured output for all major commands (tasks list/get/history, config list, agent-card, connect, version, submit)
- Use standard libraries: gopkg.in/yaml.v3 and encoding/json
- Add comprehensive tests for output formatting functions
- Update documentation with examples and usage instructions
- Remove deprecated displayPart function
- YAML is now the default output format as requested

Resolves #14

Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
…atting

Signed-off-by: Eden Reich <eden.reich@gmail.com>
…refactor output handling to use 'any' type instead of 'interface{}'

Also regenerate the types from the latest schema.

- Updated function signatures in cli.go to replace 'interface{}' with 'any' for better type safety.
- Modified output maps in various commands to use 'any' for consistency.
- Adjusted test cases in cli_output_test.go and cli_test.go to reflect the changes in type.
- Ensured compatibility with existing functionality while improving code readability.

Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ckerfile, go.mod, and CI workflows

Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
@edenreich edenreich merged commit a9a54a2 into main Oct 5, 2025
1 check passed
@edenreich edenreich deleted the claude/issue-14-20251005-1349 branch October 5, 2025 14:53
ig-semantic-release-bot bot added a commit that referenced this pull request Oct 5, 2025
## [0.7.0](v0.6.1...v0.7.0) (2025-10-05)

### ✨ Features

* **cli:** Add YAML and JSON output format support ([#15](#15)) ([a9a54a2](a9a54a2)), closes [#14](#14)
@ig-semantic-release-bot
Copy link
Contributor

🎉 This PR is included in version 0.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Output format option as YAML for readability

2 participants