SkillAgentSearch skills...

Trex

A Terminal app for RegEx visualization, :t-rex: roar!

Install / Use

/learn @samyakbardiya/Trex

README

<!-- markdownlint-disable MD033 --> <!-- marksman:disable MD033 -->

TReX :t-rex:

<!-- markdownlint-disable MD013 --> <p> <a href="https://github.com/samyakbardiya/trex/releases"><img src="https://img.shields.io/github/v/release/samyakbardiya/trex" alt="GitHub Release"></a> <a href="https://pkg.go.dev/github.com/samyakbardiya/trex"><img src="https://pkg.go.dev/badge/github.com/samyakbardiya/trex.svg" alt="Go Reference"></a> <a href="https://goreportcard.com/report/github.com/samyakbardiya/trex"><img src="https://goreportcard.com/badge/github.com/samyakbardiya/trex" alt="Go Report Card"></a> <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a> </p> <!-- markdownlint-enable MD013 -->

TReX is a terminal-based tool for writing, visualizing, and testing Regular Expressions. Designed for efficiency, it provides a keyboard-driven interface for rapid feedback on your regex experiments—all within your terminal.

asciicast

<!-- markdownlint-disable MD004 --> <!-- markdownlint-disable MD007 --> <!-- toc --> <!-- tocstop --> <!-- markdownlint-enable MD004 --> <!-- markdownlint-enable MD007 -->

Why TReX?

xkcd comic about Regular Expressions

Sometimes you just want to quickly test out a regex without switching between multiple browser tabs or online tools. TReX lets you see how your regex interacts with your text in real time—all within your terminal.

  • Quick feedback: Validate and debug regex patterns instantly.
  • Integrated testing: Load files and experiment with regex combinations.
  • Efficient workflow: Stay in your terminal and keep your focus on writing code.

Okay, but why "TReX"?

TReX, is a playful fusion of TUI and RegEx. The T comes from TUI, while ReX from RegEx, hence TReX :t-rex:. Roar!

Features

  • Written in Go: Fast and portable.
  • External file loading: Test regex patterns against real-world data.
  • Keyboard-driven interface: Navigate without the need for a mouse.
  • Mouse support: For users who prefer it or need it.

Installation

  • Install from Go Package Reference:

    go install github.com/samyakbardiya/trex@latest
    
<details> <summary>OR from the source</summary>

From the source

  • Clone the repository:

    git clone https://github.com/samyakbardiya/trex.git
    cd trex
    
  • Build the application:

    go install
    go build
    
    • Optionally, you can copy the binary to your PATH:

      cp ./trex ~/.local/bin
      
  • Verify the installation:

    ./trex --version
    
</details>

Usage

  • Start TReX:

    trex
    
  • Load a file into TReX:

    trex file.txt
    
  • Advanced usage: Check out the help flag for more commands:

    trex --help
    

Roadmap

  • [ ] Editable Text Area: Replace the read-only view with an editable interface.
  • [ ] Local History: Implement local history similar to shell history, navigable with arrow keys.
  • [ ] Syntax Highlighting: Add syntax highlighting for the RegEx input.
  • [ ] Toggleable Flags: Implement quick toggling for RegEx flags, such as:
    • g (global)
    • m (multi-line)
    • i (case-insensitive)
    • U (ungreedy)

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests. For major changes, please open an issue first to discuss what you'd like to change.

Implementation

Developed in Go, TReX leverages:


<p align="center"> Made during <a href="https://fossunited.org/fosshack/2025">FOSS HACK 2025</a> in India :india: </p> <p align="center"> <sup> By <a href="https://links.samyakbardiya.dev">Samyak Bardiya</a> &amp; <a href="https://github.com/mitalrs">Mital Sapkale</a> </sup> </p>
View on GitHub
GitHub Stars131
CategoryDevelopment
Updated4d ago
Forks3

Languages

Go

Security Score

100/100

Audited on Apr 4, 2026

No findings