Termage provides a fluent and incredibly powerful object-oriented interface for customizing CLI output text color, background, formatting, theming and more.

Overview

Termage


Version License Total downloads


Termage provides a fluent and incredibly powerful object-oriented interface for customizing CLI output text color, background, formatting, theming and more.

Installation

With Composer

composer require termage/termage

Resources

Tests

Run tests

./vendor/bin/pest

License

The MIT License (MIT) Copyright (c) 2021 Sergey Romanenko

You might also like...
unofficial cli built using php which can be used to upload and download files from anonfiles.com

Anonfiles CLI Table of Contents Introduction Features Screenshots Installation Contributing License Introduction Anon Files CLI can upload and downloa

A CLI program that helps you check your endpoints by requesting the given servers and send a report message in any supported channel like Telegram

API Monitor A CLI program that help you check your endpoints by requesting the given servers and send a report message in any supported channel ( Tele

A Cli tool to save you time, and gives you the power to scaffold all of your models,controllers,commands
A Cli tool to save you time, and gives you the power to scaffold all of your models,controllers,commands

A Cli tool to save you time, and gives you the power to scaffold all of your models,controllers,commands... at once Installation You can install the p

An Elegant CLI Library for PHP

Commando An Elegant PHP CLI Library Commando is a PHP command line interface library that beautifies and simplifies writing PHP scripts intended for c

Cilex a lightweight framework for creating PHP CLI scripts inspired by Silex

Cilex, a simple Command Line Interface framework Cilex is a simple command line application framework to develop simple tools based on Symfony2 compon

PHP Version Manager for the CLI on Windows

This package has a much more niche use case than nvm does. When developing on Windows and using the integrated terminal, it's quite difficult to get those terminals to actually listen to PATH changes.

Library for creating CLI commands or applications

Console Motivation: this library purpose is to provide a lighter and more robust API for console commands and/or applications to symfony/console. It c

PHP CLI tool which allows publishing zipped MODX extra to modstore.pro marketplace

MODX Extra Publisher PHP CLI tool which allows publishing zipped MODX extra to modstore.pro marketplace. Installation global? local? To install packag

PHP CLI project to get an appointment from https://vacunacovid.catsalut.gencat.ca

covid_vaccine_bcn PHP CLI project to get an appointment from https://citavacunacovid19.catsalut.gencat.cat/Vacunacio_Covid/Vacunacio/VacunacioCovidRes

Comments
  • Add percentage for element width

    Add percentage for element width

    We should able to set percentage for element width

    Draft implementation:

    if (preg_match('/^\d+(?:\.\d+)?%$/', (string) $widthStyle)) {
        $widthStyle = intval(($widthStyle / 100) * Terminal::getWidth());
    }
    

    need to check this feature with all possible cases of element width and text alignments.

    priority: medium type: feature 
    opened by Awilum 0
  • Add fractions for element width

    Add fractions for element width

    We should able to set fractions for element width

    Draft implementation:

    if (preg_match('/(\d+)\/(\d+)/', (string) $widthStyle, $matches)) {
        $widthStyle = intval($matches[1] / $matches[2] * 100);
    }
    

    need to check this feature with all possible cases of element width and text alignments.

    priority: medium type: feature 
    opened by Awilum 0
  • Add emojies support

    Add emojies support

    We should have emojies support for the element value.

    With the current implementation of the box model calculations for value length with emojies are little bit wrong because some emojies length are more than 1 printed symbol.

    Need to research this question and find the best solution of correct calculation for value length with emojies.

    type: feature 
    opened by Awilum 0
  • chart which can be updateble

    chart which can be updateble

    Need to display program progress While long program runs i want to display a progress with chart you have

    Describe the solution you'd like the chart to return some handle that can be updated with new chart percentage at later time

    opened by grobokop 0
Releases(v0.20.1)
  • v0.20.1(Sep 10, 2022)

  • v0.20.0(Jul 4, 2022)

  • v0.19.0(Feb 18, 2022)

  • v0.18.0(Feb 15, 2022)

    • Added new element Image.
    • Added new public method isTerm for Terminal.
    • Added new public method isAppleTerminal for Terminal.
    • Added new public method getVersion for Terminal.
    • Added new public method getName for Terminal.
    Source code(tar.gz)
    Source code(zip)
  • v0.17.0(Feb 13, 2022)

    • Added new public method pipe for Element.
    • Added new public method addClasses for Element.
    • Added new public method removeClasses for Element.
    • Added new public method setTitle for Terminal.
    • Added new public method has256ColorSupport for Terminal.
    • Added new public method isXterm for Terminal.
    • Added new public method hasTrueColorSupport for Terminal.
    • Added new public method checkEnvVariable for Terminal.
    Source code(tar.gz)
    Source code(zip)
  • v0.16.0(Feb 12, 2022)

    • Added new element Spark.
    • Added new helper render.
    • Added new helper renderToFile.
    • Added new helper terminal.
    • Added new shortcode raw.
    • Added new public static method render for Thermage.
    • Added new public static method renderToFile Thermage.
    • Added new system space symbol § and new public static methods space, getSpace, replaceSystemChars for Element.
    • AddedmakeClasses to create collection of classes from string of classes.
    • Added media to set classes for specific media.
    • Added ability to set specific classes for specific media queries.
    • Fixed chart element issue with cyrillic char in variable chartData.

    BREAKING CHANGES

    • Use new renderToString element method instead of render.
    • Use new render or renderToFile helper to render element(s).
    • All public methods for Base Classes are not static anymore, use helpers to access them, or create instance of the Classes.
    • Method getClasses returns Collection of classes instead of string.
    Source code(tar.gz)
    Source code(zip)
  • v0.15.2(Dec 26, 2021)

  • v0.15.1(Dec 17, 2021)

  • v0.15.0(Dec 14, 2021)

    • Added CFonts support.
    • Added new element public method font.
    • Added new element public method fontFrom.
    • Added new element public method fontLetterSpacing.
    • Added new element public method colors.
    • Added new element public method applyFont.
    • Added new public method pixels for Canvas element.
    • Added new magic classes font, colors.
    • Fixed issues with paddings calculations.
    • Fixed issues with value length calculations including shortcodes.
    Source code(tar.gz)
    Source code(zip)
  • v0.14.2(Dec 7, 2021)

  • v0.14.1(Dec 7, 2021)

  • v0.14.0(Dec 2, 2021)

    • Added new element Canvas.
    • Added display inline-block for elements.
    • Added new magic class text-overflow.
    • Aded new chart border variants.
    • Added ability to send elements styles array argument.
    • Added ability to set element text vertical alignment.
    • Improved calucations for non auto width elements.
    • Fixed height style logic.
    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(Nov 26, 2021)

    • Added new public method textOverflow for element.
    • Added ability to set variants of predefined and custom borders for hr element.
    • Improved box model with new text overflow and word wrap functionality for muli-line values.
    • Improved calculations for text alignment center.
    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Nov 21, 2021)

    • Added getEsc for method stripStyles.
    • Fix terminal width detection for hr element.
    • Fix calculations for element width.
    • Improve element styles definition.
    • Redefine value length if clearfix is true.
    • Redefine value and value length if value length is higher then width style.
    • Update styles for heading element.
    • Removed unused helper functions.
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Nov 17, 2021)

    • Added ability to set element custom borders.
    • Added new base class Styles.
    • Added new base class Screen.
    • Added new base class Cursor.
    • Added new public static termage method: getCsi to get Control Sequence Introducer.
    • Added new public static termage method: setCsi to set Control Sequence Introducer.
    • Added new public static termage method: getEsc to get Control Sequence Escape.
    • Added new public static termage method: setEsc to set Control Sequence Escape.
    • Added new public static termage method: getOsc to get Operating System Command.
    • Added new public static termage method: setOsc to set Operating System Command.
    • Added new public element method b to set border style.
    • Added new public element method bColor to set border color.
    • Added new magic classes: b, b-color.

    BREAKING CHANGES

    • Terminal public method getWidth changed to public static.
    • Terminal public method setWidth changed to public static.
    • Terminal public method getHeight changed to public static.
    • Terminal public method setHeight changed to public static.
    • Color public method textColor changed to public static and renamed to applyForegroundColor.
    • Color public method bgColor changed to public static and renamed to applyBackgroundColor.
    • Classes Color and Terminal moved from Utils to Base.
    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Nov 9, 2021)

    • Improved box model for elements with ability to manage element width, height, text alignment.
    • Added ability to set text alignment center for base element.
    • Added ability to set text alignment center for hr element.
    • Added ability to set text alignment center for alert element.
    • Added new public terminal method width to set terminal inner width.
    • Added new public terminal method height to set terminal inner height.
    • Added new public element method my to set vertical margins.
    • Added new public element method py to set vertical paddings.
    • Added new public element method pt to set top padding.
    • Added new public element method pb to set bottom padding.
    • Added new public element method mt to set top margin.
    • Added new public element method mb to set bottom margin.
    • Added new public element method h to set element height.
    • Added ability to set top, right, bottom, left margins with updated element method m.
    • Added ability to set top, right, bottom, left paddings with updated element method p.
    • Added new magic classes: strikethrough, my, py, mt, mb, pt, pb, h, m, p.
    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Nov 5, 2021)

    • Imrpoved box model for elements with ability do set element display state and width.
    • Added new public element method p to set left and right paddings.
    • Added new public element method m to set left and right margins.
    • Added new public element method d to set display state.
    • Added new public element method w to set width.
    • Added new public element method textAlign to set text alignment.
    • Added new public element method clearfix to force element self-clear its children block elements linebreaks.
    • Added new magic classes w, d, clearfix, text-align.
    • Fixes for Theme default color scheme.
    • Tests improvements.

    BREAKING CHANGES

    • Removed shortcodes [p], [px], [pr], [pl], [m], [mx], [mr], [ml]
    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Oct 27, 2021)

    • Added Heading element.
    • Added new element methods styles and getStyles.
    • Added new element methods classes and getClasses.
    • Added new theme method getVariables and changed logic for method variables.
    • Added classes method to set element classes.
    • Fixed getSaturation method for non TRUECOLOR terminals.
    • Fixed margin and padding calculations using global spacer.
    • Fixes and improvements for Theming.
    • Fixes and improvements for all Elements.
    • Tests improvements.

    BREAKING CHANGES

    • Removed non semantic elements: blink, invisible, reverse. Use styles instead.
    • Removed theme variables for margins and paddings, use spacer variable instead.
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Oct 21, 2021)

    • Added new rendering framework agnostic logic instead of old symfony based.
    • Added new powerful Shortcodes API with a lot of predefined shortcodes.
    • Added RGB Colors support.
    • Added magic classes pipeline for Element.
    • Added new method dim for Element.
    • Added new method strikethrough for Element.
    • Added new method italic for Element.
    • Added new method invisible for Element.
    • Added new element Chart.
    • Added new element Bold.
    • Added new element Italic.
    • Added new element Reverse.
    • Added new element Paragraph.
    • Added new element Anchor.
    • Added new element Strikethrough.
    • Added new element Underline.
    • Added new element Div.
    • Added new element Span.
    • Added new element Hr.
    • Added new element Breakline.
    • Added new element Blink.
    • Added a lot of new new helpers.
    • Fixes and improvements for Theming.
    • Fixes and improvements for all Elements.
    • Tests improvements.
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Oct 8, 2021)

  • v0.5.1(Oct 7, 2021)

  • v0.5.0(Oct 7, 2021)

  • v0.4.0(Oct 6, 2021)

    • Updated colors for default theme.
    • Added new method getTheme for Element Class.
    • Added new Alert Component.
    • Added new Rule Component.
    • Added new Link Component.
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Oct 4, 2021)

    • Added Themes (instead of Colors)
    • Renderer engine imrovements.
    • Tests improvements.

    BREAKING CHANGES

    • Component block renamed to el
    • Colors removed, use Themes instead.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Oct 3, 2021)

  • v0.1.0(Oct 1, 2021)

Owner
TERMAGE
Totally RAD Terminal styling for PHP!
TERMAGE
A simple object oriented interface to execute shell commands in PHP

php-shellcommand php-shellcommand provides a simple object oriented interface to execute shell commands. Installing Prerequisites Your php version mus

Michael Härtl 283 Dec 10, 2022
A Magento 2 module that adds a CLI bin/magento cms:dump to dump all CMS pages and CMS blocks to a folder var/cms-output.

A Magento 2 module that adds a CLI bin/magento cms:dump to dump all CMS pages and CMS blocks to a folder var/cms-output.

Yireo 16 Dec 16, 2022
Simple and customizable console log output for CLI apps.

Console Pretty Print Simple and customizable console log output for CLI apps. Highlights Simple installation (Instalação simples) Very easy to customi

William Alvares 3 Aug 1, 2022
An object-oriented option parser library for PHP, which supports type constraints, flag, multiple flag, multiple values, required value checking

GetOptionKit Code Quality Versions & Stats A powerful option parser toolkit for PHP, supporting type constraints, flag, multiple flag, multiple values

Yo-An Lin 140 Sep 28, 2022
Cecil is a CLI application that merges plain text files (written in Markdown), images and Twig templates to generate a static website.

Cecil is a CLI application that merges plain text files (written in Markdown), images and Twig templates to generate a static website.

Cecil 209 Jan 2, 2023
A handy set of Stringable mixins for CLI text.

Laravel Colorize A mixin for Laravel's Stringable to easily apply colors and styles to CLI text. Installation You can install the package via Composer

James Brooks 47 Oct 30, 2022
☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server

☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server / PHP 命令行模式开发框架,支持 Swoole、WorkerMan、FPM、CLI-Server

Mix PHP 1.8k Jan 3, 2023
The Platform.sh CLI is the official command-line interface for Platform.sh

The Platform.sh CLI is the official command-line interface for Platform.sh. Use this tool to interact with your Platform.sh projects, and to build them locally for development purposes.

Platform.sh 222 Dec 29, 2022
🖥 Build beautiful PHP CLI menus. Simple yet Powerful. Expressive DSL.

Contents Minimum Requirements Installation Upgrading Usage Quick Setup Examples API Appearance Menu Title Colour Width Padding Margin Borders Exit But

PHP School 1.9k Dec 28, 2022
Provides the equivalent of request ( Context ) and response ( Stdio ) objects for the command line interface

Provides the equivalent of request ( Context ) and response ( Stdio ) objects for the command line interface, including Getopt support, and an independent Help object for describing commands.

Aura for PHP 103 Sep 28, 2022