{"id":27213535,"url":"https://github.com/febit/wit","last_synced_at":"2026-04-19T11:03:49.794Z","repository":{"id":57724505,"uuid":"11992364","full_name":"febit/wit","owner":"febit","description":"A script/template engine implemented in pure Java","archived":false,"fork":false,"pushed_at":"2026-04-19T03:57:29.000Z","size":6389,"stargazers_count":50,"open_issues_count":6,"forks_count":20,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-04-19T05:32:14.220Z","etag":null,"topics":["java","script","template"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/febit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-08-09T03:36:35.000Z","updated_at":"2026-04-19T03:57:33.000Z","dependencies_parsed_at":"2026-03-25T06:01:55.122Z","dependency_job_id":null,"html_url":"https://github.com/febit/wit","commit_stats":null,"previous_names":["zqq90/webit-script"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/febit/wit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febit%2Fwit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febit%2Fwit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febit%2Fwit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febit%2Fwit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/febit","download_url":"https://codeload.github.com/febit/wit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febit%2Fwit/sbom","scorecard":{"id":395156,"data":{"date":"2025-08-11","repo":{"name":"github.com/febit/wit","commit":"aa723572e284cbac98adeb78f94e1642e0d61555"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: wit-core/src/main/cup/java_cup_wit-20171014.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}}]},"last_synced_at":"2025-08-18T18:48:33.743Z","repository_id":57724505,"created_at":"2025-08-18T18:48:33.743Z","updated_at":"2025-08-18T18:48:33.743Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32004046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["java","script","template"],"created_at":"2025-04-10T02:43:50.733Z","updated_at":"2026-04-19T11:03:49.773Z","avatar_url":"https://github.com/febit.png","language":"Java","readme":"Febit Wit\n====\n\n[![Apache-2.0 License](https://img.shields.io/badge/license-apache-blue.svg)][license]\n\nA script/template engine implemented in pure Java (Java 17+).\n\n## How to use\n\n+ Maven\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.febit.wit\u003c/groupId\u003e\n    \u003cartifactId\u003ewit-core\u003c/artifactId\u003e\n  \u003cversion\u003e3.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n+ Gradle\n\n```\nimplementation 'org.febit.wit:wit-core:3.0.0'\n```\n\n+ Config Wit engine, load script and eval:\n\n```java\nWit wit = Wit.builder()\n    // set DispatchLoader with multiple rules.\n    .loader(Loaders.dispatch()\n        // Load script from string content.\n        .rule(\"code:\", Loaders.string().build())\n        // Load script from FileSystem with a specific root.\n        .rule(\"file:\", Loaders.fileSystem()\n            .root(\"path/to/local/scripts\")\n            // Enable caching for file system loader.\n            .cacheEnabled(true)\n            .build())\n        // ... add more rules if needed\n        .build())\n    .build();\nScript script = wit.script(\"\"\"\n    code: echo \"Hello Wit！\";\n    \"\"\");\nContext context = script.eval(Vars.empty(), out);\n```\n\n+ What happens next:\n\n- `Wit.builder()` / `WitBuilder` assembles the engine with `Loader`, `ParserFactory`, and other extension points.\n- `wit.script(...)` resolves the path through `Loader` and creates a cached `ScriptImpl`.\n- `ScriptImpl` starts compilation through `ParserFactory` with a `ParseContext`.\n- `parser` parses the source and assembles it into `ir.ScriptIR`.\n- `script.eval(...)` creates a `RuntimeContext` for the current inputs and output target.\n- `ScriptIR.execute(context)` runs the compiled IR.\n\n## Hello Wit\n\n```js\n%\u003eHello Wit!\u003c%\nvar books;\n{\n    for(book : books) {\n%\u003e\n${for.iter.index + 1}.《${book.name}》 ￥${book.price}\n\u003c%\n    }\n}\n{\n    var func = function(a, b) {\n        return a + b + arguments[3];\n    };\n    echo func(\"a\", \"b\", \"c\");\n}\n{\n    var map = {\n        books,\n        1: 1,\n        \"key2\": \"value2\",\n        3: 2 + 1\n    };\n    map[5] = 2 + 3;\n    map.~put(\"6\", 2*3);\n    \n    for(key, value : map) {\n        echo key + \":\" +value + \"\\n\";\n    }\n}\n%\u003e\n```\n\n\u003e [More examples][tests]\n\n## License\n\n**Febit Wit 3** is released under the Apache-2.0 license. See the bundled [LICENSE file][license] for\ndetails.\n\n## Third-party Licenses\n\n+ **ASM** under the BSD License.[License file][asm_license]\n\n## Bug report\n\n\u003e [github-issue][new_issue_github]\n\n[tests]: https://github.com/febit/wit/tree/main/wit-core/src/test/resources/org/febit/wit/scripts/fixtures\n\n[new_issue_github]: https://github.com/febit/wit/issues/new\n\n[license]: https://github.com/febit/wit/blob/main/LICENSE.txt\n\n[asm_license]: https://asm.ow2.io/license.html\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffebit%2Fwit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffebit%2Fwit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffebit%2Fwit/lists"}