• Stars
    star
    3,842
  • Rank 11,435 (Top 0.3 %)
  • Language
    C
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Convert terminal recordings to animated gifs

ttygif converts a ttyrec file into gif files. It's a stripped down version of ttyplay that screenshots every frame.

Demo

gif

Setup

Debian/Ubuntu

$ sudo apt-get install imagemagick ttyrec gcc x11-apps make git
$ git clone https://github.com/icholy/ttygif.git
$ cd ttygif
$ make
$ sudo make install

Fedora/CentOS/RHEL

$ sudo dnf install ImageMagick gcc xorg-x11-apps
$ # install ttyrec from source patched ~> https://github.com/mattwilmott/ttyrec
$ git clone https://github.com/icholy/ttygif.git
$ cd ttygif
$ make
$ sudo make install

OpenSUSE Leap

$ zypper addrepo http://download.opensuse.org/repositories/utilities/openSUSE_Leap_42.2/utilities.repo
$ zypper refresh
$ zypper install ttygif

Arch Linux

$ git clone https://aur.archlinux.org/ttyrec.git
$ cd ttyrec
$ makepkg -i
$ cd ..
$ git clone https://aur.archlinux.org/ttygif.git
$ cd ttygif
$ makepkg -is

With yaourt installed:

$ yaourt -S ttyrec ttygif

macOS

$ brew install ttygif

Usage:

1. Create ttyrec recording

$ ttyrec myrecording
  • Hit CTRL-D or type exit when done recording.

2. Convert to gif

$ ttygif myrecording

On OSX optionally you can set a -f flag which will bypass cropping which is needed for terminal apps which aren't full screen. Both standard Terminal and iTerm apps are supported.

$ ttygif myrecording -f

Additional Notes

If you're getting Error: WINDOWID environment variable was empty., then you need to manually set WINDOWID.

export WINDOWID=23068679

If you're on Ubuntu, you can use xdotool to find the WINDOWID

$ sudo apt-get install xdotool
$ export WINDOWID=$(xdotool getwindowfocus)

Debugging

If you're having issues, then export the TTYGIF_DEBUG env variable.

export TTYGIF_DEBUG=1

This will print out all the commands it's trying to run.

Credits

The idea and approach was adapted from tty2gif

More Repositories

1

Duration.js

TypeScript
184
star
2

rip

Yes, I know sed can do this
Go
145
star
3

gomajor

Go tool for major version upgrades
Go
123
star
4

ember-brunch

CoffeeScript
80
star
5

lsplinks.nvim

LSP textDocument/documentLink support for neovim
Lua
70
star
6

replace

Streaming text replacement for Go
Go
67
star
7

digest

Go HTTP Digest Access Authentication
Go
62
star
8

gist

Command line tool for creating github gists
Go
57
star
9

recurring

Implementation of Martin Fowler's Recurring Events for Calendars
Go
54
star
10

killable

Composable cancellation
Go
46
star
11

nick_bot

Pretty much the best thing ever
Go
41
star
12

durationpy

Module for converting between datetime.timedelta and Go's time.Duration strings.
Python
28
star
13

gdoc

syntax highlighting and tab completion for godoc
Shell
24
star
14

semgrepx

xargs for semgrep
Go
21
star
15

brainfuck

Brainfuck Compiler
Go
16
star
16

gosearch

godoc.org search tool
Go
13
star
17

git-get

go get for everything else
Go
13
star
18

slippy

Go package for drawing OpenStreetMap tiles in pixel
Go
12
star
19

higher

Higher order functions for Go
Go
11
star
20

utm

Package for converting to and from the Universal Transverse Mercator coordinate system
Go
11
star
21

vedis

GCO bindings to Vedis: An Embeddable Datastore Engine
C
9
star
22

rtsp

A low level package for writing rtsp servers and clients
Go
8
star
23

geokettle-2.0

mirror of geokettle-2.0
Java
7
star
24

codegpt

A unixy GPT interface
Go
6
star
25

kilo

Kilo text editor
Go
5
star
26

gulp-tsconfig-files

JavaScript
5
star
27

path

sweet & simple command line tool for dealing with paths
Go
4
star
28

cc

C Compiler
Go
4
star
29

swapm

Code generation for the rest of us
JavaScript
4
star
30

dotfiles

my dotfiles, (they're pretty nasty ...)
Lua
4
star
31

caps

Attempt at making computer generated pixel art from bottle caps
Go
3
star
32

JsonPatch.js

experimenting with slices in Json pointers and patches
JavaScript
3
star
33

flagslice

Go package for reading flags into a slice
Go
3
star
34

pghero.sh

Shell
3
star
35

cesium_typescript_generator

WIP
JavaScript
2
star
36

gdbb-extract

Go: Inline GDB Breakpoints
Go
2
star
37

cookies.c

C
2
star
38

bitshift

Go
2
star
39

fbcsniff

facebook chat sniffer (obsolete)
Python
1
star
40

jsonvalue

Go
1
star
41

findexports

Go
1
star
42

539kernel

1
star
43

lcbo

Go
1
star
44

building_code

Script for scraping ontario building code
Python
1
star
45

im

An tool for keeping track of what I'm doing
Go
1
star
46

MessageBus

PubSub for WebWorkers
JavaScript
1
star
47

StateMachine

TypeScript version of SSM (with less magic).
JavaScript
1
star
48

potatoe

A Crappy Markup Language
TypeScript
1
star
49

config

Go
1
star
50

json

Fork of encoding/json
Go
1
star
51

holidayapi

Go package for accessing https://holidayapi.com/
Go
1
star
52

draw

Basic 2d drawing primitives for the terminal
Go
1
star
53

keylog.nvim

Lua
1
star