Skip to content

Start-Copilot: expose copilot --usage-output-file (write usage JSON to a file) #118

Description

@shmuelie

Summary

Start-Copilot does not expose the Copilot CLI's --usage-output-file flag. It is only reachable via -RemainingArgs passthrough, so unlike the launcher's other scripting-oriented options (-Silent, -OutputFormat) it has no first-class parameter, help, or path handling.

Feature

copilot --usage-output-file <file> writes the final usage statistics as JSON to the specified file. It complements non-interactive/scripting runs (-Prompt, -Silent, -OutputFormat json) by capturing token/credit usage for later processing.

Observed on GitHub Copilot CLI 1.0.81.

Proposal / acceptance criteria

  • Add a -UsageOutputFile <path> parameter that emits --usage-output-file <path>.
  • Document that it is most useful with -Prompt (non-interactive mode).
  • Comment-based help, README, and an [Unreleased] CHANGELOG.md entry.
  • Tests asserting the flag + value are emitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions