Giter Site home page Giter Site logo

termd's Introduction

Termd

An open source library for writing terminal applications in Java under ASL 2.0, ported from https://github.com/termd/termd to make it able to run against java6/7.

Consuming the lib

Add this dependency to your build.

<dependency>
  <groupId>com.alibaba.middleware</groupId>
  <artifactId>termd-core</artifactId>
  <version>1.1.3-SNAPSHOT</version>
</dependency>

Snapshots are available from Sonatype OSS repository

Features

  • Telnet/SSH using Netty 4 or Vert.x 3
  • Web interface using term.js and SockJS/Websocket
  • Event based design
    • read events
    • window size
    • tty signals
  • Readline implementation
    • extensible with plugable functions
    • multi-line support
    • multi-byte char support
    • multi-cell char support
  • Unicode support
  • Terminfo capabilities

Supported protocols

Telnet

Termd provides its own implementation of Telnet written on top of Netty 4.

SSH

Termd provides an implementation of Apache SSHD backed by Netty 4.

Websocket

Termd in a web page using the term.js client library and Netty websockets.

FAQ

  • what is not Termd ?
    • not a shell
    • not an arg parser
    • not a command framework
  • why async style ?
    • keyboard, ctrl-c, etc... event processing is easy to program against
  • why would I use Termd ?
    • you want to write a terminal application easily
    • you want to support various protocols like SSH, telnet or a web interface
    • you don't care about the technical details

Examples

Events

A simple examples showing TTY events.

The actual example, runs with Telnet, SSH, Websocket.

Readline

A simple examples showing how to use Readline.

The actual example, runs with Telnet, SSH, Websocket.

Readline function

A simple examples showing how to extend Readline with a custom function that reverse the line content.

The actual example, runs with Telnet, SSH, Websocket.

Shell

A simple shell example giving an overview of TTY interactions.

The actual example, run with Telnet, SSH, Websocket.

Screencast

Broadcast the desktop to the client, focusing on pushing data to the TTY.

The actual example, run with Telnet, SSH, Websocket.

Snake

The popular Snake game on the event loop.

The actual example, run with Telnet, SSH, Websocket.

Plasma

A funny demo effect using unicode chars.

The actual example, run with Telnet, SSH, Websocket.

Ptybridge

The PTY bridge is a bridge to native process, use with caution for security reasons, run with Telnet, SSH, Websocket.

Telnet

A simple telnet example that shows Telnet options negociation.

Todo

  • dynamic prompt
  • see to use IntStream or not
  • handle % stuff in parser
  • foobar@ for any foobar, not only boolean and treat it as a removal

Try to use the maven install plugin to install artifacts with specific dependencies.

termd's People

Contributors

hengyunabc avatar

Watchers

James Cloos avatar  avatar  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.