A web component to simulate the a Linux Terminal.
To list the commands available you can run help
Then you can see commands like:
help
echo
catsay
history
whoami
pwd
npm i terminal-web
import "terminal-web"
<script type="module" src="https://unpkg.com/terminal-web/dist/terminal-web.cjs.production.min.js"></script>
Then you can do this:
<terminal-web></terminal-web>
To custom it, you can wrap it with a container, add user and host name.
<div style="width: 450px; height: 150px;">
<terminal-web username="tom" hostname="ate">
<div slot="text-line">Good morning!</span></div>
<div slot="text-line">Welcome to <span style="background-color: teal">Terminal-Web</span></div>
</terminal-web>
</div>
Note: Notice the slot "text-line"
You can play with it in this playground