<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shankar B</title>
    <description>The latest articles on DEV Community by Shankar B (@shankarnarayanb).</description>
    <link>https://dev.to/shankarnarayanb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4099590%2F60f0bbf7-e2c8-4cda-9b51-5ddf45e1af92.png</url>
      <title>DEV Community: Shankar B</title>
      <link>https://dev.to/shankarnarayanb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shankarnarayanb"/>
    <language>en</language>
    <item>
      <title>I Gave GitHub Copilot CLI a Memory I Own</title>
      <dc:creator>Shankar B</dc:creator>
      <pubDate>Sat, 29 Aug 2026 00:01:52 +0000</pubDate>
      <link>https://dev.to/shankarnarayanb/i-gave-github-copilot-cli-a-memory-i-own-4cb0</link>
      <guid>https://dev.to/shankarnarayanb/i-gave-github-copilot-cli-a-memory-i-own-4cb0</guid>
      <description>&lt;p&gt;Honestly, I was not trying to build a memory system.&lt;/p&gt;

&lt;p&gt;I just wanted to talk to Copilot CLI the way I would talk to another developer:&lt;/p&gt;

&lt;p&gt;“Save this debugging finding to local memory: the Redis integration tests must run serially because the workers share DB 0.”&lt;/p&gt;

&lt;p&gt;“Remember locally that changing the auth timeout requires updating both &lt;code&gt;gateway.yml&lt;/code&gt; and &lt;code&gt;worker.yml&lt;/code&gt;.”&lt;/p&gt;

&lt;p&gt;“Save this migration decision to local memory: use expand–migrate–contract because the API and workers deploy independently.”&lt;/p&gt;

&lt;p&gt;Then I wanted to close the terminal, come back tomorrow, and not explain them again.&lt;/p&gt;

&lt;p&gt;These are the kinds of details engineers learn while doing the work: a flaky-test cause, a coupling between two configuration files, and the reasoning behind a migration strategy. Copilot could help uncover them, yet the lesson could still disappear with the session.&lt;/p&gt;

&lt;p&gt;I wanted those rules to survive across sessions. But I also wanted to know exactly where they lived, what they said, and how to remove them.&lt;/p&gt;

&lt;p&gt;That became &lt;strong&gt;Copilot CLI Local Memory&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Memory should feel like yours
&lt;/h3&gt;

&lt;p&gt;I did not want to build another database, background service, or dashboard. For a handful of important project rules, that felt heavier than the problem.&lt;/p&gt;

&lt;p&gt;I wanted memory to be boring in the best possible way: a file you can open.&lt;/p&gt;

&lt;p&gt;The extension therefore has three explicit commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/remember Production deployments must always use --dry-run.
/memories deployment
/forget 51e81a1f6f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save a rule. Start a new session. Copilot remembers.&lt;/p&gt;

&lt;h3&gt;
  
  
  What actually gets stored
&lt;/h3&gt;

&lt;p&gt;Each memory becomes one modular Copilot instruction file under:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.copilot/instructions/local-memory/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A generated file looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;applyTo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;**"&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

Production deployments must always use --dry-run.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is ordinary Markdown. You can inspect it, edit it, back it up, or delete it yourself.&lt;/p&gt;

&lt;p&gt;File-scoped rules are possible too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/remember --scope "src/**/*.ts" Use Zod rather than Joi for validation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Deliberately small
&lt;/h3&gt;

&lt;p&gt;Why should Copilot need a database just to remember one deployment caveat?&lt;/p&gt;

&lt;p&gt;I didn’t want Postgres, SQLite, a vector database, embeddings, or another service to maintain. So I kept the installed runtime deliberately small: two JavaScript files using only Node.js built-ins. There are no runtime dependencies, no database, and no server.&lt;/p&gt;

&lt;p&gt;Each memory is one plain &lt;code&gt;.instructions.md&lt;/code&gt; file on your machine. You can open it, diff it, edit it, back it up, or delete it.&lt;/p&gt;

&lt;p&gt;Explicit search uses deterministic local term ranking instead of embeddings.&lt;/p&gt;

&lt;p&gt;The extension deduplicates equivalent entries and refuses deletion by text when several memories match. It also blocks several common credential formats, although no detector is perfect and secrets should never be stored in agent instructions.&lt;/p&gt;

&lt;p&gt;You can ask in natural language:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Save this caveat to local memory: run deploy-tool with --dry-run first.
Check local memory for caveats about deploy-tool.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is an honest limitation: Copilot decides whether to invoke a tool for natural-language requests. Use &lt;code&gt;/remember&lt;/code&gt;, &lt;code&gt;/memories&lt;/code&gt;, and &lt;code&gt;/forget&lt;/code&gt; when predictable behavior matters.&lt;/p&gt;

&lt;p&gt;Newly saved instructions are automatically applied in a new session. And although the extension itself makes no network calls, Copilot may include applicable instruction text in the prompt sent to the model. Local storage does not make secrets safe to place in prompts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why not put everything in &lt;code&gt;copilot-instructions.md&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;For stable, team-wide rules, you should. Language versions, formatting standards, and permanent repository conventions belong in documentation or checked-in instructions.&lt;/p&gt;

&lt;p&gt;This extension is for the moment when useful knowledge emerges during a task and you want to capture it without stopping to curate a large instruction file. Each memory is stored separately, can be searched or removed by command, and can be scoped to matching files. If a memory becomes a permanent team rule, promote it into the repository’s documentation or instructions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.github.com/en/copilot/concepts/agents/copilot-memory" rel="noopener noreferrer"&gt;GitHub’s Memory documentation&lt;/a&gt; describes this learned context as including architectural decisions, build commands, database-connection patterns, and settings that must remain synchronized across files. That is the territory these examples are meant to represent.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why not just use GitHub’s managed Memory?
&lt;/h3&gt;

&lt;p&gt;GitHub’s managed Memory is the right option when it is available and fits the workflow. This project serves a narrower preference: explicit saves, plain local files, and direct user control. It may also help developers whose organizations disable managed Memory while still permitting extensions and custom instructions.&lt;/p&gt;

&lt;p&gt;It does not imitate GitHub’s service or bypass organization policy.&lt;/p&gt;

&lt;h3&gt;
  
  
  One rule you never want to explain again
&lt;/h3&gt;

&lt;p&gt;The repository includes Windows, macOS, and Linux installers, uninstallers that preserve saved memories by default, tests, and recordings from the real Copilot CLI.&lt;/p&gt;

&lt;p&gt;Try it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/shankarnarayanb/copilot-cli-local-memory" rel="noopener noreferrer"&gt;https://github.com/shankarnarayanb/copilot-cli-local-memory&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have ever grown tired of teaching your coding assistant the same lesson twice, save one rule and start a new session.&lt;/p&gt;

&lt;p&gt;Then tell me what worked, what surprised you, and what Copilot should never forget again.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>devops</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
