Skip to content

Add --output flag to ctx diff for saving reports to file #4

Description

@selwyntheo

Currently ctx diff only prints to stdout. Add an --output <file> flag to write the diff report to a file.

Acceptance criteria:

  • ctx diff <a> <b> continues to print to stdout
  • ctx diff <a> <b> --output report.json writes JSON output to the specified file
  • ctx diff <a> <b> --human --output report.txt writes human-readable output to file
  • Add a test case

Files to look at:

  • cmd/ctx/commands.go — diff command definition
  • internal/diff/ — diff and output logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions