What this prompt does
This prompt walks you through using GitHub Copilot CLI (gh copilot) to turn plain-English descriptions into shell commands, Git operations, and DevOps scripts. It is keyed on [os] and [shell] so the suggestions fit your environment, and it covers both gh copilot suggest for generating commands and gh copilot explain for understanding ones you already encounter but do not fully trust. This is the command-line extension to the GitHub CLI, which is distinct from the inline completions you get inside an editor.
The structure works because it pairs generation with safety at every step. It produces [example_count] examples for [common_tasks], explains the [complex_commands] you flagged, and builds shell aliases in [shell] that wrap Copilot CLI for your most frequent operations. Critically, it shows how to preview a generated command before executing it, especially for [dangerous_operations] like recursive deletion or force push, so a risky suggestion never runs blind. It also generates Git commands for [git_scenarios] from natural-language queries, covers Docker, kubectl, and terraform commands from plain English, and sets up auto-suggestions in [terminal_tool]. Explaining a gnarly awk or rsync pipeline before you trust it is exactly the habit that prevents costly mistakes on a production box.
When to use it
- You want command suggestions from natural language instead of memorizing obscure flags.
- You frequently hit commands you do not fully understand and want them explained before running.
- You are about to run something destructive and want a preview-before-execute habit baked in.
- You need Git commands for tricky scenarios like cherry-picking ranges or bisecting a regression.
- You want shell aliases that wrap Copilot CLI for your most common tasks.
- You generate Docker, kubectl, or terraform commands and want them drafted from plain English descriptions.
Example output
Expect a practical, cheat-sheet-style guide. You get several gh copilot suggest examples for your common tasks, gh copilot explain walkthroughs of the gnarly commands you named, [shell] alias definitions you can paste straight into your config, a preview-before-run pattern centered on the dangerous operations, Git command suggestions for the complex scenarios, DevOps command examples across Docker, kubectl, and terraform, and setup notes for [terminal_tool] integration. It is closer to a runnable reference than a single answer, and you can adopt the pieces that fit your daily flow.
Pro tips
- Set
[os]and[shell]accurately, since a macOS/zsh suggestion can differ from a Linux/bash one in flags and quoting. - Put your genuinely risky commands in
[dangerous_operations]so the preview-first guidance is built around exactly what you fear running. - Always read the
gh copilot explainoutput before trusting a generatedawk,rsync, orfind -execpipeline. - Keep
[common_tasks]to things you actually do often, so the aliases earn their place rather than cluttering your config. - For
[git_scenarios], describe the outcome you want; Copilot CLI handles the exact flag soup better than memory does. - Never pipe a generated command straight into execution on production — preview it, read it, then run it deliberately.