Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

[FEAT]: Support non-interactive mode with standard shell output redirect #145

@bpkroth

Description

@bpkroth

Thanks for taking the time to fill out this out! 🙇
By submitting this issue, you agree to follow our Code of Conduct.

Describe the need

I want to be able to use gh copilot suggest in a promptless manner using standard shell output capture and redirects.

Version

gh copilot --version
version 1.1.0 (2025-02-10)

Relevant terminal output

bpkroth@localhost: ~/src/env 130 (master) $ command=$(ghcs print "Suggest a git commit command and message for these changes: $(git diff --cached)")

✗ Error: failed to copy to clipboard: failed to copy to clipboard: No clipboard utilities available. Please install xsel, xclip, wl-clipboard or Termux:API add-on for termux-clipboard-get/set.

bpkroth@localhost: ~/src/env 1 (master) $ echo "$command"

Welcome to GitHub Copilot in the CLI!
version 1.1.0 (2025-02-10)

I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve. For more information, see https://gh.io/gh-copilot-transparency


  # Suggestion:

    git commit -m "Add 'gh' to installation scripts for Linux, macOS, and Windows"


? Select an option
> Copy command to clipboard

this should only capture and print

git commit -m "Add 'gh' to installation scripts for Linux, macOS, and Windows"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions