RewindTTY is a terminal session recorder and replayer developed in C, allowing for accurate capture and playback of terminal activity. With minimal dependencies and structured JSON session storage, it provides features such as precise timing, signal handling for graceful shutdowns, and an easy-to-use command line interface to enhance productivity and streamline workflows.
RewindTTY is a terminal session recorder and replayer, meticulously built in C to enable accurate capture and playback of terminal activities. With RewindTTY, users can record their terminal input and output, preserving the exact timing of events for precise replay.
Initiate recording a terminal session by executing the following command:
./build/rewindtty record [file]
This creates a new session file, defaulting to data/session.json if no filename is specified, and begins capturing terminal activity.
To replay any previously recorded session, use:
./build/rewindtty replay [file]
This command reads from the specified session file and replays it, maintaining the original timing.
Usage: rewindtty [record|replay] [file]
Commands:
record [file] Start recording a new terminal session to the specified file (default: data/session.json)
replay [file] Replay a recorded session from the specified file (default: data/session.json)
The repository contains a well-organized file structure that enhances maintainability:
rewindtty/
├── src/ # Source code directory
│ ├── main.c # Main program entry point
│ ├── recorder.c # Session recording functionality
│ ├── recorder.h # Recording function declarations
│ ├── replayer.c # Session replay functionality
│ ├── replayer.h # Replay function declarations
│ ├── utils.c # Utility functions
│ └── utils.h # Utility function declarations
├── data/ # Data directory for session files
│ └── session.json # Default session storage file
├── build/ # Build output directory
├── assets/ # Directory for assets like demo files
├── Makefile # Build configuration file
└── README.md # Project documentation
Sessions are saved in JSON format within data/session.json, capturing both timing and terminal data for faithful replay.
RewindTTY implements robust signal handling, ensuring that session files are properly closed and resources are cleaned up when interrupted.
The project utilizes the following compiler flags for improved safety and debugging:
-Wall -Wextra: Enable all compiler warnings.-std=gnu99: Comply with the GNU C99 standards.-g: Include debugging symbols for development purposes.Contributions are welcome: fork the repository, create a feature branch, implement changes, test extensively, and submit a pull request.
No comments yet.
Sign in to be the first to comment.