Copilot CLI: Automation, Programmatic Mode, Scripts, and GitHub Actions/Share programmatic output to a secret gist
Publish the transcript as a gist.
Section: Programmatic mode basics
Share programmatic output to a secret gist
bash
bash
copilot -p "Summarize open pull requests assigned to me." --share-gistExplanation
Convenient when the result needs to be accessed outside the runner.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Programmatic mode basics
Pipe prompt text and redirect the answer
Generate output for downstream steps.
Run a prompt with automatic tools
Let Copilot use tools during a non-interactive run.
Export a session transcript after a run
Save the output session to Markdown.
Analyze a file from CI
Use a one-off prompt to inspect generated artifacts or source files.