simple-js-terminal
v0.1.0
Published
A lightweight, embeddable terminal interface written in plain JavaScript.
Maintainers
Readme
🖥️ Simple Terminal Made in JavaScript
A lightweight, embeddable terminal interface written in plain JavaScript. It simulates a command-line experience in the browser, complete with basic commands, command history, blinking cursor, and keyboard input.

The goal of this project isn't to create a fully working terminal with all features, rather a super simple terminal environment that can be added for fun anywhere, for whatever reason.
✨ Features
- Interactive terminal prompt
- Adding custom commands
- Command history (with arrow key navigation)
- Simulated blinking cursor
- Easily embeddable in any HTML page
Commands available as of now
🚀 Getting Started
📝 How to use
I. Importing script locally
git clone https://github.com/fbongcam/simple-js-terminal.gitCopy terminal.min.js from dist folder
import { Terminal } from "./terminal.min.js";const terminal = new Terminal(true);
document.body.appendChild(terminal);Note: document.body can of course be replaced with any element.
II. CDN
import { Terminal } from "https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"
document.addEventListener('DOMContentLoaded', () => {
const terminal = new Terminal(true);
document.body.appendChild(terminal);
});III. npm
npm install simple-js-terminalimport { Terminal } from 'simple-js-terminal';
const terminal = new Terminal();⚙️ Setup for dev
git clone https://github.com/fbongcam/simple-js-terminal.gitnpm installnpm run dev🔨 Build
npm run buildYou will end up with an archive of the newly built npm package and a dist folder containing terminal.min.js.
Changelog
- 0.1
- Basic virtual file system
- New commands
- cd
- cp
- ls
- mkdir
- mv
- pwd
- rm
- rmdir
- touch
- 0.0.4
- Tweaked build configuration
- 0.0.3
- Added page functionality for commands like nano and man
- Moved away from shadow DOM for wider browser support
- Lots of rewriting
License
Copyright 2025 fbongcam
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
