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 动图,或者给你一个在线播放器的链接,方便分享。
它是图形界面的录屏软件,还是命令行工具?它是一个用 npm 全局安装的命令行工具。它不是录屏幕画面,而是把录制下来的终端文字渲染成图片,所以生成的 GIF 更清晰、质量更好。
我怎么录制第一次终端会话?安装好之后运行 record 命令:它会在当前目录下生成一个 demo.yml 文件,里面保存着你的配置和录制的帧。用 play 命令回放会话,然后再渲染成 GIF 动图。
除了 Node.js,安装它还需要别的东西吗?Node.js 是唯一的前提条件。在 Node v4-v16 上安装很顺利;在更新的版本上,你可能需要装好开发工具,这样才能用 node-gyp 编译 C++ 扩展模块。
试之前有什么坑需要知道?GIF 压缩还没有实现。ZSH 用户必须在配置文件里把默认录制的命令从 bash 改成 zsh;在 Linux 上你可能会遇到缺少 libXss.so.1 之类的共享库的问题,README 里有记录好的解决办法。
它在 Windows 和 macOS 上能用吗,还是只支持 Linux?它是跨平台的:支持 Linux、Windows 和 MacOS。默认录制的命令在 Linux 上是 bash,在 Windows 上是 powershell.exe;全局配置目录分别位于你的用户主目录或 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