-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Describe the feature or problem you'd like to solve
It's currently inconvenient to pass complex, multiline prompts with code samples and quotes to copilot-cli through the -p argument, as the CLI requires escaping quotes and line breaks, making scripting and interactive use cumbersome.
Proposed solution
Support passing the prompt to copilot-cli via standard input (stdin), enabling users to pipe in content directly or redirect from files. This would streamline interactive use and scripting, reducing the need for cumbersome escaping and making it easier to work with prompts that include code and formatting.
Example prompts or workflows
echo "Suggest a git alias for rebasing." | copilot <command> --stdincat elaborate_prompt.txt | copilot <command> --stdin
Additional context
- This feature is particularly useful when prompts are generated programmatically or authored in external editors.
- It would maintain parity with other CLI tools that support stdin (such as git, jq, etc).
- Could help standardize CI/CD and scripting scenarios.
Metadata
Metadata
Assignees
Labels
No labels