Where Does the GitHub Copilot CLI Store Config and History?
The Copilot CLI keeps global defaults, auth state and chat history in a .copilot folder in your home directory, with per-repo overrides beside code.
Last updated
The agentic Copilot CLI owns one home folder and keeps everything in it. Global settings, permissions, custom instructions, agents, hooks, MCP registry, plugins, logs and a session database all branch from .copilot. Repos add a thin .github layer for shared versus personal rules.
Two files deserve opposite handling. settings.json is yours to edit. config.json is auto-managed state for auth and plugins and breaks when hand-edited. History lives in the history folder as chat JSON, which is the part to archive if past sessions matter.
Where GitHub Copilot CLI stores this, by platform
%USERPROFILE%\.copilot
Global defaults plus permissions, instructions, agents, hooks, MCP registry, plugins, logs and session database. Override the whole root with COPILOT_HOME. Never confuse with the gh CLI paths.
~/.copilot
Same .copilot tree on Mac with repo overrides at .github/copilot/settings.json shared and settings.local.json personal. Chat history archives as JSON under history.
~/.copilot
Same .copilot tree on Linux with XDG locations auto-migrating into it on startup. Legacy per-project config dir flags still work but COPILOT_HOME is the supported knob.
Frequently asked questions
Where do Copilot CLI settings live?
Edit ~/.copilot/settings.json for global defaults. Per-project allows live in .github/copilot/settings.json shared with the team, with settings.local.json for personal rules that stay gitignored. The auto-managed config.json beside them holds auth and trusted dirs, so leave that one alone.
How do I move the Copilot CLI data folder?
Set COPILOT_HOME to the replacement directory before launching. It swaps the whole path rather than appending, and XDG locations migrate into .copilot automatically on startup. Move the folder contents first so history and plugins follow.
Is this the same as the gh CLI config?
Do not mix them. The gh CLI keeps its own hosts and config while the agentic copilot CLI owns ~/.copilot with session-store.db, command history and the mcp-config.json registry. Installed plugins sit under installed-plugins inside the same tree.
Notice an outdated path? Let us know.