{"id":18559089,"url":"https://github.com/linux-china/xterm-demo","last_synced_at":"2025-09-12T06:38:07.622Z","repository":{"id":41732942,"uuid":"233943838","full_name":"linux-china/xterm-demo","owner":"linux-china","description":"Xterm.js with RSocket","archived":false,"fork":false,"pushed_at":"2023-01-01T15:23:22.000Z","size":806,"stargazers_count":8,"open_issues_count":26,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T02:51:15.796Z","etag":null,"topics":["rsocket","spring-boot","spring-shell","xtermjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linux-china.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-14T21:56:44.000Z","updated_at":"2025-03-27T17:23:25.000Z","dependencies_parsed_at":"2023-01-31T23:31:02.840Z","dependency_job_id":null,"html_url":"https://github.com/linux-china/xterm-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fxterm-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fxterm-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fxterm-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-china%2Fxterm-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linux-china","download_url":"https://codeload.github.com/linux-china/xterm-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144158,"owners_count":21054876,"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":["rsocket","spring-boot","spring-shell","xtermjs"],"created_at":"2024-11-06T21:42:00.458Z","updated_at":"2025-04-10T02:30:38.771Z","avatar_url":"https://github.com/linux-china.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Xterm.js demo with Spring Boot RSocket\n======================================\n[![Build Status](https://api.travis-ci.com/linux-china/xterm-demo.svg?branch=master)](https://travis-ci.com/linux-china/xterm-demo)\n\nA web terminal with following tech stack:\n\n* Xterm.js to render terminal in browser\n* Input commands to be executed on the backend(Spring Boot + RSocket)\n* Spring Shell command model to write your commands\n* RSocket protocol: communication between browser and backend\n* xterm-addon-rsocket\n* Web Components for Xterm\n\nIf you want to use Xterm.js in your Spring Boot app, please use https://github.com/linux-china/xtermjs-spring-boot-starter\n\n# How to run?\n\n```\n$ mvn compile spring-boot:run\n```\n\nThen visit [http://localhost:8080/index.html](http://localhost:8080/index.html) and screenshot alike following:\n\n![Xterm Screenshot](.README_images/xterm_screenshot.png)\n\n# How to write my command?\n\nYou just need to write standard ShellComponent of Spring Shell, and example as following:\n\n```java\n@ShellComponent\npublic class MyCommands {\n\n    @ShellMethod(\"Add two integers together.\")\n    public int add(int a, int b) {\n        return a + b;\n    }\n\n    @ShellMethod(\"Minus two integers together.\")\n    public int minus(int a, int b) {\n        return a - b;\n    }\n}\n```\n\n**Attention:** You can choose Picocli to build commands also https://github.com/remkop/picocli/tree/master/picocli-spring-boot-starter\n\n# Use Cases\n\n* mysql/redis-cli CLI in browser\n* App Info Viewer: configuration, refresh etc\n* Metrics Query\n* JVM info: thread, heap etc\n* Call functions on FaaS platform`\n\n# References\n\n* Xterm.js: https://xtermjs.org/\n* Xterm.js addons: https://www.npmjs.com/search?q=xterm%20addon\n* Spring Boot RSocket: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-rsocket\n* Spring Shell docs: https://docs.spring.io/spring-shell/docs/2.0.0.RELEASE/reference/htmlsingle/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-china%2Fxterm-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinux-china%2Fxterm-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-china%2Fxterm-demo/lists"}