Skip to content

lemachegabriel/tracelyn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tracelyn

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.

Features

  • 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

Installation

Homebrew (macOS/Linux)

brew tap lemachegabriel/tap
brew install tracelyn

APT (Debian/Ubuntu)

# 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 tracelyn

Manual Installation

Download the latest release from the releases page and extract it to a directory in your $PATH.

From Source

git clone https://github.com/lemachegabriel/tracelyn.git
cd tracelyn
go build -o tracelyn .
sudo mv tracelyn /usr/local/bin/

Usage

Start Recording

Start a new terminal session recording:

tracelyn record

This will start a transparent sub-shell. All your commands and outputs will be recorded to a plain text file in ~/.tracelyn/sessions/.

Stop Recording

Exit the recording session by typing exit or pressing Ctrl+D, or stop it from another terminal:

tracelyn stop [session-id]

List Sessions

View all sessions (active and completed):

tracelyn list

Remove Sessions

Remove a completed session:

tracelyn remove <session-id>

Remove all completed sessions:

tracelyn remove --all

Merge Sessions

Merge multiple session recordings chronologically:

tracelyn merge <id1> <id2> <id3> -o output.txt

How It Works

Tracelyn creates a transparent sub-shell that:

  1. Uses your default shell ($SHELL) with your configuration
  2. Inherits your environment variables and working directory
  3. Captures all I/O through a PTY (pseudo-terminal)
  4. Processes ANSI escape sequences using a virtual terminal emulator
  5. Extracts clean, readable text without control codes
  6. Saves everything to plain text files

Session Files

  • Location: ~/.tracelyn/sessions/
  • Format: session_YYYYMMDD_HHMMSS.txt
  • Registry: ~/.tracelyn/sessions.json

Examples

Record a build process

tracelyn record
make build
make test
exit  # Stop recording

Record and merge multiple sessions

# 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

Development

Requirements

  • Go 1.25.1 or higher

Build

go build -o tracelyn .

Run Tests

go test ./...

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE for details.

Author

Gabriel Lemache

Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages