{"id":13644029,"url":"https://github.com/unit-mesh/unit-runtime","last_synced_at":"2025-07-22T20:34:14.776Z","repository":{"id":143760483,"uuid":"616249173","full_name":"unit-mesh/unit-runtime","owner":"unit-mesh","description":"Unit Runtime 是一个 ChatGPT 等 AI 代码的运行环境，可一键启动并实时交互，帮助您快速构建和测试 AI 代码。Unit Runtime is an efficient and user-friendly AI code execution environment that allows for one-click startup and real-time interaction, helping you quickly build and test AI code.","archived":false,"fork":false,"pushed_at":"2023-09-06T12:26:26.000Z","size":863,"stargazers_count":116,"open_issues_count":2,"forks_count":15,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-13T20:06:06.729Z","etag":null,"topics":["copilot","repl"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unit-mesh.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}},"created_at":"2023-03-20T02:09:02.000Z","updated_at":"2025-02-13T09:05:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"3727a255-a01a-4db0-b525-5a1395f27217","html_url":"https://github.com/unit-mesh/unit-runtime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unit-mesh/unit-runtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Funit-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Funit-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Funit-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Funit-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unit-mesh","download_url":"https://codeload.github.com/unit-mesh/unit-runtime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Funit-runtime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567640,"owners_count":23949391,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["copilot","repl"],"created_at":"2024-08-02T01:01:56.666Z","updated_at":"2025-07-22T20:34:14.744Z","avatar_url":"https://github.com/unit-mesh.png","language":"Kotlin","readme":"# Unit Runtime\n\n[![CI](https://github.com/prompt-engineering/unit-runtime/actions/workflows/ci.yaml/badge.svg)](https://github.com/prompt-engineering/unit-runtime/actions/workflows/ci.yaml)\n\n\u003e Unit Runtime is an efficient and user-friendly AI code execution environment that allows for one-click startup and real-time interaction, helping you quickly build and test AI code.\n\nWorkflow:\n\n```mermaid\nsequenceDiagram\n    participant Human\n    participant LLM/ChatGPT\n    participant Unit Runtime\n    participant Language REPL\n\n    Human-\u003e\u003e+LLM/ChatGPT: Provide prompt for generated code\n    LLM/ChatGPT-\u003e\u003e+Unit Runtime: Provide code snippets/units\n    Unit Runtime-\u003e\u003e+Language REPL: Compile and return\n    Language REPL--\u003e\u003e-Unit Runtime: Output result\n    Unit Runtime--\u003e\u003e-LLM/ChatGPT: Display processing result\n    LLM/ChatGPT--\u003e\u003e-Human: Verify/modify code\n```\n\nFor examples:\n\n1. generate a \"Hello, world\" and send to Kotlin Repl\n\n```kotlin\n@RestController\nobject Pages {\n   @GetMapping(\"/\")\n   fun main() = \"Hello World!\"\n}\n```\n\n2. will start a server like: [http://localhost:10043](http://localhost:10043) , you can test and verify it.\n\n## Websocket API\n\nserver: `ws://localhost:8080/repl`\n\ninput:\n\n```kotlin\n@Serializable\ndata class InterpreterRequest(\n    var id: Int = -1,\n    val code: String,\n    val language: String = \"kotlin\",\n    val framework: String = \"spring\",\n    val history: Boolean = false\n)\n```\n\noutput:\n\n```kotlin\n@Serializable\ndata class Message(\n    var id: Int = -1,\n    var resultValue: String,\n    var className: String = \"\",\n    var msgType: MessageType = MessageType.NONE,\n    var content: MessageContent? = null,\n)\n```\n\n## Todos\n\n- Backend\n    - [x] Kotlin\n        - [x] basic REPL\n        - [ ] Spring Boot framework based on [https://github.com/JetBrains/kotless](https://github.com/JetBrains/kotless)\n        - [x] Ktor framework based on [https://github.com/JetBrains/kotless](https://github.com/JetBrains/kotless)\n    - [x] TypeScript\n        - [x] basic REPL\n        - [x] Deno with Hono\n    - [ ] Java\n    - [ ] Python\n- [x] Frontend\n    - [x] React with TypeScript and Babel\n    - [ ] Vue\n    - [ ]Angular\n\n## Development\n\n1. git clone `https://github.com/prompt-engineering/unit-runtime`\n2. `./gradlew bootRun`\n\nAPI:\n\n\n## LICENSE\n\nThis code is distributed under the MIT license. See [LICENSE](./LICENSE) in this directory.\n","funding_links":[],"categories":["CLIs"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funit-mesh%2Funit-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funit-mesh%2Funit-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funit-mesh%2Funit-runtime/lists"}