Skip to content

A renderer + scripting language to build terminal UIs similar to HTML/JS for the web.

License

Notifications You must be signed in to change notification settings

Kiyoshika/terminal-markup-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TML (Terminal Markup Language)

This is a custom renderer to build (somewhat) interactive terminal applications for the terminal similar to HTML for the web.

See the TML Specification.

Preview (27 July 2023)

This is a sample login screen with a regular and password input and some dummy buttons

tml.demo.07.27.23.mp4

Rendered from the following TML:

<tml>
  <text/>
  <text marginLeft=2 fg=cyan bold=true>Login:</text>
  <text/>
  <text/>
  <text marginLeft=2 marginRight=4 bold=true newline=false>Email:</text>
  <input fg=red bg=white/>
  <text/>
  <text marginLeft=2 marginRight=1 bold=true newline=false>Password:</text>
  <input fg=red bg=white password=true/>
  <text/>
  <button marginLeft=2 marginRight=1 fixedWidth=16 newline=false bg=green fg=white>Login</button>
  <button fixedWidth=16 bg=blue fg=white>Register</button>
</tml>

Building

This relies on ncurses for all the UI stuff:

sudo apt-get install libncurses5-dev libncursesw5-dev

The CMake handles the linking/includes.

Now you can clone this repo, enter the root and:

mkdir build && cd build
cmake -DDEBUG_MODE=ON -DCOMPILE_TESTS=ON ..
  • DEBUG_MODE is OFF by default
  • COMPILE_TESTS is ON by default

An executable called tmlrender will be created in build/src/ directory.

Usage

TODO:

About

A renderer + scripting language to build terminal UIs similar to HTML/JS for the web.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published