terminalizer README

The project's README from github.com/faressoft/terminalizer. As one markdown file: README.md.

Terminalizer

npm npm Gitter Unicorn Tweet

Record your terminal and generate animated gif images or share a web player link www.terminalizer.com

Built to be jusT cOol 👌🦄 !

If you think so, support me with a star and a follow 😘



Table of Contents

Features

What's Next

Installation

You need to install Node.js first, then install the tool globally using this command:

yarn global add terminalizer

Still facing an issue? Check the Issues section or open a new issue.

The installation should be very smooth with Node.js v4-v16. For newer versions, if the installation is failed, you may need to install the development tools to build the C++ add-ons. Check node-gyp.

Getting Started

Start recording your terminal using the record command.

terminalizer record demo

A file called demo.yml will be created in the current directory. You can open it using any editor to edit the configurations and the recorded frames. You can replay your recording using the play command.

terminalizer play demo

Now let's render our recording as an animated gif.

terminalizer render demo

Compression

GIF compression is not implemented yet. For now we recommend https://gifcompressor.com.

Usage

You can use the --help option to get more details about the commands and their options

terminalizer <command> [options]

Init

Create a global config directory

terminalizer init

Config

Generate a config file in the current directory

terminalizer config

Record

Record your terminal and create a recording file

terminalizer record <recordingFile>

Options

-c, --config        Overwrite the default configurations                                  [string]
-d, --command       The command to be executed                            [string] [default: null]
-k, --skip-sharing  Skip sharing and showing the sharing prompt message [boolean] [default: false]

Examples

terminalizer record foo                      Start recording and create a recording file called foo.yml
terminalizer record foo --config config.yml  Start recording with your own configurations

Play

Play a recording file on your terminal

terminalizer play <recordingFile>

Options

-r, --real-timing   Use the actual delays between frames as recorded        [boolean] [default: false]
-s, --speed-factor  Speed factor, multiply the frames delays by this factor [number] [default: 1]

Render

Render a recording file as an animated gif image

terminalizer render <recordingFile>

Options

-o, --output   A name for the output file                                      [string]
-q, --quality  The quality of the rendered image (1 - 100)                     [number]
-s, --step     To reduce the number of rendered frames (step > 1) [number] [default: 1]

Share

Upload a recording file and get a link for an online player

terminalizer share <recordingFile>

Generate

Generate a web player for a recording file

terminalizer generate <recordingFile>

Configurations

The default config.yml file is stored under the root directory of the project. Execute the below command to copy it to your current directory.

Use any editor to edit the copied config.yml, then use the -c option to override the default one.

terminalizer config

RECOMMENDED, use the init command to create a global config file to be used instead of the default one.

terminalizer init

For Linux and MacOS, the created directory is located under the home directory ~/config/terminalizer. For Windows, it is located under the AppData.

Recording

Delays

GIF

Terminal

Theme

You can set the colors of your terminal using one of the CSS formats:

You can use the value transparent too.

The default colors that are assigned to the terminal colors are:

Watermark

You can add a watermark logo to your generated GIF images.

watermark:
  imagePath: AbsolutePathOrURL
  style:
    position: absolute
    right: 15px
    bottom: 15px
    width: 100px
    opacity: 0.9

Frame Box

Terminalizer comes with predefined frames that you can use to make your GIF images look cool.

Null Frame

No frame, just your recording.

Don't forget to add a backgroundColor under style.

frameBox:
  type: null
  title: null
  style:
    backgroundColor: black

Window Frame

frameBox:
  type: window
  title: Terminalizer
  style: []

Floating Frame

frameBox:
  type: floating
  title: Terminalizer
  style: []

Solid Frame

frameBox:
  type: solid
  title: Terminalizer
  style: []

Solid Frame Without Title

frameBox:
  type: solid
  title: null
  style: []

Styling Hint

You can disable the default shadows and margins.

frameBox:
  type: solid
  title: null
  style:
    boxShadow: none
    margin: 0px

FAQ

How to support ZSH

The default command that gets recorded for Linux is bash -l. You need to change the default command to zsh.

terminalizer config
command: zsh
fontFamily: "Meslo for Powerline, Meslo LG M for Powerline"
terminalizer record demo -c config.yml

Issues

error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

Solution:

sudo yum install libXScrnSaver

error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

Solution:

sudo apt-get install libgconf-2-4

Error: EACCES: permission denied, access '/usr/local/lib'

Solution:

sudo mkdir -p /usr/local/lib/node_modules && sudo chown -R $(whoami):$(whoami) /usr/local/lib/node_modules

# then use the install command in the "Installation" section above
yarn global add terminalizer

License

This project is under the MIT license.

terminalizer (faressoft/terminalizer)

Searching Database…

Что это такое?Terminalizer — это утилита для командной строки, которая записывает вашу сессию в терминале и превращает её в анимированный GIF или даёт ссылку на онлайн-плеер, чтобы поделиться записью.
Это программа с графическим интерфейсом для записи экрана или утилита для командной строки?Это CLI-утилита, которая устанавливается глобально через npm. Она не снимает экран, а отрисовывает записанный текст терминала как изображения, поэтому GIF получаются более чёткими и качественными.
Как записать свою первую сессию в терминале?После установки запустите команду record: она создаст в текущей папке файл demo.yml, в котором хранятся ваши настройки и записанные кадры. Воспроизведите сессию командой play, а затем отрендерите её в анимированный GIF.
Нужно ли что-то ещё, кроме Node.js, чтобы её установить?Node.js — единственное требование. На Node v4-v16 установка проходит гладко; на более новых версиях могут понадобиться инструменты разработчика, чтобы собрать C++-надстройки через node-gyp.
Есть ли подводные камни, о которых стоит знать заранее?Сжатие GIF пока не реализовано. Пользователям ZSH нужно в файле настроек заменить записываемую команду по умолчанию с bash на zsh, а на Linux можно столкнуться с отсутствующими системными библиотеками вроде libXss.so.1 — решения описаны в README.
Она работает на Windows и macOS или только на Linux?Она кроссплатформенная: Linux, Windows и MacOS. Команда, записываемая по умолчанию, — это bash на Linux и powershell.exe на Windows, а папка глобальных настроек находится в домашней директории или в Windows AppData соответственно.
Можно ли отредактировать запись перед тем, как делать из неё GIF?Да. Откройте созданный yml-файл в любом редакторе, чтобы изменить настройки и отредактировать записанные кадры — можно поменять задержки кадров, ограничить максимальное время простоя между кадрами и пропускать кадры с заданным шагом, чтобы уменьшить количество отрисованных кадров.
Как поделиться записью ссылкой вместо GIF-файла?Запустите команду share: она загрузит файл записи и вернёт ссылку на онлайн-плеер. Есть также команда generate, которая собирает веб-плеер для файла записи локально.
Насколько можно настроить внешний вид итогового GIF?Очень гибко: выберите стиль рамки окна (null, window, floating или solid) с необязательным заголовком, задайте цвета терминала в формате CSS, используйте любой установленный шрифт с нужным размером, межстрочным интервалом и расстоянием между буквами, выберите стиль курсора и добавьте картинку-водяной знак.
Как управлять зацикливанием и качеством GIF?В разделе GIF настроек: параметр quality принимает значение от 1 до 100, а repeat управляет зацикливанием — -1 проигрывает один раз, 0 зацикливает бесконечно, а положительное число зацикливает указанное количество раз.
What are similar projects?oh-my-posh, inshellisense, zx, upterm, zoxide, asdf, tmuxinator, atuin
Which topics is it in?render, record, colors, tty, pty, capture, gif, zsh, font, powershell, yaml, bash
Creator
faressoft
Size
4 MB
Stars
16.2K
Updated
CommitAug 29
Age
8y
Commits · 90 Days