Tracelyn is a CLI tool that records terminal sessions to clean plain text files. It creates a transparent sub-shell using PTY (pseudo-terminal) that captures all commands and outputs without interfering with your workflow.
- Transparent Recording: Creates an invisible sub-shell that records everything
- Clean Output: Uses virtual terminal emulation to extract clean text (no ANSI codes)
- Multiple Sessions: Support for concurrent recording sessions
- Session Management: Track, list, stop, and remove sessions easily
- Merge Sessions: Combine multiple session recordings chronologically
- Zero Configuration: Works out of the box with your existing shell setup
brew tap lemachegabriel/tap
brew install tracelyn# Add repository (first time only)
echo "deb [trusted=yes] https://apt.fury.io/lemachegabriel/ /" | sudo tee /etc/apt/sources.list.d/tracelyn.list
sudo apt update
sudo apt install tracelynDownload the latest release from the releases page and extract it to a directory in your $PATH.
git clone https://github.com/lemachegabriel/tracelyn.git
cd tracelyn
go build -o tracelyn .
sudo mv tracelyn /usr/local/bin/Start a new terminal session recording:
tracelyn recordThis will start a transparent sub-shell. All your commands and outputs will be recorded to a plain text file in ~/.tracelyn/sessions/.
Exit the recording session by typing exit or pressing Ctrl+D, or stop it from another terminal:
tracelyn stop [session-id]View all sessions (active and completed):
tracelyn listRemove a completed session:
tracelyn remove <session-id>Remove all completed sessions:
tracelyn remove --allMerge multiple session recordings chronologically:
tracelyn merge <id1> <id2> <id3> -o output.txtTracelyn creates a transparent sub-shell that:
- Uses your default shell (
$SHELL) with your configuration - Inherits your environment variables and working directory
- Captures all I/O through a PTY (pseudo-terminal)
- Processes ANSI escape sequences using a virtual terminal emulator
- Extracts clean, readable text without control codes
- Saves everything to plain text files
- Location:
~/.tracelyn/sessions/ - Format:
session_YYYYMMDD_HHMMSS.txt - Registry:
~/.tracelyn/sessions.json
tracelyn record
make build
make test
exit # Stop recording# Terminal 1
tracelyn record # Creates session 1
# ... do some work ...
exit
# Terminal 2
tracelyn record # Creates session 2
# ... do more work ...
exit
# Merge sessions
tracelyn merge 1 2 -o complete-workflow.txt- Go 1.25.1 or higher
go build -o tracelyn .go test ./...Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.
Gabriel Lemache