Ito:用 Lua 构建终端 UI 的交互式工作坊
Show HN: Ito – Build Terminal UIs in Lua
Ito 发布了一个用 Lua 编写终端 UI 的交互式工作坊,用户从 require("ito") 开始,返回一个构建视图的函数即可。
ITO / AN INTERACTIVE WORKSHOP
Make something with Lua.
Build your own terminal UI.
Start here
main.lua
Preview
Getting your workspace ready…
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.
来源:Hacker News · uji.sh