A tiny markup language for terminal output. Makes formatting output in CLI apps easier!

tml - Terminal Markup Language

Build Status GoDoc

A Go module (and standalone binary) to make the output of coloured/formatted text in the terminal easier and more readable.

You can use it in your Go programs, and bash etc. too.

Example screenshot

Usage in Go

The output of coloured/formatted text is easy using the following syntax:

package main

import "github.com/liamg/tml"

func main() {
    tml.Printf("this text is red and the following is %s\n", "not red")
}

Usage in Bash

First, install tml:

go get -u github.com/liamg/tml/tml

Then you can simply pipe text containing tags to tml:

#!/bin/bash

echo "this text is red and the following is not red" | tml

Format

Each tag is enclosed in angle brackets, much like HTML.

You can nest tags as deeply as you like.

It's not required to close tags you've opened, though it can make for easier reading.

Available Tags

Foreground Colours

Background Colours

Attributes

Owner
Liam Galvin
Security Engineer @form3tech
Liam Galvin
Similar Resources

A tiny cli command/daemon for syncing toggl time entries with Jira

toggl-sync A tiny cli command/daemon for syncing toggl time entries with Jira Installation Install the app via brew package manager. brew tap timemate

Nov 30, 2021

cli is a simple, fast, and fun package for building command line apps in Go.

cli cli is a simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable comm

Jul 10, 2022

This project is used to get familiar with GoLang cli apps, along with cobra generator.

SecretCTL SecretCTL About the project Status Getting started Layout Notes About the project This project is used to get familiar with GoLang cli apps,

Jan 11, 2022

A simple library to build golang command line (cli / cmd)apps

A simple library to build golang command line (cli / cmd)apps

Jan 11, 2022

🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows.

🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows.

🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows. GO CLI 控制台颜色渲染工具库,支持16色,256色,RGB色彩渲染输出,使用类似于 Print/Sprintf,兼容并支持 Windows 环境的色彩渲染

Dec 30, 2022

Chalk is a Go Package which can be used for making terminal output more vibrant with text colors, text styles and background colors.

Chalk is a Go Package which can be used for making terminal output more vibrant with text colors, text styles and background colors.

Chalk Chalk is a Go Package which can be used for making terminal output more vibrant with text colors, text styles and background colors. Documentati

Oct 29, 2022

Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.

Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.

Stonks is a terminal based stock visualizer and tracker. Installation Requirements: golang = 1.13 Manual Clone the repo Run make && make install Pack

Dec 16, 2022

Plugin which makes tmux work and feel like i3wm

Tmux Tilish This is a plugin that makes tmux behave more like a typical dynamic window manager. It is heavily inspired by i3wm, and most keybindings a

Jan 7, 2023

A simple way of sending messages from the CLI output to your Discord channel with webhook.

A simple way of sending messages from the CLI output to your Discord channel with webhook.

discat A simple way of sending messages from the CLI output to your Discord channel with webhook. Actually, this is a fork version of slackcat that I

Nov 15, 2022
Comments
  • Package availability

    Package availability

    My team does a lot of bash scripting as part of our development tools, and TML looks really interesting. We currently have custom echo_<color> commands duplicated across several repositories, and it would be great if we could drop those.

    I think the two things that we would need to roll TML out across several repos would be:

    • A maintained Homebrew package so our team could locally run brew install tml.
    • A maintained Debian package so we could install the tool inside of our Docker images.

    Would you be open to adding those things to this repository? We could contribute if that would be helpful.

  • implement tml in python and want a tml standard document

    implement tml in python and want a tml standard document

    Hi, thank you for creating the tml, it works really well. I implemented it in python, named tmlpy. I hope to have a tml standard document so that more languages ​​can support it. thanks again for your creation!

ghcv-cli makes it easy to view the user-created issues, pull requests, and repositories in the terminal.
ghcv-cli makes it easy to view the user-created issues, pull requests, and repositories in the terminal.

ghcv-cli ghcv-cli makes it easy to view the user-created issues, pull requests, and repositories in the terminal. About Show a list of pull requests c

Mar 13, 2022
A collection of terminal-based widgets for richer Golang CLI apps.
A collection of terminal-based widgets for richer Golang CLI apps.

Flinch A collection of terminal-based widgets for richer Golang CLI apps. Ships with a library to build your own widgets/TUIs too. Warning: This modul

Jan 7, 2023
Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Jan 2, 2022
Library for easy named formatting strings

go-celsium Library for easy named formatting translations Documentation All translations with named parameters are stored in next format: Hello, {name

Apr 12, 2021
Simple console formatting library for Go
Simple console formatting library for Go

flair Simple console formatting library for Go Motivation There are definitely a bunch of other libraries like this, but I wanted one I knew would be

Aug 30, 2021
Minutes is a CLI tool for synchronizing work logs between multiple time trackers, invoicing, and bookkeeping software to make entrepreneurs' daily work easier.
Minutes is a CLI tool for synchronizing work logs between multiple time trackers, invoicing, and bookkeeping software to make entrepreneurs' daily work easier.

Minutes is a CLI tool for synchronizing work logs between multiple time trackers, invoicing, and bookkeeping software to make entrepreneurs' daily work easier.

Aug 8, 2022
Rem is a CLI trash which makes it ridiculously easy to recover files.
Rem is a CLI trash which makes it ridiculously easy to recover files.

Rem is a CLI trash which makes it ridiculously easy to recover files. We've all had that moment when we've deleted something we realised we shouldn't have. It sucks. Let's fix that!

Dec 21, 2022
A go cli makes it easy to get quotes from the Ted Lasso Quotes API

Ted Lasso Quotes CLI This cli makes it easy to get quotes from the Ted Lasso Quotes API Just clone the repo and build the binary for your distribution

Jun 15, 2022
Simple cli that makes your thoughts captured in the moment.

note Simple cli that makes your thoughts captured in the moment. Install go install github.com/jnszkr/note Usage > note This is my first note that I

Jan 8, 2022