# I built a tiny CLI so my AI coding tools stop forgetting everything

> Source: <https://dev.to/jeffrin-dev/i-built-a-tiny-cli-so-my-ai-coding-tools-stop-forgetting-everything-1hdd>
> Published: 2026-08-05 15:42:52+00:00

I switch between Claude Code, Codex, and Gemini CLI depending on the day and the task. Each one is genuinely good. Each one also has zero idea what the other one knows.

I'd explain a decision to Claude Code — "we're using Postgres here because we need concurrent writes, don't suggest SQLite again" — and it'd remember, because it reads `CLAUDE.md`

. Then I'd switch to Codex for the same repo and it would suggest SQLite. Again. Because nothing I told Claude Code ever made it into whatever context Codex was reading.

Multiply that by every "we tried X, it didn't work, don't suggest it again" conversation, and you start explaining the same three things to three different tools every week. That got old fast.

Mythicator is a CLI called `mythicator`

. It does one thing: keeps a single memory file per repo, and pushes it out to whatever context file each AI tool already reads.

```
mythicator init
mythicator add "Chose Postgres over SQLite" --type decision --reason "needs concurrent writes from multiple workers"
mythicator sync
```

That `sync`

command writes the same memory into `CLAUDE.md`

, `AGENTS.md`

, `GEMINI.md`

, and `.cursorrules`

— wrapped in a marker block so it never touches anything I've written by hand in those files. Update the memory once, every tool gets it.

The canonical data lives in `.agent-memory/memory.json`

, committed to the repo. It's not fancy — decisions, rejected approaches, bugs, conventions, notes, each with an optional reason and tags. No vector search, no embeddings, no hosted service. Just a JSON file and a sync step.

There are already solid tools doing "memory for AI" — Mem0, Zep, that kind of thing. I looked at them before building this. They're aimed at developers building agents that need long-term memory at runtime, with similarity search over a big pile of facts. That's a different problem than mine.

I didn't need semantic search. I needed "the four tools I personally switch between all agree on the same five decisions about this one repo." Much smaller problem, much dumber solution — a flat file and a sync command.

The trickiest bit wasn't the memory storage — that's a JSON file with an id counter. It was the sync logic not corrupting files I'd hand-edited.

If `sync`

just overwrote `AGENTS.md`

wholesale every time, it'd nuke anything I'd written there manually. So the generated block sits between markers:

``` php
<!-- AGENT-MEMORY:START (auto-generated by mythicator, do not edit) -->
...
<!-- AGENT-MEMORY:END -->
```

Sync only touches what's between those two lines. Run it ten times, get the same output ten times. If a file somehow ends up with a START marker and no END marker (half-corrupted), it skips that file and warns instead of guessing and potentially wrecking it.

Small detail, but it's the difference between a tool people trust enough to run automatically versus one they run once, get burned by, and delete.

I'm not going to pretend this was all hand-typed. I used Codex to write the implementation from a fairly detailed spec, then went through `storage.ts`

and `sync.ts`

myself line by line — specifically checking two things I've been burned by before with AI-generated code: id collisions after deleting an entry, and whether the marker-replacement logic was a fragile regex or something that'd actually survive a re-run. First pass had a real bug (ids based on array length, which breaks the moment you delete something and add again). Caught it, had it fixed with a persistent counter instead, verified it myself before trusting it.

Also worth saying plainly: the sandbox Codex tested in couldn't reach the real npm registry, so its own "tests passed" claims were built on a dependency shim. I didn't take that at face value — cloned it to my own Ubuntu laptop, ran `npm install`

for real, and only counted it as working once I'd verified the whole init → add → sync → list → remove → sync-again flow myself with a fresh build.

It's a small, working v1. Node.js, TypeScript, one runtime dependency (`commander`

), MIT licensed. If you bounce between AI coding tools on the same codebase and you're tired of repeating yourself, it might save you some breath.

Repo: [github.com/Jeffrin-dev/Mythicator](https://github.com/Jeffrin-dev/Mythicator)

Not trying to build the next Mem0. Just trying to stop telling Codex about SQLite every single week.
