Show HN:Ito – 用 Lua 构建终端界面
Show HN: Ito – Build Terminal UIs in Lua

原始链接: https://uji.sh/ito/

ITO / 交互式工作坊 构建你自己的终端 UI。 你之前的草稿仍然可用。下载你之前的草稿 从这里开始 01 输入流程 02 计数器 03 每日清单 04 偏好设置 05 小店 代码 预览 有些地方需要检查。 转到行 正在准备你的工作区… 可以尝试的几件事 + 相同的 Lua 从 require("ito") 开始,并返回一个构建视图的函数。对会变化的值使用 ito.state(value)。 用 VStack、HStack、Text 以及 ito.md 中的控件进行组合。 视图与修饰符 使用 :spacing(1)、:padding(2)、:grow()、:bold() 和 :dim() 来排列并设置视图样式。 试试你的更改 你编辑时预览会更新。如果某次编辑出错,上次可用的预览会保持可见。 试试输入流程,了解键盘导航、编辑和取消。使用展开图标进入全屏。打开 ito.md,获取可交给你的 LLM 的指南。 启用 JavaScript 以运行 Lua 并使用编辑器。

相关文章

原文

ITO / AN INTERACTIVE WORKSHOP

Build your own terminal UI.

Start here

A few things to try

The same Lua

Start with require("ito") and return a function that builds a view. Use ito.state(value) for values that change.

Compose with VStack, HStack, Text, and the controls in ito.md.

Views and modifiers

Use :spacing(1), :padding(2), :grow(), :bold(), and :dim() to arrange and style your views.

Try your changes

Your preview updates as you edit. If an edit has an error, the last working preview stays visible.

Try Input flow for keyboard navigation, editing, and cancellation. Use the expand icon for fullscreen. Open ito.md for a guide you can give your LLM.

联系我们 contact @ memedata.com