{"repo":"dongsuo/vue-terminal","free":true,"listed":false,"github":"https://github.com/dongsuo/vue-terminal","clone":"git clone https://github.com/dongsuo/vue-terminal.git","description":"A terminal emulator in Vue. https://vue-terminal.now.sh/","language":"JavaScript","stars":267,"topics":["vue-terminal","vue","terminal"],"license":"MIT","category":"cli-tools","readme_excerpt":"VUE-TERMINAL Vue-terminal is a dependency-free, lightweight terminal emulator in Vue.js. Vue-terminal provide flexible api for developer to define task or command that can be executed by users. Try the demo How to use? Example About commandList and taskList The content of taskList or commandList is defined as json object, the key of the json is command name or task name, here is the structure of command or task: commandOrTaskName is the command name you defined. description is something to describe your task, which will be used by the help command. messagesOrTask is the main part defined to response the command, in commandList , the key is messages , and in taskList the key should be same with task name, here is the detail: - messages (array) messages is an array of Message , you can only show message string in terminal instance as a response to a command. - task (function) you can do more with task, task is a function which use taskName as function name, the first argument is pushToList , which is a function allow you to send message to the terminal instance, you can call pushToList(Message) to render message in the terminal, the second argument is the string user input, your can parse it and do something interesting. You must return a resolved Promise to tell terminal instance that the task has ended, so that the terminal instance can get ready for more command. - Message Message is an object, used to define message showed in terminal: here is an example: You can check /doc","default_branch":null,"files":null,"tree":[],"storefront":"/r/dongsuo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dongsuo/vue-terminal/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}