@pretend-terminal/core
v0.2.2
Published
Framework-independent pseudo-terminal engine and vanilla JavaScript API.
Maintainers
Readme
@pretend-terminal/core
A safe, configurable pseudo-terminal engine and Vanilla JavaScript API.
Install
npm install @pretend-terminal/coreRequires Node.js >=22.13.0 for installation and build tooling.
Usage
import { createTerminal } from '@pretend-terminal/core';
import '@pretend-terminal/core/styles.css';
const mount = document.querySelector('#terminal');
if (!mount) {
throw new Error('Expected a terminal mount element.');
}
createTerminal(mount, {
prompt: 'teemo@portfolio:~ $',
theme: 'amber',
commands: [
{
name: 'about',
response: { type: 'text', value: 'Captain Teemo on duty.' },
},
],
});See the repository README for the full API, JSON configuration, theming, persistence, accessibility, and safety guidance.
License
MIT © 2026 Tanvir Aslam
