Show HN: 屏幕记忆,无需截图,直接转为 Markdown
Show HN: Screen memory without screenshots, just text to Markdown

原始链接: https://github.com/dragthelake/ambient-context

**Ambient Context** 是一款 macOS 菜单栏应用,它通过辅助功能 API 读取您当前焦点窗口中的文本,从而追踪您的工作状态。该应用将数据保存至本地的每日 Markdown 文件中,为 Claude Code 等大语言模型建立一个可查询的私有“记忆库”。 该应用专为极致隐私而设计,完全离线运行,无需账户、服务器或任何遥测功能。它能自动屏蔽密码、API 密钥和信用卡号等敏感信息,并会自动忽略隐私浏览窗口和密码管理器。由于文件以纯文本形式存储在您指定的文件夹中,您拥有对数据的完全所有权和控制权。 为了优化 AI 的读取效果,该应用会对文本进行去重处理,并记录文档路径或 URL 等元数据。目前该应用处于早期阶段,需要通过 Node、Rust 和 Xcode 手动构建。它为您提供了一种安全且以本地优先的方式,来自动生成项目摘要、站会报告和详尽的工作日志。 *注:要求 Apple Silicon 芯片且系统版本为 macOS 14 或更高。*

“Show HN”项目是一款 macOS 菜单栏应用程序,它通过 Accessibility API 读取当前聚焦窗口的文本来捕获活动日志,而非依赖屏幕截图或 OCR 技术。该程序会自动将这些数据保存为按日期组织的纯 Markdown 文件。 开发者设计此工具的初衷是将其作为 AI 智能体的“记忆库”;用户只需将 Claude Code 等工具指向该文件夹,即可查询过往工作记录或汇总项目进度。项目中还包含一份 `AGENTS.md` 文件,用于帮助大语言模型(LLM)理解日志格式。 在评论区,用户讨论了这种方案的利弊。一些人质疑为何开发者要规避基于截图的 OCR 技术,而另一些人则指出,依赖 Accessibility API 存在挑战,因为许多应用程序并未正确公开其内容,往往需要自定义配置文件才能获得理想效果。
相关文章

原文

A macOS menu bar app that keeps a written record of what you work on, for your own LLM to read.

While the eye in your menu bar is open, Ambient Context reads the text of whichever window you have focused (via the macOS accessibility tree, every few seconds) and appends it to a plain markdown file: one file per day, in a folder you choose. Point Claude Code or any other agent at that folder and it can answer "what did I work on Tuesday?", build memory about your projects, or write your standup for you.

  • No screenshots, no video. It reads text through the accessibility API, nothing else.
  • Nothing leaves your machine. No account, no server, no telemetry, no bundled model. This build makes no network calls at all; the signed release will add a single update check against GitHub.
  • Files you own. Plain markdown in a folder you chose. Move them, grep them, delete them.
  • Redaction before writing. Password managers and private browsing windows are never captured. Password fields are skipped at the source, and credentials, API keys and card-shaped numbers are scrubbed before anything touches disk.
  • Built to be read by an LLM. Lines are deduplicated across the day, interface junk is filtered out, and each block records the document path or URL it was looking at so your agent can open the real thing instead of trusting fragments. The folder carries an AGENTS.md explaining the format to whatever reads it.

Requires macOS 14+ on Apple Silicon.

Early and unsigned. There is no notarised download yet (Apple Developer enrolment is in progress), so for now you build it yourself, which takes about two minutes:

You need Node, Rust and Xcode Command Line Tools.

git clone https://github.com/dragthelake/ambient-context
cd ambient-context
npm install
npm run tauri build

The app lands in src-tauri/target/release/bundle/macos/. Drag Ambient Context.app to Applications and open it.

For development, npm run tauri dev runs it with hot reload.

  1. The settings window opens by itself. Grant Accessibility when asked: this is the permission that lets the app read window text, and nothing works without it.
  2. Choose where to save. The default is ~/Ambient Context, deliberately outside ~/Documents so iCloud does not sync your record off the machine.
  3. That's it. Recording starts once setup is complete and starts with the app from then on. Click the eye in the menu bar to stop; stopping is remembered until you start again.

Open eye: recording. Closed eye: not. Right-click the icon for today's file, the folder and settings.

What a day file looks like

---
date: 2026-08-25
captured_by: Ambient Context 0.1.0
---

## 09:41–10:05 · Chrome · Tauri tray documentation

url: https://v2.tauri.app/learn/system-tray/

<text seen in that window, first time it appeared today>

Block headings are the day's timeline. Body lines are written once per day no matter how often they are seen, so the file stays small enough to hand to an LLM whole. AGENTS.md in the capture folder documents the format and how to read it well.

  • Chromium and Electron apps (Chrome, Slack, VS Code, Obsidian, Figma...) only build their accessibility tree when asked, so the first seconds of capture in those apps are thin and fill in on later passes. Chrome may show a slightly glitchy window-resize animation while enabled; that is a known cost of the mechanism.
  • GPU-rendered terminals (Kitty, Alacritty) expose little or no text. Terminal.app and iTerm2 work.
  • Capture your findings: which apps come back rich, partial or empty is exactly the feedback that helps (docs/census.md has the template).
cd src-tauri && cargo test

Privacy model, in one paragraph

The app reads only the focused window: never background windows, other displays or minimised windows, and never while the screen is locked. It excludes password managers and private browsing entirely, skips secure input fields at the accessibility level, and pattern-scrubs secrets before writing. Everything it produces is plaintext on your own disk, and the capture folder is excluded from capture so it cannot observe itself. If you find a hole in any of this, please open an issue.

联系我们 contact @ memedata.com