Have you been using GitHub Copilot CLI and wondered — “What was that prompt I used 2 days ago?”

Did you know your prompt history is stored locally on your machine, and you can look it up anytime!

Where is the history stored?

Look for a file called command-history-state.json inside the .copilot folder in your home directory.

OSPath
WindowsC:\Users\<username>\.copilot\command-history-state.json
macOS / Linux~/.copilot/command-history-state.json

What’s inside?

Open the file and you’ll see a commandHistory array — a list of every prompt you’ve typed into Copilot CLI.

Hope this was helpful! 🙂

Advertisements
Advertisements

One response to “[Quick Tip] GitHub Copilot CLI | Get Prompt History”

  1. GitHub Copilot CLI | /chronicle to Improve Your Prompting Style – Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI Avatar

    […] the previous post, we saw how GitHub Copilot CLI stores your prompt history locally in a file called […]

Leave a comment