A small, general-purpose scripting language for Linux systems. Ucode resembles ECMAScript syntax, runs as a standalone interpreter or embedded into host applications, supports template mode with Jinja-like markup blocks, and ships with an embeddable C core.
- Project page — overview, quick tour, standard library, projects in production.
- ucode manual — a comprehensive reference for the language, the standard library and the C embedding API.
- ucode function reference — the per-function reference for the standard library, generated from the JSDoc comments in the sources.
- Try ucode online — a web playground.
The ucode package is preinstalled on modern OpenWrt releases. For building and installing ucode on other systems, see the Installing ucode chapter of the manual.
Embedding ucode in C applications is demonstrated by the programs in the
examples/ directory. ucode scripting examples can be found
in the testcase sources.
Notable OpenWrt programs embedding ucode are the ubus rpc daemon and the uhttpd web server. Projects using ucode scripting include the LuCI web interface and the firewall4 framework.
The function reference in docs/ is generated from the JSDoc comments in
the C sources: run npm install followed by npm run doc in the cloned
repository.