https://github.com/rheber/unixorn
:corn: Add a terminal to your webpage
https://github.com/rheber/unixorn
react shell terminal
Last synced: 5 months ago
JSON representation
:corn: Add a terminal to your webpage
- Host: GitHub
- URL: https://github.com/rheber/unixorn
- Owner: rheber
- Created: 2021-03-25T08:35:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-12T01:12:54.000Z (over 2 years ago)
- Last Synced: 2026-01-12T11:59:28.655Z (6 months ago)
- Topics: react, shell, terminal
- Language: TypeScript
- Homepage:
- Size: 2.27 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
Awesome Lists containing this project
README
# README
[](https://nodei.co/npm/unixorn/)
## Purpose
Unixorn aspires to be a Unix-like environment with a shell interface that:
* can be embedded into a website
* comes with a set of built-in commands and keybindings
* can be extended with additional commands, keybindings and styles
You can view a [live example](https://rheber.github.io/unixorn/example/index.html) of Unixorn in action.
## Installation
Execute `yarn add unixorn`.
## Basic Usage
### In React
```
import React, { Component } from 'react'
import Unixorn from 'unixorn'
const configuration = {}
class Example extends Component {
render() {
return
}
}
```
### Without React
```
import { initUnixorn } from 'unixorn'
const configuration = {}
const nonReactDomNode = document.getElementById('example')
initUnixorn(nonReactDomNode, configuration)
```
## APIs
### Typescript Exports
Consult the [docs generated with typedoc](https://rheber.github.io/unixorn/docs/index.html).
### CSS Classes
The following classes may be targeted for styling:
* unixorn-base
* unixorn-current
* unixorn-cursor
* unixorn-error
* unixorn-input
* unixorn-output
* unixorn-prompt
* unixorn-startup-message
## Development
If you wish to submit a pull request, you should probably check the [contributing guide](https://github.com/rheber/unixorn/blob/master/.github/CONTRIBUTING.md) first.
### To install dependencies
Execute `yarn install`.
### To build
Execute `yarn run build`.
### To run
Execute `yarn start`.
### To regenerate docs
Execute `yarn docs`.
### To run the example app
Execute `yarn install` and `yarn start` in the example folder.
### To run the test suite and linter
Execute `yarn test`.