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

1作者: sys-ronin20 天前
我是一名40岁的失业系统管理员,没有计算机科学学位,也没有开发经验,但拥有25年的系统知识。我构建了一个完全加密的书写环境,可以在其中专注写作,而无需顾虑应用程序本身。在这里,AI充当我的代码翻译器,而我则严格扮演架构师和指导者的角色。这一切的开端源于我问自己:“为什么以及如何我能瞬间回忆起过去的记忆,而无需在脑海中搜索?”这成为了我应用程序的设计原则。因此,我通过在每次提交中嵌入UUID,解决了一个Git的核心问题——跟踪单个笔记在整个历史中的变化。 其响应式的数据即UI(data-as-UI)界面使得应用程序的学习曲线近乎为零。使用数字化的鱼眼跳转系统,无需前进按钮,即可轻松导航深层层级结构。所有操作都只需一到两次按键,例如 v(查看)、c(创建)、d(删除)、r(重命名)、j(跳转)、s(同步)、s(搜索)、b(返回),或者 v1、d1、j1、jb 等。它完全使用Python标准库(无其他依赖)、Git、加密标准原语(已嵌入)构建。我以编程方式使用了git-filter-repo,通过UUID从应用程序内部永久擦除项目。每个项目(笔记、文件、子笔记本)都有完整的时间线,可以查看从创建到擦除(带有墓碑标记)的整个生命周期。其子笔记本层级可以达到任意深度。它支持80种文件类型,提供语法高亮编辑和文件导出功能。每个笔记本或子笔记本内部都有活动查看器,显示该笔记本中最近的50项活动。搜索非常便捷,例如“s files* file.md date* 2026-04-02 in* notebook/subnotebook_name”,“s note_name date* 2026-04-01 2026-04-05”,“s edited* any_text thisweek” “s in* notebook/subnotebook_name” 或仅“s anytext”。 笔记本可以使用8-24个单词的BIP-39助记词进行加密,并使用密码进行常规锁定/解锁。它使用标准的AES-GCM加密,并且是可移植的。它可以在每个笔记本管理屏幕中显示密码更改日志。密钥库是硬件绑定的,但同时也是可移植的,USB驱动器可以充当TPM(可信平台模块)般的安全设备。这意味着当密钥不可访问时,笔记本也无法访问。应用程序架构和数据结构是解耦的。应用程序架构允许应用程序、笔记本和密钥库位于三个不同的位置,甚至在不同的系统上;而数据架构则允许元数据和内容在每个笔记本文件夹内保留在不同的文件中,并通过UUID链接。Git被用于实现项目级别(非文件级别)的版本控制和基于UUID提交元数据的时序搜索。提交元数据本身未加密,但如果需要,可以通过修改现有代码来实现加密。每个笔记本都自包含在一个可移动的单个文件夹中。该架构还支持通过GitHub等平台进行可选的端到端加密(e2ee)无冲突同步。用户无需成为Git专家即可使用该应用程序,即使是公开可见的云供应商也无法查看数据。 我将请求尊敬的HN(Hacker News)社区成员审阅文档和`story_n_constraint.md`文件,这些文件将详细解释“是什么、如何做、为什么这样做”。我还在仓库中放入了几个抽象的创意(`what_can_be_done`文件)。我要感谢Python、Git、Cryptography、nvim、micro和git-filter-repo的创造者。他们的工具汇集在一起,将一个概念变成了一个可工作的应用程序。 本文、GitHub仓库以及所有源代码和文档均属于现有技术,并附有适当的许可(公共+时间戳+启用)。 仓库: * <a href="https://github.com/sys-ronin/terminal-notes" rel="nofollow">https://github.com/sys-ronin/terminal-notes</a> * 要求: Linux/Mac/Win/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 && 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