{"id":21368516,"url":"https://github.com/itxtech/mirai-js","last_synced_at":"2025-07-13T05:32:17.868Z","repository":{"id":54202231,"uuid":"263050781","full_name":"iTXTech/mirai-js","owner":"iTXTech","description":"强大的 Mirai JavaScript 插件运行时","archived":false,"fork":false,"pushed_at":"2021-12-31T08:11:37.000Z","size":176,"stargazers_count":84,"open_issues_count":5,"forks_count":33,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-18T02:12:30.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iTXTech.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}},"created_at":"2020-05-11T13:29:09.000Z","updated_at":"2024-02-16T11:02:54.000Z","dependencies_parsed_at":"2022-08-13T09:10:16.755Z","dependency_job_id":null,"html_url":"https://github.com/iTXTech/mirai-js","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTXTech%2Fmirai-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTXTech%2Fmirai-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTXTech%2Fmirai-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTXTech%2Fmirai-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iTXTech","download_url":"https://codeload.github.com/iTXTech/mirai-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225858729,"owners_count":17535468,"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":[],"created_at":"2024-11-22T07:24:59.487Z","updated_at":"2024-11-22T07:25:00.126Z","avatar_url":"https://github.com/iTXTech.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mirai Js\n\n**运行于 `JVM` 的强大的 `Mirai JavaScript` 插件运行时**\n\n使用 JavaScript 编写 [Mirai](https://github.com/mamoe/mirai) 插件，支持与所有 Mirai 面向 Java 的API 和部分 Kotlin DSL，[暂不支持](#Android-兼容性) `Android` 环境。\n\n## 使用须知\n\n**所有基于`Mirai Js`的`JavaScript`插件必须遵循`AGPL-v3`协议开放源代码，详见 [协议文本](LICENSE) 。**\n\n**API可能随时变动，请保持更新！**\n\n## 特性\n\n* 完整的 Mirai 面向 Java 的支持。\n* 支持大部分 Kotlin Coroutine。\n* 不完整的 [ES6 支持](https://mozilla.github.io/rhino/compat/engines.html)。\n* 灵活地加载外部库。\n\n## Mirai Js 插件管理器 `jpm`(`JavaScript Plugin Manager`)\n\n1. 在 `mirai-console` 中键入 `/jpm` 获得帮助\n1. `/jpm` 可 列出、加载、重载和卸载 插件。\n\n`/jpm [list|load|reload|unload] \u003c插件ID/文件名\u003e`\n\n## 使用\n\n* 从 [Releases](https://github.com/iTXTech/mirai-js/releases) 中下载最新的版本，放入 mirai console 的插件文件夹，启动 mirai console。\n* 在 `data/org.itxtech.miraijs.MiraiJs/plugins` 下放入 `zip` 格式的 Mirai Js 插件。\n* 在 mirai console 输入 `/jpm load \u003c文件名\u003e` (不需要加 `.zip`) 来加载这个插件。\n\n## 开发\n\n查看开发文档：[docs/general.md](docs/general.md)\n\n查看 API 文档：\u003c未完成\u003e\n\n## Android 兼容性\n\n插件的 `ExternalLibraryLib` 中提供了加载外部 jar 功能，使用了 Android 不支持的 `URLClassLoader`。\n\n后续将会兼容 Android ： 使用 [D8](https://developer.android.google.cn/studio/command-line/d8) 将 Java 字节码编译为 Dex 字节码后使用 `DexClassLoader` 加载。\n\n## [mirai-console-loader](https://github.com/iTXTech/mirai-console-loader) 兼容性\n\n使用 mirai-console-loader 启动 mirai 时，脚本环境无法找到 `net.mamoe.mirai` 包，请使用原始方式启动：\n```\njava -cp \"./libs/*\" net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader\n```\n\n详见：[#10](https://github.com/iTXTech/mirai-js/issues/10)\n\n## 开源协议\n\n    Copyright (C) 2020-2021 iTX Technologies\n    \n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Affero General Public License as\n    published by the Free Software Foundation, either version 3 of the\n    License, or (at your option) any later version.\n    \n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU Affero General Public License for more details.\n    \n    You should have received a copy of the GNU Affero General Public License\n    along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitxtech%2Fmirai-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitxtech%2Fmirai-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitxtech%2Fmirai-js/lists"}