0.1.2 โ€ข Published 9 months ago

reterm v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Project license

Pull Requests welcome code with love by l2700l


About

Full featured terminal simulator.

There are many implementations of such terminals on the Internet, but, in my opinion, they are not functional enough. They represent the output of texts or elements on a predetermined command. This simulator also supports the launch of third-party applications, the configuration of which is set from the outside.

The goal of the project is to create a universal simulator with support for a virtual file system and running third-party applications

  • Customizable commands, user, name and prompt.
  • Virtual file system.
  • Support third-party applications.
  • Command history using arrow up and down.
  • Support for copy/paste.
  • Customizing theme.
MainHelp command

Built With

Getting Started

Prerequisites

Your project must be a React app, version 17 or higher

Installation

To install the library, write npm install reterm (or another package manager) in your project.

This will also install the react-detect-device library.

Usage

You can use both the simulator itself and the terminal, which is a GUI wrapper over the simulator.

import {Terminal} from 'reterm';


function App(props) {
  return (
    <Terminal
      startMessage={'Hi!'}
      prompt={'>>>'}
    />
  );
}
import {Simulator} from 'reterm';


function App(props) {
  const fs = {
    'file': 'someText',
    Directory: {
      'file1': '=)',
      'file2': 'UwU'
    }
  }
  return (
    <Simulator
      user={'reterm'}
      name={'prod'}
      fs={fs}
      borderRadius={{topLeft: '1rem', topRight: '16px', bottomLeft: '10%', bottomRight: '1vw'}}
    />
  );
}

Props

namedescriptiondefault
userUsername displayed on the command line. Value can be either a string or undefineduser
nameComputer name displayed on the command line. Value can be either a string or undefinedcomputer
borderRadiusAn object that defines the rounding of the border0,0,0,0
startMessageA welcome message to show at the start, before the prompt begins. Value can be either a string or undefinedundefined
promptTerminal prompt$
themeCustom themecolors in css
fsVirtual file system - an object whose keys are only either strings or other similar objects{}
applicationsAn object whose keys are commands and whose values - are objects implementing the TermApp interface{}
builtInCommandsObject responsible for the ability to use built-in commandsall true

Roadmap

See the open issues for a list of proposed features (and known issues).

Support

Reach out to the maintainer at one of the following places:

Project assistance

If you want to say thank you or/and support active development of ReTerm:

  • Add a GitHub Star to the project.
  • Tweet about the ReTerm.
  • Write interesting articles about the project on Dev.to, Medium or your personal blog.

Together, we can make ReTerm better!

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please read our contribution guidelines, and thank you for being involved!

Authors & contributors

The original setup of this repository is by Alexander Hoffman.

For a full list of all authors and contributors, see the contributors page.

Security

ReTerm follows good practices of security, but 100% security cannot be assured. ReTerm is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

This project is licensed under the MIT license.

See LICENSE for more information.

0.1.2

9 months ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago