Categories
Tags
Astro Automation Camping changelog clear CLI Codex compact Component Design Configuration context Context Copilot copy Ctrl+S CUDA Cursor Day Trip delegate diff Dynamic Routing Editor Error Error Fix Error Handling experimental Gemini git GitHub GitHub Copilot Google Hiking Hot Springs init Installation Iwate Prefecture Kobe Linux Mac Mention Meteor Shower Mode Switching model Nara Prefecture NoAdapterInstalled Node.js nvm OpenAI params plan PowerShell Prompt props Public Key Authentication Python Redirect research rewind SEO share Shell Execution Shift+Tab Shortcut SSH SSH config ssh-copy-id Stargazing Static Site streamer-mode Student undo Update usage Visual Studio VS Code VS2026 Windows WSL
149 words
1 minutes
How to Run Shell Commands Directly Inside GitHub Copilot CLI【!】
Overview
When you’re in the middle of a Copilot CLI session and think “I just want to check git status real quick” — do you actually quit the CLI and open another terminal?
You don’t have to. Just prefix any command with ! and it runs directly in your local shell.
Usage
Add ! before the command you want to run:
/copilot> !git status/copilot> !ls -la/copilot> !npm testThe command bypasses Copilot entirely and runs on your local shell.
When to Use It
| Scenario | Example |
|---|---|
| Check Git status | !git status |
| List files | !ls / !dir |
| Run tests | !npm test |
| Build the project | !npm run build |
| Check environment | !echo $PATH |
How It Differs from a Regular Prompt
| Method | What happens |
|---|---|
| Regular prompt | Copilot interprets and executes (approval required) |
! prefix | Runs directly in your shell, bypassing Copilot |
Perfect for “I don’t need AI for this, I just need to check something real quick.” Also doesn’t consume any premium requests.
Related Posts
How to Run Shell Commands Directly Inside GitHub Copilot CLI【!】
https://naonao-na.com/en/posts/github-copilot-cli-shell-execute/
