Skip to content

Add --output-format json for structured output #4419

@blackgirlbytes

Description

@blackgirlbytes

This is a feature request from @middlew4y on Discord

Please explain the motivation behind the feature request.
goose run only outputs plain text, making it hard to parse tool calls and responses programmatically.

Describe the solution you'd like
Similar to Claude Code's --output-format json functionality, add --output-format json flag to output structured data

goose run --output-format json --text "analyze this code"

should output

{
  "messages": [...],
  "tool_calls": [...],
  "responses": [...],
  "metadata": {"total_tokens": 1250, "status": "completed"}
}
  • I have verified this does not duplicate an existing feature request

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions