{"id":13396999,"url":"https://github.com/icholy/ttygif","last_synced_at":"2025-05-14T10:06:20.156Z","repository":{"id":10021130,"uuid":"12060725","full_name":"icholy/ttygif","owner":"icholy","description":"Convert terminal recordings to animated gifs","archived":false,"fork":false,"pushed_at":"2025-01-01T17:31:10.000Z","size":141,"stargazers_count":3973,"open_issues_count":18,"forks_count":256,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-04-11T04:13:20.949Z","etag":null,"topics":["gifs","terminal"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icholy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-08-12T16:31:03.000Z","updated_at":"2025-04-10T07:41:37.000Z","dependencies_parsed_at":"2025-04-11T04:13:22.011Z","dependency_job_id":"52c65cc8-e7ed-434d-89c5-e88ec23f057b","html_url":"https://github.com/icholy/ttygif","commit_stats":{"total_commits":180,"total_committers":41,"mean_commits":4.390243902439025,"dds":0.5555555555555556,"last_synced_commit":"af74e151f98207a184e6905a595fac93b4dacca9"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icholy%2Fttygif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icholy%2Fttygif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icholy%2Fttygif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icholy%2Fttygif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icholy","download_url":"https://codeload.github.com/icholy/ttygif/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254119471,"owners_count":22017951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gifs","terminal"],"created_at":"2024-07-30T18:01:09.046Z","updated_at":"2025-05-14T10:06:20.093Z","avatar_url":"https://github.com/icholy.png","language":"C","funding_links":[],"categories":["C","Uncategorized","Images","开发者工具","Terminal Gif Creation","terminal","Source Code Tools","\u003ca name=\"screen-recorder\"\u003e\u003c/a\u003eScreen recorder"],"sub_categories":["Uncategorized","Gif Creation","OS X","命令行工具"],"readme":"![](ttygif.png)\n\n\u003e ttygif converts a ttyrec file into gif files.\n\u003e It's a stripped down version of ttyplay that screenshots every frame.\n\n## Demo\n\n![gif](http://i.imgur.com/nvEHTgn.gif)\n\n## Setup\n\n### Debian/Ubuntu\n``` sh\n$ sudo apt-get install imagemagick ttyrec gcc x11-apps make git\n$ git clone https://github.com/icholy/ttygif.git\n$ cd ttygif\n$ make\n$ sudo make install\n```\n\n### Fedora/CentOS/RHEL\n``` sh\n$ sudo dnf install ImageMagick gcc xorg-x11-apps\n$ # install ttyrec from source patched ~\u003e https://github.com/mattwilmott/ttyrec\n$ git clone https://github.com/icholy/ttygif.git\n$ cd ttygif\n$ make\n$ sudo make install\n```\n\n### OpenSUSE Leap\n```sh\n$ zypper addrepo http://download.opensuse.org/repositories/utilities/openSUSE_Leap_42.2/utilities.repo\n$ zypper refresh\n$ zypper install ttygif\n```\n\n### Arch Linux\n``` sh\n$ git clone https://aur.archlinux.org/ttyrec.git\n$ cd ttyrec\n$ makepkg -i\n$ cd ..\n$ git clone https://aur.archlinux.org/ttygif.git\n$ cd ttygif\n$ makepkg -is\n```\n\nWith yaourt installed:\n```sh\n$ yaourt -S ttyrec ttygif\n```\n\n### macOS\n``` sh\n$ brew install ttygif\n```\n\n## Usage:\n\n**1. Create ttyrec recording**\n\n``` sh\n$ ttyrec myrecording\n```\n\n* Hit CTRL-D or type `exit` when done recording.\n\n**2. Convert to gif**\n\n``` sh\n$ ttygif myrecording\n```\n\nOn OSX optionally you can set a -f flag which will bypass cropping which is needed for terminal apps which aren't full screen.\nBoth standard Terminal and iTerm apps are supported.\n\n``` sh\n$ ttygif myrecording -f\n```\n\n## Additional Notes\n\nIf you're getting `Error: WINDOWID environment variable was empty.`, then you need to manually set `WINDOWID`.\n\n``` sh\nexport WINDOWID=23068679\n```\n\nIf you're on Ubuntu, you can use `xdotool` to find the WINDOWID\n``` sh\n$ sudo apt-get install xdotool\n$ export WINDOWID=$(xdotool getwindowfocus)\n```\n\n## Debugging\n\nIf you're having issues, then export the `TTYGIF_DEBUG` env variable.\n\n``` sh\nexport TTYGIF_DEBUG=1\n```\n\nThis will print out all the commands it's trying to run.\n\n## Credits\n\nThe idea and approach was adapted from [tty2gif](https://bitbucket.org/antocuni/tty2gif)\n\n![](http://i.imgur.com/9et8daN.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficholy%2Fttygif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficholy%2Fttygif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficholy%2Fttygif/lists"}