A terminal session recorder and replayer written in C that allows you to capture and replay terminal sessions with precise timing.
- Record terminal sessions: Capture all terminal input/output with accurate timing information
- Replay sessions: Play back recorded sessions with original timing
- JSON format: Sessions are stored in a structured JSON format for easy parsing
- Signal handling: Graceful shutdown and file closure on interruption
- Lightweight: Minimal dependencies, written in pure C
- GCC compiler
- GNU Make
- Standard C library with GNU extensions
This will create the executable at build/rewindtty.
To clean build artifacts:
To start recording a terminal session:
This will create a new session file (defaults to data/session.json if no file is specified) and begin capturing all terminal activity.
To replay a previously recorded session:
This will read the session file (defaults to data/session.json if no file is specified) and replay it with the original timing.
Sessions are stored in JSON format in the data/session.json file. The format captures timing information and terminal data to enable accurate replay.
The recorder handles interruption signals (like Ctrl+C) gracefully by:
- Closing the session file properly
- Writing the final JSON structure
- Cleaning up resources before exit
The project uses the following GCC flags:
- -Wall -Wextra: Enable comprehensive warnings
- -std=gnu99: Use GNU C99 standard
- -g: Include debugging symbols
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Andrea Debernardi
- Uses standard POSIX system calls for terminal interaction
- Implements proper signal handling for clean shutdown
- JSON output format enables integration with other tools
- Minimal memory footprint and dependencies
.png)

