{"id":13620976,"url":"https://github.com/liamg/tml","last_synced_at":"2025-05-14T23:07:30.459Z","repository":{"id":43537472,"uuid":"184534896","full_name":"liamg/tml","owner":"liamg","description":":rainbow::computer::art: A tiny markup language for terminal output. Makes formatting output in CLI apps easier!","archived":false,"fork":false,"pushed_at":"2024-04-24T14:59:39.000Z","size":55,"stargazers_count":741,"open_issues_count":3,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T19:50:06.193Z","etag":null,"topics":["cli","cli-app","colors","colours","terminal","terminal-ui","tui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liamg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["liamg"]}},"created_at":"2019-05-02T06:55:02.000Z","updated_at":"2025-04-10T15:10:56.000Z","dependencies_parsed_at":"2024-06-18T12:44:37.441Z","dependency_job_id":null,"html_url":"https://github.com/liamg/tml","commit_stats":{"total_commits":10,"total_committers":4,"mean_commits":2.5,"dds":0.4,"last_synced_commit":"2b6c68233f08e5a032e4da75fce1ba07e8ea2ae3"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Ftml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Ftml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Ftml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Ftml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liamg","download_url":"https://codeload.github.com/liamg/tml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243362,"owners_count":22038046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cli-app","colors","colours","terminal","terminal-ui","tui"],"created_at":"2024-08-01T21:01:01.395Z","updated_at":"2025-05-14T23:07:25.452Z","avatar_url":"https://github.com/liamg.png","language":"Go","readme":"# tml - Terminal Markup Language\n\n[![Build Status](https://travis-ci.org/liamg/tml.svg \"Travis CI status\")](https://travis-ci.org/liamg/tml)\n[![GoDoc](https://godoc.org/github.com/liamg/tml?status.svg)](https://godoc.org/github.com/liamg/tml)\n\nA Go module (and standalone binary) to make the output of coloured/formatted text in the terminal easier and more readable.\n\nYou can use it in your Go programs, and bash etc. too.\n\n![Example screenshot](example.png)\n\n## Usage in Go\n\nThe output of coloured/formatted text is easy using the following syntax:\n\n```go\npackage main\n\nimport \"github.com/liamg/tml\"\n\nfunc main() {\n    tml.Printf(\"\u003cred\u003ethis text is \u003cbold\u003ered\u003c/bold\u003e\u003c/red\u003e and the following is \u003cgreen\u003e%s\u003c/green\u003e\\n\", \"not red\")\n}\n```\n\n## Usage in Bash\n\nFirst, install tml:\n\nInstall Go and run the following command.\n\n```\n# For Go 1.16+\n# Make sure that `$GOPATH/bin` is in your `$PATH`, because that's where this gets installed\n\ngo install github.com/liamg/tml/tml@latest\n\n# For Go \u003c1.16\n\ngo get -u github.com/liamg/tml/tml\n```\n\nThen you can simply pipe text containing tags to tml:\n\n```bash\n#!/bin/bash\n\necho \"\u003cred\u003ethis text is \u003cbold\u003ered\u003c/bold\u003e\u003c/red\u003e and the following is \u003cgreen\u003enot red\u003c/green\u003e\" | tml\n```\n\n## Format\n\nEach tag is enclosed in angle brackets, much like HTML.\n\nYou can nest tags as deeply as you like.\n\nIt's not required to close tags you've opened, though it can make for easier reading.\n\n### Available Tags\n\n#### Foreground Colours\n\n- `\u003cred\u003e`\n- `\u003cgreen\u003e`\n- `\u003cyellow\u003e`\n- `\u003cblue\u003e`\n- `\u003cmagenta\u003e`\n- `\u003ccyan\u003e`\n- `\u003clightgrey\u003e`\n- `\u003cdarkgrey\u003e`\n- `\u003cblack\u003e`\n- `\u003cwhite\u003e`\n- `\u003clightred\u003e`\n- `\u003clightgreen\u003e`\n- `\u003clightyellow\u003e`\n- `\u003clightblue\u003e`\n- `\u003clightmagenta\u003e`\n- `\u003clightcyan\u003e`\n\n#### Background Colours\n\n- `\u003cbg-red\u003e`\n- `\u003cbg-green\u003e`\n- `\u003cbg-yellow\u003e`\n- `\u003cbg-blue\u003e`\n- `\u003cbg-magenta\u003e`\n- `\u003cbg-cyan\u003e`\n- `\u003cbg-lightgrey\u003e`\n- `\u003cbg-darkgrey\u003e`\n- `\u003cbg-black\u003e`\n- `\u003cbg-white\u003e`\n- `\u003cbg-lightred\u003e`\n- `\u003cbg-lightgreen\u003e`\n- `\u003cbg-lightyellow\u003e`\n- `\u003cbg-lightblue\u003e`\n- `\u003cbg-lightmagenta\u003e`\n- `\u003cbg-lightcyan\u003e`\n\n#### Attributes\n\n- `\u003cbold\u003e`\n- `\u003cdim\u003e`\n- `\u003citalic\u003e`\n- `\u003cunderline\u003e`\n- `\u003cblink\u003e`\n- `\u003creverse\u003e`\n- `\u003chidden\u003e`\n- `\u003cstrikethrough\u003e`\n","funding_links":["https://github.com/sponsors/liamg"],"categories":["Misc","Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamg%2Ftml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliamg%2Ftml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamg%2Ftml/lists"}