termgif
A simple and lightweight static GIF generator!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
📖 Table of Contents
🎬 About The Project
"Creating clean, visually appealing demo screenshots for command-line tutorials can often be a tedious hassle—working with asciinema and ffmpeg involves a convoluted workflow. In reality, however, simply feeding it an API will resolve all such issues."
termgif is a cross-platform lightweight terminal GIF recorder for Windows, macOS and Linux. It captures live terminal command execution via pixel recording and exports directly to an animated GIF.
The goal is simple: create clean, shareable command-line demo GIFs with minimal dependencies.
Main flow:
- 🎥 Record: Launch target terminal commands, capture live screen frames (platform-aware window/region capture)
- 🔄 Stream: Continuously collect pixel frames while the command runs
- 🧩 Generate: Encode frames and export a final animated GIF on Ctrl+C
📸 Screenshot
🛠️ Built With
🚀 Getting Started
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
✅ Prerequisites
This is an example of how to list things you need to use the software and how to install them.
- Hatch (if exists)
# print all dependencies hatch dep show # print dependencies on group dep hatch dep show dev
See pyproject.toml for complete content.
📦 Installation
Install with PIP:
# Don't use termgif, it's registered; use term2gif instead.
pip install term2gif
💡 Usage
import os
import subprocess as sp
import termgif
GIF_PATH: str = f"{os.path.dirname(__file__)}/dist.gif"
termgif.make_gif(
'cmd /c "echo hello world!"', GIF_PATH # Specify the command to execute.
)
_ = sp.run([GIF_PATH], shell=True) # Open it with the default program.
For more examples, please refer to the Documentation or Examples
🗺️ Roadmap
- v0.1.0: Basic recording for Windows
- v0.2.0:
- Support for macOS and Linux
- Support for recording live inputting text on console (
stdin) - Support recording live console (with echo and color)
See the open issues for a full list of proposed features (and known issues).
🤝 Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
🌟 Top contributors:
📃 License
Distributed under the project_license. See LICENSE for more information.
📬 Contact
Nicola Grey - popxh@outlook.com
Project Link: https://github.com/FishgameStudio/termgif
🙏 Acknowledgments
Metadata
Release files for term2gif 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| term2gif-0.2.2.tar.gz | 14.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| term2gif-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.8 kB
Release files / term2gif-0.2.2.tar.gz
| Download URL | term2gif-0.2.2.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e801cc6aa273f5157985758e1e7e2031d6068d43ab570fc5d15ed1c7d0191cf
|
|
BLAKE2b-256 checksum How to use checksums |
ffab4db8deb058576803cd00ea202d91f0446f8d35a74be0596397d0af16a012
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / term2gif-0.2.2-py3-none-any.whl
| Download URL | term2gif-0.2.2-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92e45026d7e4149cb57c47cc8ef8d2a97f13aa9e540495d5f8dcf23ac28a5669
|
|
BLAKE2b-256 checksum How to use checksums |
a8b3b784b8b94b0c76271ebb6a7f00e82e56e712ea4a1c428aa322028612be7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|