| Crates.io | seqsee |
| lib.rs | seqsee |
| version | 0.1.0 |
| created_at | 2025-03-19 12:50:45.849209+00 |
| updated_at | 2025-03-19 12:50:45.849209+00 |
| description | A tool for parsing and displaying ANSI escape sequences in a human-readable format |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1597968 |
| size | 58,254 |
Human-readable ANSI sequences for Rust.
Seqsee is a specialized command-line tool designed to demystify ANSI escape sequences. It helps developers debug terminal-based applications by translating cryptic control codes into human-readable explanations. Whether you're troubleshooting cursor positioning issues, color rendering problems, or trying to understand how terminal applications manipulate the display, Seqsee provides clarity by revealing what's happening beneath the surface of your terminal.
# Clone the repository
git clone https://github.com/KirillFurtikov/seqsee.git
cd seqsee
# Build the project
cargo build --release
# Install the binary
cargo install --path .
Just use printf to send some sequences to seqsee for an explanation:
printf "\x1b[36mRust\x1b[1;4m is \x1b[41m awesome\x1b[0m\r\n\b" | seqsee
This will output a detailed breakdown of each ANSI sequence:
Type Esc Desc
CSI \x1b[36m Set mode: Foreground color: 6
Text Rust Rust
CSI \x1b[1;4m Set mode: Bold, Underline
Text is is
CSI \x1b[41m Set mode: Background color: 1
Text awesome awesome
CSI \x1b[0m Set mode: Reset all
Ctrl \r Carriage return
Ctrl \n Line feed (new line)
Ctrl \b Backspace
You can parse files containing ANSI escape sequences:
seqsee -f test_ansi.txt
For example, with a file containing:
\e[38;5;208mWarning:\e[0m \e[3mSystem\e[0m \e[4;32mstatus\e[0m: \e[1;5;33mCRITICAL\e[0m\nCursor demo: \e[3A\e[5Cā here\e[3B\e[8Cā there
Seqsee will parse both the actual escape sequences and also the literal \e escape notations.
Many commands use ANSI sequences for colorized output. You can analyze them with seqsee:
ls --color=always | seqsee
git -c color.status=always status | seqsee
Note: Many programs disable colored output when piping. Use flags like --color=always to force them to include ANSI sequences.
For a cleaner view of the text with highlighted sequences:
ls --color=always | seqsee --raw
Seqsee supports parsing and explaining a wide range of ANSI escape sequences:
seqsee/
āāā src/
ā āāā ansi/ # ANSI sequence definitions
ā ā āāā csi.rs # CSI (Control Sequence Introducer) commands
ā ā āāā ctrl.rs # Control characters
ā ā āāā mod.rs # Module definitions
ā āāā output/ # Output formatting
ā ā āāā raw.rs # Raw output formatter
ā ā āāā table.rs # Table output formatter
ā ā āāā mod.rs # Module definitions
ā āāā parser.rs # ANSI sequence parser
ā āāā formatter.rs # Formatter trait
ā āāā main.rs # CLI application
āāā test_ansi.txt # Example ANSI test file
Contributions are welcome! Here are some ways you can contribute:
This project is licensed under the MIT License.