I built a tiny CLI so my AI coding tools stop forgetting everything
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…
A reporter chronicles the development of Mythicator, a simple command-line interface (CLI) designed to provide consistent memory across multiple artificial intelligence (AI) coding tools. The author explains their frustration with distinct AI tools, like Claude Code, Codex, and Gemini CLI, that forget shared knowledge, leading to redundant explanations of decisions.
The need for a unified solution prompted the creation of Mythicator, a CLI tool with a single purpose: maintaining a shared memory file per repository and distributing this memory to each AI tool's context file.
Mythicator operates through three primary commands: init, add, and sync. The init command initializes the memory file, add appends a new decision, and sync commands disseminates the memory across all associated files. All critical data resides in .agent-memory/memory.json, a committed file within the repository, ensuring a single source of truth. The tool eschews complex features like vector search or embeddings, focusing instead on simplicity and reliability.
The author emphasizes that existing memory frameworks like Mem0 and Zep are designed for more extensive and sophisticated memory management tasks, which are unnecessary for the author's specific requirement. Their solution remains minimalistic, relying on a single JSON file and a sync step. The most challenging aspect of development lay in creating a secure sync mechanism that respects any manually edited parts of the files it interacts with.
The sync command uses markers to delineate where it should and should not modify the files, preventing accidental overwriting of hand-edited content.
The author details their development process, involving the use of Codex to draft the initial implementation. They scrutinize the code line-by-line to ensure correctness, addressing concerns such as id collisions and marker-replacement logic. Initial bugs, such as id collisions after deleting and re-adding entries, were promptly identified and rectified by implementing a persistent counter instead of an array-length-based id system.
Mythicator is a small and functional v1, written in Node.js with TypeScript, depending on the commander package, and released under the MIT license. The reporter urges users who frequently switch between AI coding tools within the same codebase to consider Mythicator to avoid redundant explanations of their decisions. The source code for Mythicator is available at github.com/Jeffrin-dev/Mythicator.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.