Skip to content

πŸ‘¨β€πŸ’» A simple, powerful and highly customisable Unix terminal emulator for React.

License

Notifications You must be signed in to change notification settings

dbuchet/react-console-emulator

This branch is 4 commits behind linuswillner/react-console-emulator:master.

Folders and files

NameName
Last commit message
Last commit date
Feb 12, 2021
Feb 12, 2021
May 28, 2020
Aug 20, 2020
Aug 20, 2020
Aug 20, 2020
Aug 20, 2020
Feb 12, 2021
Nov 26, 2019
May 28, 2020
Nov 26, 2019
May 28, 2020
Feb 12, 2021
May 28, 2020
Feb 12, 2021
Nov 13, 2019
Aug 20, 2020
Jul 18, 2019
May 7, 2021
Apr 13, 2021
May 28, 2020

Repository files navigation

react-console-emulator

Version License NPM downloads NPM bundle size CircleCI Codecov

A simple, powerful and highly customisable Unix terminal emulator for React.

Live demo
Configuration guide
Command API

Features

  • Highly customisable: Add custom responses, restyle and tweak the terminal to your liking and much more.
  • A Unix terminal in the browser: Accurately emulate a native Unix terminal in the browser with no setup required.
  • Familiar shortcuts: The terminal can keep track of commands and allows the user to recall them at their behest.
  • Easy and powerful command system: Execute code from your own application and send the results to the terminal output.
  • Async output support: Push output to the terminal at any time, even after a command response has been emitted.
  • Unlimited concurrency: Register as many terminals as you like with no risk of input confusion.

Usage

See more usage examples in demo/extra/config.js and demo/App.jsx

import React, { Component } from 'react'
import Terminal from 'react-console-emulator'

const commands = {
  echo: {
    description: 'Echo a passed string.',
    usage: 'echo <string>',
    fn: (...args) => args.join(' ')
  }
}

export default class MyTerminal extends Component {
  render () {
    return (
      <Terminal
        commands={commands}
        welcomeMessage={'Welcome to the React terminal!'}
        promptLabel={'me@React:~$'}
      />
    )
  }
}

Contributing

For information on contributing, see .github/CONTRIBUTING.md.

License

MIT Β© Linus Willner and Curtis Fowler.
"React" and any associated logos are trademarks of Facebook, Inc.

About

πŸ‘¨β€πŸ’» A simple, powerful and highly customisable Unix terminal emulator for React.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.7%
  • Shell 1.3%