Skip to content

Support silent flagย #628

@stephanmiehe

Description

@stephanmiehe

Describe the feature or problem you'd like to solve

Add a command line flag that instructs Copilot CLI to not output anything other than what comes back from the model

Proposed solution

$ copilot -p "what is the square root of 75? Output your answer as a single number without any additional text"
8.660254037844387


Total usage est:       1 Premium request
Total duration (API):  3s
Total duration (wall): 6s
Total code changes:    0 lines added, 0 lines removed
Usage by model:
    claude-sonnet-4.5    13.7k input, 11 output, 0 cache read, 0 cache write (Est. 1 Premium request)

Right now the output is quite verbose. I would recommend adding a CLI flag, such as --silent, which restricts the output to solely what comes back from the model. This is usefull because in the CLI world you're often chaining many commands and right now one has to either regex the results out of the command output or have Copilot write the results to a file and then pick it up with a subsequent bash command

Example prompts or workflows

$ copilot -p "what is the square root of 75? Output your answer as a single number without any additional text"
8.660254037844387

Additional context

No response

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