Skip to content

HUAICHUAN-dev/CodeFootprint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

CodeFootprint: Leave Traces for Files Changed by AI

You may have seen this happen:

AI breaks your project

For example: it weakens some features, or even removes core, important code. At that moment, you want to roll back, but AI cannot restore it, and may even start guessing wildly and making things worse.

You want to recover from a backup, but you did not have time to make one.

Or the previous backup is already a very old version. If you overwrite the current project with that old version, you may lose a lot of work you have built over time.

At this point, you may want another AI to repair it, but it is hard to explain exactly what was changed: which function was used wrong, which method was used wrong, and which parts were changed step by step. In the end, you may have no choice but to start over, spending a lot of time and energy again.

I know this feeling of helplessness deeply, so I built CodeFootprint. It was born for this.

If you also use VS Code, Codex, or Claude Code, I strongly recommend trying it.

CodeFootprint add project

Definition and Purpose

CodeFootprint is an app that runs locally, does not make network connections, and records modification traces. It is currently available on the App Store.

Trace data is stored on your device. As long as the app is open and your project has been added to the app, it automatically and continuously records supported code/text file changes, saving time, added lines, removed lines, and other traces into the local codetrace.db file.

If you need to hand work over, you can send this trace file to AI, letting it deeply understand the process, understand the problem, or attempt a rollback, giving the project a chance to come back to life.

A backup is like a snapshot of the project at one moment, but the modification process is empty.

CodeFootprint is like a black box. It quietly records and leaves behind the modification process.

You can keep backing up your project while also using CodeFootprint to record the AI modification process. The two can exist together. More stable.

When a project is messed up by AI, a backup can help you return to a saved point. CodeFootprint can help you see what AI changed before returning there. Whether it was a wrong modification or a correct one, it can become valuable experience.

CodeFootprint is not a code editor or a one-click rollback tool. It does not judge whether a modification is good or bad. It only keeps the modification traces.

CodeFootprint modification traces

How to Use

Steps:

Open the app > choose your storage path > add a project > do not quit the app

Then you can open VS Code, Codex, or Claude Code and let AI start working. After that, the app automatically records AI modifications.

Watching the traces update in the app while watching AI work gives a sense of safety.

I hope you can feel it too.

Of course, you can also test the app.

Testing steps:

Create a new folder and add it to the app. Then, in the About section of Settings, send the supported recordable file types to your AI, and also send the storage path to AI. Let AI write files while you check the database records and watch the app's memory usage. At the same time, consider your device performance. Do not damage your device. Or you can use other testing methods.

My test:

I let AI write 100G through scripts while repeatedly going back to modify files, and also perform normal writes and repeated modifications. The time was set to no earlier than and no longer than 25 minutes, and the result was fully recorded.

I also tried 200G, 400G, and so on. The results were also fully recorded.

After purchase, there are many days available for refund. You can spend one hour testing it. If you are very satisfied, that is great.

My test device:

MacBook Air with 16GB memory, 10-core Apple M4 chip, and 1T SSD.

codetrace.db File

Where is the codetrace.db file stored:

By default, CodeFootprint stores the database inside the project folder:

project-folder/.codetrace/codetrace.db

If you choose a custom storage location in Settings, CodeFootprint stores the database under that location:

your-storage-location/CodeFootprint/project-name--project-path-hash/codetrace.db

Each project has its own database folder. Modification traces from different projects are not mixed together.

CodeFootprint never promises automatic recovery. But it always leaves inspectable, exportable modification traces that can be handed to AI for analysis, supporting review, comparison, and recovery attempts.


CodeFootprint:给 AI 改过的文件留下痕迹

你或许遇见过以下情况:

AI 改坏了你的项目

比如:弱化了某些功能,甚至删除了核心关键的代码!此刻你想回退,但 AI 却又无力回天,甚至更加胡思乱想、胡作非为!

想从备份恢复,但又没来得及备份。

但之前的备份又是很旧的版本,如果此时用很旧的版本覆盖,又舍不得这么久以来的心血。

此时或许想让其他 AI 修复,但又很难诉说具体改动了什么,比如用错了什么函数,用错了什么方法等等。最后可能只能无奈重新来过,又得花上不少时间、不少精力!

我深知这份无力感,于是我开发了 CodeFootprint,它就是为此而生!

如果你也使用 VS Code、Codex、Claude Code,非常推荐试试!

CodeFootprint 添加项目

定义与作用

CodeFootprint 是一款在本地运行、不进行网络通信、负责记录修改痕迹的 app。目前已经成功上架 App Store。

痕迹数据保存在你的设备上。只要 app 打开,并且你的项目已经添加到 app,它就会自动持续记录支持的代码/文本文件变化,把时间、增加行、删除行等痕迹保存在本地 codetrace.db 文件里。

如果交接工作,可将这份痕迹文件发给 AI,让它深度了解过程,了解问题或尝试回退,让项目有机会再次复活!

备份像是某一刻的项目快照,但修改过程却是空白的。

而 CodeFootprint 像是个黑匣子,默默记录,留下修改过程。

你可以继续备份项目,同时也用 CodeFootprint 记录 AI 修改过程,二者共存!更稳!

当项目被 AI 改乱时,备份可以帮你回到某个保存点;CodeFootprint 可以帮你看清:在回到那里之前,AI 到底改过什么,不管是错误的修改还是正确的修改,这将都是一份宝贵的经验。

CodeFootprint 不是代码编辑器,不是一键回退工具。它也不会判断某次修改到底好不好。它只负责把修改痕迹留下来。

CodeFootprint 修改痕迹

使用方法

步骤:

打开 app > 选择你的存储路径 > 添加项目 > 不退出 app

然后你就可以打开你的 VS Code,或者 Codex、Claude Code,让 AI 开始工作。此后 app 会自动记录 AI 的修改。

一边看着 app 实时更新的痕迹,一边看着 AI 工作。

那种安全感,希望你也可以收到!

当然,你也可以测试 app!

测试步骤:

新建文件夹添加到 app,然后在设置的“关于”里面,把 app 支持的记录文件类型发给你的 AI,并且把存储地址也发给 AI。一边写入,一边查看数据库的记录,一边看着 app 的运行内存。同时也需要考虑你的设备性能,别把设备搞坏了。或者你还有其他测试方法。

我的测试:

让 AI 一边脚本写入 100G 并且回头反复修改,一边正常写入并且反复修改。设定时间:不早于也不超过 25 分钟,结果是全部记录。

也试过 200G、400G 等等,结果也是全部记录。

购买后有很多天的退款时间,可以抽一个小时测试测试,如果很满意,那太好了!

我的测试设备:

16GB 内存,10 核 Apple M4 芯片的 MacBook Air,搭配 1T 固态硬盘。

codetrace.db 文件

codetrace.db 文件保存在哪里:

默认情况下,CodeFootprint 会把数据库保存在项目文件夹里:

项目文件夹/.codetrace/codetrace.db

如果你在设置里选择了自定义存储位置,CodeFootprint 会把数据库保存在这个位置下面:

你选择的储存地址/CodeFootprint/项目名--项目路径哈希/codetrace.db

每个项目都会有自己的数据库文件夹,不同项目的修改痕迹不会混在一起。

CodeFootprint 始终不承诺自动恢复。但它始终留下了可检查、可导出、可交给 AI 分析的修改痕迹,用来支持复盘、对比和尝试回退。

About

A local file change tracker for macOS developers. Monitors project folders, records edits, deletions, diffs and timelines. 100% local, no cloud, no account required.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors