What Works with GitHub Copilot and Copilot CLI: A Practical Guide
A practical guide to what works with GitHub Copilot and Copilot CLI: code editing, GitHub operations, project automation, and more. Learn how to use Copilot CLI in your terminal for real-world tasks.
What Works with GitHub Copilot and Copilot CLI: A Practical Guide
GitHub Copilot has revolutionized the way developers write code, and with the introduction of the Copilot CLI, its power is now available directly in your terminal. But what exactly can you do with Copilot and Copilot CLI, and how do they fit into your workflow? This guide focuses on practical, real-world use cases that work today.
What is GitHub Copilot CLI?
GitHub Copilot CLI brings AI-powered coding assistance to your command line. It enables you to:
- Build, edit, and debug code using natural language
- Interact with your GitHub repositories, issues, and pull requests
- Work in an agentic, conversational way—Copilot can plan and execute complex tasks
- Stay in control: preview every action before it runs
Supported platforms include Linux, macOS, and Windows (PowerShell or WSL).
What Can You Do with Copilot CLI?
1. Code Editing and Refactoring
- Ask Copilot to make changes to your codebase, e.g.,
Change the background-color of H1 headings to dark blue. - Request improvements or rewrites for files, e.g.,
Suggest improvements to content.jsorRewrite the readme to be more accessible.
2. GitHub Operations
- Perform Git operations with natural language:
Commit the changes to this repo,Revert the last commit, leaving the changes unstaged. - Summarize changes:
Show me the last 5 changes made to CHANGELOG.md.
3. Project Automation and Creation
- Generate new projects:
Create a Next.js app with Tailwind CSS that tracks build stats from the GitHub API. - Get step-by-step instructions for building, running, and viewing your app.
4. Debugging and Explanations
- Ask Copilot to explain why a change isn’t working as expected.
- Get help debugging code or understanding errors.
5. Interactive and Programmatic Modes
- Interactive mode: Start a session with
copilotand converse with the agent. - Programmatic mode: Use
copilot -p "your prompt"to run a single command and exit.
What Won’t Work (Yet)?
- Copilot CLI requires an active Copilot subscription and may be disabled by your organization’s admin.
- Some advanced features (like custom MCP servers) are still evolving.
- Copilot CLI does not replace your IDE’s full feature set, but complements it.
Getting Started
- Install via script:
curl -fsSL https://gh.io/copilot-install | bash - Or with Homebrew:
brew install copilot-cli - Start with
copilotin your terminal, or try a one-off command withcopilot -p.
Final Thoughts
GitHub Copilot and Copilot CLI are powerful tools that can speed up your workflow, automate repetitive tasks, and help you learn as you code. Focus on natural language prompts and iterative conversations to get the most out of these tools.
For more details, check the official documentation and GitHub Copilot CLI repo.
Share this post