Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rauchg/clif
Dead easy terminal GIFs, from the terminal.
https://github.com/rauchg/clif
Last synced: about 2 months ago
JSON representation
Dead easy terminal GIFs, from the terminal.
- Host: GitHub
- URL: https://github.com/rauchg/clif
- Owner: rauchg
- Created: 2015-02-13T06:15:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-23T20:25:13.000Z (over 8 years ago)
- Last Synced: 2024-07-12T04:35:37.974Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 448
- Watchers: 11
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# clif
Cross-platform CLI GIF maker based on JS+Web.
![](https://cldup.com/Iu3VmK9SVy.gif)
## How to use
Run
```bash
$ clif out.gif
```type `exit` to finish and save the recording.
## Features
- Easy to install: `npm install -g clif`.
- Works on OSX and Linux.
- Small GIFs.
- High quality (anti-aliased fonts).
- Rendered with CSS/JS, customizable.
- Realtime parallel rendering.
- Frame aggregation and customizable FPS.
- Support for titles Terminal.app-style.## How it works
clif builds mainly on four projects: `child_pty`, `term.js`
`omggif` and `phantomjs`.`child_pty` is used to spawn a pseudo terminal from
which we can capture the entirety of input and output.Each frame that's captured is asynchronously sent to
a `phantomjs` headless browser to render using `term.js`
and screenshot.The GIF is composited with `omggif` and finally written
out to the filesystem.## Options
```
Usage: clif [options]
Options:
-h, --help output usage information
-V, --version output the version number
-c, --cols Cols of the term [90]
-r, --rows Rows of the term [30]
-s, --shell Shell to use [/bin/bash]
-f, --fps Frames per second [8]
-q, --quality Frame quality 1-30 (1 = best|slowest) [5]```
## TODO
- Substitute `phantom` with a terminal rendered on top
of `node-canvas` or low-level graphic APIs.
[terminal.js](https://github.com/Gottox/terminal.js) seems like a good
candidate to add a `` adaptor to.
- Should work on Windows with some minor tweaks.## Credits
- Inspired by [KeyboardFire](https://github.com/KeyboardFire)'s [mkcast](https://github.com/KeyboardFire/mkcast).
- Borrows GIF palette neuquant indexing from
[sole](https://github.com/sole)'s [animated_GIF.js](https://github.com/sole/Animated_GIF).## License
MIT