展示HN:一个带有Git、端到端加密同步和时间搜索功能的终端写作环境

1作者: sys-ronin17 天前原帖
我是一名40岁的失业系统管理员,没有计算机科学学位,也没有开发经验,但拥有25年的系统知识。我构建了一个完全加密的写作环境,让我能够专注于写作,而不必担心应用程序的细节。在这个过程中,人工智能是我的代码翻译器,而我则严格扮演架构师和指导者的角色。一切始于我问自己:“为什么以及如何我能瞬间记起任何过去的记忆,而不需要在脑海中搜索。”这成为了我应用程序的设计原则。因此,我通过在每次提交中嵌入UUID,解决了一个基本的Git问题——跟踪单个笔记的历史。 它的响应式数据即用户界面(data-as-UI)接口使得应用程序几乎没有学习曲线。使用编号的鱼眼跳转系统,深层层级的导航变得简单,无需前进按钮。每个操作只需一到两个按键,例如:v(查看)、c(创建)、d(删除)、r(重命名)、(j)ump、s(同步)、(s)earch、b(返回)或v1、d1、j1、jb等。它是使用Python标准库构建的(没有其他依赖),结合了Git和加密标准原语(嵌入式)。我通过程序化地使用git-filter-repo进行永久性项目删除,使用UUID从应用程序内部进行操作。每个项目(笔记、文件、子笔记本)都有完整的时间线,可以查看从创建到删除的整个生命周期,并带有墓碑信息。其子笔记本层级可以达到任意深度。它支持80种文件类型,具有语法高亮编辑功能,并可导出文件。每个笔记本或子笔记本内部都有活动查看器,显示您在笔记本中的最后50个活动。搜索非常简单,例如:“s files* file.md date* 02-04-2026 in* notebook/subnotebook_name”、“s note_name date* 01-04-2026 05-04-2026”、“s edited* any_text thisweek <i>s in</i> notebook/subnotebook_name”或仅仅是“s anytext”。 笔记本可以使用8-24个单词的BIP-39短语进行加密,并使用密码进行常规锁定/解锁。它使用标准的AES-GCM加密,并且是可移植的。它可以在每个笔记本管理界面中显示密码更改日志。密钥库是硬件绑定的,但又是可移植的,USB驱动器可以充当TPM般的安全性。这意味着当密钥无法访问时,笔记本将无法访问。应用程序架构和数据结构是解耦的。应用程序架构允许应用、笔记本和密钥库可以位于三个不同的位置,甚至在不同的系统中,而数据架构则允许元数据和内容在每个笔记本文件夹内的不同文件中分开存储,通过UUID链接。Git被用于执行项目级(而非文件级)版本控制和基于UUID的提交元数据的时间搜索。这里的提交元数据没有加密,尽管如果需要,可以通过修改现有代码来实现。每个笔记本都是自包含的,仅在一个可移动的文件夹中。这个架构还支持使用GitHub和其他平台的可选端到端加密(e2ee)无冲突同步。使用该应用程序不需要成为Git专家,云服务提供商即使在公开可见的情况下也无法查看数据。 我请求尊敬的HN社区成员查看文档和story_n_constraint.md文件,其中详细解释了“什么、如何、为什么”。我还在代码库中放入了一些抽象想法(what_can_be_done文件)。我想感谢Python、Git、加密技术、nvim、micro和git-filter-repo的创造者。正是他们的工具汇聚在一起,将一个概念转变为一个可工作的应用程序。 这篇文章、GitHub代码库以及所有源代码和文档都是先前艺术的一部分,具有适当的许可证(公共+时间戳+启用)。 代码库: * [https://github.com/sys-ronin/terminal-notes](https://github.com/sys-ronin/terminal-notes) 要求: Linux/Mac/Windows/Docker,Python 3.13,Git,nvim/micro或任何基于终端的编辑器(可以从根文件夹内的config.json进行配置),使用GitHub同步需要互联网。 示例 - python3 terminal_notes_ui.py(来自Linux) * 仅在Debian 13上测试过。 git clone [https://github.com/sys-ronin/terminal-notes.git](https://github.com/sys-ronin/terminal-notes.git) && cd terminal-notes && python3 terminal_notes_ui.py sys-ronin
查看原文
I am a 40 years old jobless sys-admin with no cs degree and no development experience and 25 yeras of system knowledge. I built a fully encrypted writing environment where I can write with focus forgetting about the application. Here ai was my code translator while I strictly was the architect and instructor. It all started when i asked myself that &quot;why and how i remember any past memory instantly without searching inside my head&quot;. This became the design principle of my app. Thus I solved a fundamental git problem of tracking a single note throughout the history by embedding uuid in every commit.<p>Its responsive data-as-UI based interface keeps the app (nearly) learning curve free. Navigating deep hierarchies is easy using numbered fisheye jump system without forward button. Every operation is in one or two keystroke like v(view), c(create), d(delete), r(rename), (j)ump s(sync), (s)earch, b(back) or v1, d1, j1, jb etc. It is built using python standard library (no other dependency), Git, cryptography standard primitive (embedded). I used git-filter-repo programaically for permanent item erasure using uuid from inside the application. It has full timeline for each item (note, file, subnotebook) to see the entire life cycle from create to erase with tombstone. Its subnotebook hierarchy can be upto any depth. It supports 80 file types with syntax highlighted editing with export feature for files. It has activity viewer inside every notebook or subnotebook. It shows your last 50 activities in the notebook. Searching is easy like &quot;s files* file.md date* 02-04-2026 in* notebook&#x2F;subnotebook_name&quot;, &quot;s note_name date* 01-04-2026 05-04-2026&quot;, &quot;s edited* any_text thisweek<i>&quot; &quot;s in</i> notebook&#x2F;subnotebook_name&quot; or just &quot;s anytext&quot;.<p>Notebook can be encrypted using 8-24 words BIP-39 phrases and use password for regular lock&#x2F;unlock. It is encrypted using standard AES-GCM and also portable. It can show password change log in each notebook management screen. Key vaults are hardware bound yet portable and a usb drive can act as TPM like security. It means when the keys are not reachable, notebooks can&#x27;t be accessed. The application architecture and data structure is decoupled. Where app architecture allows the app, notebook and key vault can be in three different locations or even in different systems and data architecture allows metadata and content remain separated in different files inside each notebook folder linked via UUID. Git is implemented for doing item level (not file level) versioning and temporal search with uuid based commit metadata. Here commit metadata is not encrypted, though doable modifying the existing code if required. Every notebook is self contained in just a movable single folder. The architectur also enables optional e2ee conflict free sync using github and other platforms. It does not need someone to be a git expert to use the application and cloud vendor cannot see the data even with public visibility.<p>I will request respected HN people to go through the documents and the story_n_constraint.md file, that will explain the what, how, why in details. I also put a couple of abstract ideas inside the repo (what_can_be_done files). I want to thank the creators of Python, Git, cryptography, nvim, micro and git-filter-repo. Their tools came together and turned a concept into a working application.<p>The post, the GitHub repository, and all source code and documentation are part of the prior art with appropriete license (Public + timestamped + enabling)<p>repo: * <a href="https:&#x2F;&#x2F;github.com&#x2F;sys-ronin&#x2F;terminal-notes" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sys-ronin&#x2F;terminal-notes</a> *<p>requirement: linux&#x2F;mac&#x2F;win&#x2F;docker, python 3.13, git, nvim&#x2F;micro or any terminal based editor (can be configured from config.json inside root folder),internet for using github sync example - python3 terminal_notes_ui.py (from linux) * tested on debian 13 only<p>git clone <a href="https:&#x2F;&#x2F;github.com&#x2F;sys-ronin&#x2F;terminal-notes.git" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sys-ronin&#x2F;terminal-notes.git</a> &amp;&amp; cd terminal-notes &amp;&amp; python3 terminal_notes_ui.py<p>sys-ronin