GitHub published a beginner’s guide to Copilot CLI covering the two modes developers need to understand before building any CLI workflow: interactive and non-interactive.
Interactive mode is the default. Running copilot drops you into a chat-like session where you can ask follow-up questions, refine commands, and iterate on output — useful when you’re exploring an unfamiliar codebase or debugging something you don’t fully understand yet.
Non-interactive mode uses the -p flag to fire a single prompt and get a single response, then exit. No session, no back-and-forth. That makes it the right choice for scripts, CI pipelines, or any situation where you need Copilot’s output piped into another command without human interaction in the loop.
The distinction matters more than it looks. Defaulting to interactive mode in an automated script will hang waiting for input. Defaulting to non-interactive when you’re still figuring out the right command means rerunning from scratch every time you need to adjust. Knowing which mode fits the task cuts wasted time on both ends.
If you’re just getting started: use copilot for exploratory work at the terminal, and reach for copilot -p "your prompt here" the moment you’re writing anything that runs without you watching it.