diff --git a/website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md b/website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md index dc6141a31..f5f3837a1 100644 --- a/website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md +++ b/website/src/content/docs/learning-hub/cli-for-beginners/01-setup-and-first-steps.md @@ -3,7 +3,7 @@ title: '01 ยท First Steps' description: 'Experience your first GitHub Copilot CLI demos and learn the three main interaction modes.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-06-19 +lastUpdated: 2026-07-17 --- ![Chapter 01: First Steps](/images/learning-hub/copilot-cli-for-beginners/01/chapter-header.png) @@ -365,17 +365,23 @@ copilot --allow-all -p "Review @myfile.py for issues" ## Essential Slash Commands -These commands work in interactive mode. **Start with just these six** - they cover 90% of daily use: +These commands are great to learn initially as you're getting started with Copilot CLI: | Command | What It Does | When to Use | |---------|--------------|-------------| -| `/help` | Show all available commands | When you forget a command | +| `/ask` | Ask a quick question without it affecting your conversation history | When you want a quick answer without derailing your current task | | `/clear` | Clear conversation and start fresh | When switching topics | +| `/help` | Show all available commands | When you forget a command | +| `/model` | Show or switch AI model | When you want to change the AI model | | `/plan` | Plan your work out before coding | For more complex features | +| `/refine` | Rewrite a rough, stream-of-consciousness prompt into a clear, focused one | When your prompt feels messy and you want better results | | `/research` | Deep research using GitHub and web sources | When you need to investigate a topic before coding | -| `/model` | Show or switch AI model | When you want to change the AI model | | `/exit` | End the session | When you're done | +> ๐Ÿ’ก **`/ask` vs regular chat**: Normally every message you send becomes part of the ongoing conversation and affects future responses. `/ask` is an "off the record" shortcut โ€” perfect for quick one-off questions like `/ask What does YAML mean?` without polluting your session context. + +> ๐Ÿ’ก **`/refine` for better prompts**: Not sure if your prompt is clear enough? Type it out as it comes to mind, then run `/refine` to let Copilot rewrite it into a precise, well-structured prompt before sending. This is especially useful when you're new to AI tools and still learning how to write effective prompts. + That's it for getting started! As you become comfortable, you can explore additional commands. > ๐Ÿ“š **Official Documentation**: [CLI command reference](https://docs.github.com/copilot/reference/cli-command-reference) for the complete list of commands and flags. @@ -391,11 +397,13 @@ That's it for getting started! As you become comfortable, you can explore additi |---------|--------------| | `/init` | Initialize Copilot instructions for your repository | | `/agent` | Browse and select from available agents | -| `/skills` | Manage skills for enhanced capabilities | +| `/env` | Show loaded environment details โ€” what instructions, MCP servers, skills, agents, and plugins are active | +| `/init` | Initialize Copilot instructions for your repository | | `/mcp` | Manage MCP server configuration | | `/settings` | Open an interactive dialog to browse and edit all user settings in one place | +| `/skills` | Manage skills for enhanced capabilities | -> ๐Ÿ’ก Skills are covered in detail in [Chapter 05](../05-skills/). MCP servers are covered in [Chapter 06](../06-mcp-servers/). +> ๐Ÿ’ก Agents are covered in [Chapter 04](https://github.com/github/copilot-cli-for-beginners/blob/main/04-agents-custom-instructions/README.md), skills are covered in [Chapter 05](https://github.com/github/copilot-cli-for-beginners/blob/main/05-skills/README.md), and MCP servers are covered in [Chapter 06](https://github.com/github/copilot-cli-for-beginners/blob/main/06-mcp-servers/README.md). ### Models and Subagents @@ -610,7 +618,8 @@ The examples used `/plan` for a search feature and `-p` for batch reviews. Now t |---------|--------------|-----| | Typing `exit` instead of `/exit` | Copilot CLI treats "exit" as a prompt, not a command | Slash commands always start with `/` | | Using `-p` for multi-turn conversations | Each `-p` call is isolated with no memory of previous calls | Use interactive mode (`copilot`) for conversations that build on context | -| Forgetting quotes around prompts with `$` or `!` | Shell interprets special characters before Copilot CLI sees them | Wrap prompts in quotes: `copilot -p "What does $HOME mean?"` | +| Forgetting quotes around prompts with `$` or `!` | Shell interprets special characters before Copilot CLI sees them | Wrap prompts in single quotes: `copilot -p 'What does $HOME mean?'` | +| Pressing Esc once to cancel a running task | A single Esc no longer cancels in-flight work (to prevent accidents) | Press **Esc twice** to cancel while Copilot CLI is processing | ### Troubleshooting @@ -631,7 +640,7 @@ The examples used `/plan` for a search feature and `-p` for batch reviews. Now t 1. **Interactive mode** is for exploration and iteration - context carries forward. It's like having a conversation with someone who remembers what you've said up to that point. 2. **Plan mode** is normally for more involved tasks. Review before implementation. 3. **Programmatic mode** is for automation. No interaction needed. -4. **Four essential commands** (`/help`, `/clear`, `/plan`, `/exit`) cover most daily use. +4. **Essential commands** (`/ask`, `/help`, `/clear`, `/plan`, `/research`, `/model`, `/exit`) cover most daily use. > ๐Ÿ“‹ **Quick Reference**: See the [GitHub Copilot CLI command reference](https://docs.github.com/en/copilot/reference/cli-command-reference) for a complete list of commands and shortcuts.