Published June 10, 2026
| Version v0.01
Software
Open
Microbiosis/mora-lang: v0.01
Authors/Creators
Description
Mora 是一门轻量级脚本语言,语法接近 Lua,目标是简化 AI 工作流的编写。
已实现的功能
语言基础
- 变量、函数(task)、闭包(fn)、列表、字典
- if/for/try/match 流程控制
- 管道运算符
- 模块系统(import/export)
- 并行执行(parallel)
- JSON 持久化(save/load)
网络与 AI(基于 ureq)
- web.fetch — HTTP GET 请求,返回响应文本
- json.parse / json.stringify — JSON 解析与序列化
- ai.chat — 调用 OpenAI 兼容 API,需设置 OPENAI_API_KEY 环境变量
- ai.create — 创建多轮对话对象,支持上下文记忆
示例
- examples/ai_workflow.mora — 综合示例(JSON、HTTP、AI、闭包、管道)
- examples/closures.mora — 闭包与函数式编程
- examples/modules.mora — 模块导入导出
尚未实现
- 文件读写(file.read / file.write 目前为 mock)
- 向量嵌入(ai.embed 目前为 mock)
- 静态类型检查
- LSP 语言服务
依赖
唯一外部依赖:ureq(同步 HTTP 客户端)。
Files
Microbiosis/mora-lang-v0.01.zip
Additional details
Related works
- Is supplement to
- Software: https://github.com/Microbiosis/mora-lang/tree/v0.01 (URL)
Software
- Repository URL
- https://github.com/Microbiosis/mora-lang