Aglet

你的 AI agent 写,Aglet 原生渲染,归你 —— 也能分享。

macOSWindowsiOS(即将)Android(即将)

怎么用

1. 描述它

把你想要的小工具告诉你的 AI coding agent —— Claude Code 或 Codex。

2. agent 写出来

它生成声明式 UI 加可选的沙盒 JavaScript。不写 Swift、不写 Kotlin、不碰原生代码。

3. Aglet 原生渲染

macOS 上是 SwiftUI,其它平台走网页 —— 看着、用着像真应用,不是网页。

4. 自用,或分享

在本机私下运行,或经人类审核的 PR 发布到公开 catalog。

用 Aglet 构建的

catalog 里已有的一些工具 —— 每个都是这样构建、公开分享的。

HN 阅读器Hacker News,AI 翻译
GitHub PR我的 review 队列 + 待处理 PR
GitHub Actions查看并运行 CI
AI 用量Claude + Codex,菜单栏
更多……在公开中持续增加

为什么选 Aglet

不写原生代码

把 UI 写成数据,再加可选的沙盒 JS。Aglet 原生渲染 —— macOS 上是 SwiftUI —— 不写一行 Swift,也有 Apple 应用般的质感。

Agent 优先

小工具小巧、声明式 —— 正适合 AI agent 端到端编写。绝大多数小工具由 AI 编写、人类审核。

自用,或分享

小工具可以私下运行,也可以发布。公开小工具经 GitHub PR 进入 catalog —— 作者、源码、审核者全程可见。

本地优先 + 沙盒

一切在你设备上运行,数据存本地 SQLite。逻辑跑在沙盒解释器里;任何联网或系统访问,都在安装前声明、可见。

构建你的第一个工具

把下面这段复制到 Claude 或 Codex。它会装好 Aglet、自学框架,并给你产出一个能跑的 hello-world 工具:

Install Aglet and build me a hello-world tool.

1. Install the CLI:  brew install aglet-dev/tap/aglet
2. Load the authoring guide — run `aglet agents-md` and read it in full.
3. Check the setup:  aglet doctor
4. Scaffold a new tool:  aglet new hello
5. Rewrite hello/ui.tsx as a minimal "Hello, world" screen: a Page with a
   heading and a button that shows a toast.
6. Validate it:  aglet validate hello
7. Install the app (it hosts the live dev window):
     curl -fsSL https://cdn.aglet.dev/macos/Aglet.dmg -o /tmp/Aglet.dmg
     hdiutil attach /tmp/Aglet.dmg -nobrowse -quiet
     ditto "/Volumes/Aglet/Aglet.app" /Applications/Aglet.app
     hdiutil detach "/Volumes/Aglet" -quiet
     open -a Aglet
8. Run it live:  aglet dev hello

Keep it minimal and idiomatic. If a step fails, run `aglet doctor` and fix
what it reports.

想自己手动来?

装好 CLI(应用见上方),然后:

# 脚手架生成一个小工具(aglet.json + ui.tsx + locales)
aglet new hello

# 改 ui.tsx,然后离线校验
aglet validate hello

# 在应用里实时运行,热重载
aglet dev hello

完整编写参考:运行 aglet agents-md

获取

用应用运行小工具,或用 CLI 构建你自己的:

# 应用 —— 下载已签名公证的 .dmg,拖入「应用程序」:
# https://cdn.aglet.dev/macos/Aglet.dmg

# CLI —— 编写、安装、测试你自己的小工具:
brew install aglet-dev/tap/aglet

应用经 Sparkle 自动更新。iOS / Android 即将支持。