{"id":28089431,"url":"https://github.com/jow-/ucode","last_synced_at":"2025-06-10T18:05:30.495Z","repository":{"id":37024899,"uuid":"289364480","full_name":"jow-/ucode","owner":"jow-","description":"JavaScript-like language with optional templating","archived":false,"fork":false,"pushed_at":"2025-05-08T11:34:47.000Z","size":5632,"stargazers_count":102,"open_issues_count":20,"forks_count":38,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-08T12:36:08.732Z","etag":null,"topics":["c","javascript","openwrt"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jow-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-21T21:04:14.000Z","updated_at":"2025-05-08T11:34:27.000Z","dependencies_parsed_at":"2023-02-16T21:45:56.542Z","dependency_job_id":"7cb8da59-85c1-4cc6-b99e-aebc7b389435","html_url":"https://github.com/jow-/ucode","commit_stats":{"total_commits":616,"total_committers":8,"mean_commits":77.0,"dds":"0.043831168831168776","last_synced_commit":"5163867269fc04fa01ec5e9f8df3384c933339f2"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jow-%2Fucode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jow-%2Fucode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jow-%2Fucode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jow-%2Fucode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jow-","download_url":"https://codeload.github.com/jow-/ucode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948364,"owners_count":21988953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","javascript","openwrt"],"created_at":"2025-05-13T12:57:55.909Z","updated_at":"2025-05-13T12:57:56.419Z","avatar_url":"https://github.com/jow-.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The ucode Scripting Language\n\nThe ucode language is a small, general-purpose scripting language that resembles\nECMAScript syntax. It can be used as a standalone interpreter or embedded into\nhost applications. Ucode supports template mode with control flow and expression\nlogic statements embedded in Jinja-like markup blocks.\n\nThe development of ucode was motivated by the need to rewrite the OpenWrt\nfirewall framework using nftables. Initially intended as a template processor,\nucode evolved into a versatile scripting language for various system scripting\ntasks. Its design goals include easy integration with C applications, efficient\nhandling of JSON data and complex data structures, support for OpenWrt's ubus\nmessage bus system, and a comprehensive set of built-in functions inspired by\nPerl 5.\n\nUcode provides the ability to embed code logic into plain text templates,\nsupports JSON parsing and serialization, has distinct array and object types,\nincludes built-in support for bit operations and regular expressions, and offers\nbindings for relevant Linux and OpenWrt APIs. It follows ECMAScript syntax for\nfamiliarity and reusability of existing tooling, emphasizes synchronous\nprogramming flow, aims for a small executable size, and can be embedded into C\nhost applications.\n\nIn summary, ucode is a synchronous scripting language resembling ECMAScript,\ndesigned for template processing, system scripting tasks, and integration into C\napplications, with features such as JSON support, comprehensive built-in\nfunctions, and bindings for relevant APIs.\n\n## Installation\n\nThe *ucode* package should be already preinstalled on modern OpenWrt releases.\n\nTo learn how to install it on other systems, refer to the\n[Installation Section](https://ucode.mein.io/#installation) in the\ndocumentation.\n\n## Documentation\n\nThe most up-to-date documentation is hosted at the\n[ucode documentation portal](https://ucode.mein.io/).\n\nYou can build the documentation yourself by running `npm install` followed by\n`npm run doc` in the cloned repository. The generated documentation will be\nplaced in the `docs/` directory.\n\n## Examples\n\nExamples for embedding ucode into C applications can be found in the\n[`examples/` directory](https://github.com/jow-/ucode/tree/master/examples).\n\nNotable OpenWrt programs *embedding* ucode are the\n[OpenWrt ubus rpc daemon](https://github.com/openwrt/rpcd) and the\n[Tiny uhttpd web server](https://github.com/openwrt/uhttpd).\n\nSome ucode scripting examples can be found in the ucode\n[testcase sources](https://github.com/jow-/ucode/tree/master/tests/custom).\n\nProjects using ucode scripting include the\n[OpenWrt LuCI web interface](https://github.com/openwrt/luci) and the\n[OpenWrt firewall4 framework](https://github.com/openwrt/firewall4).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjow-%2Fucode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjow-%2Fucode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjow-%2Fucode/lists"}