GithubHelp home page GithubHelp logo

sorokinvld / react-console-emulator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linuswillner/react-console-emulator

0.0 1.0 0.0 9.5 MB

๐Ÿ‘จโ€๐Ÿ’ป A simple, powerful and highly customisable Unix terminal emulator for React.

Home Page: https://npmjs.com/package/react-console-emulator

License: MIT License

Shell 1.34% JavaScript 98.66%

react-console-emulator's Introduction

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.

react-console-emulator's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar linuswillner avatar greenkeeper[bot] avatar hampuskraft avatar herve07h22 avatar rafegoldberg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.