Skip to main content
trex
  1. Portfolio/

trex

·513 words·3 mins
Author
Vittorio Distefano
Turning complex tech into systems that actually work.

Interactive TUI
Fuzzy Finding
Vim Keybindings
Zero Config
Open Source

Screenshots
#


GitHub
#


Installation
#

Cargo Recommended
#

cargo install trex

The easiest way to install trex if you have Rust installed.

Binary Download
#

Download the latest release from GitHub:

# Download
curl -LO https://github.com/blackopsrepl/trex/releases/latest/download/trex-linux-x86_64.tar.gz

# Extract
tar -xzf trex-linux-x86_64.tar.gz

# Install
sudo mv trex /usr/local/bin/
Pre-built binaries are statically linked for universal Linux compatibility.

Build from Source
#

git clone https://github.com/blackopsrepl/trex
cd trex
cargo build --release

The binary will be at target/release/trex.


Quick Start
#

trex must be run from outside tmux. If you try to run it from within a tmux session, it will exit with an error message.
# Just run it
trex

That’s it. No configuration files needed.

Zsh Keybinding — Add this to your .zshrc to launch trex with Ctrl+T:

trex-widget() {
  zle push-input
  BUFFER="trex"
  zle accept-line
}
zle -N trex-widget
bindkey '^T' trex-widget

Features
#

  1. Session Management

    Core

    Browse & Control

    Create, attach, delete, and detach tmux sessions with simple keyboard shortcuts. Navigate with vim-like keybindings.
  2. Fuzzy Search

    Fast

    Powered by nucleo

    Quickly filter sessions and directories with fuzzy matching. The same algorithm used by popular fuzzy finders, optimized for speed.
  3. Directory Discovery

    Smart

    Filesystem Scan

    Discover directories across your filesystem with configurable depth (1-6 levels). Automatically prioritizes your current directory and common project locations.
  4. Smart Selection

    Context

    Auto-preselect

    Automatically preselects sessions matching your current working directory. First by exact path match, then by directory name.

Keybindings
#

Normal Mode
#

KeyAction
j / kNavigate down / up
g / GJump to first / last
EnterAttach to session
cCreate new session (directory mode)
dDelete selected session
DDelete all sessions
xDetach from selected session
XDetach all clients
/Enter filter mode
q / EscQuit

Directory Selection Mode
#

KeyAction
j / kNavigate directories
g / GJump to first / last
EnterCreate session in directory
TabComplete filter with path
+ / -Increase / decrease scan depth
EscCancel and return

Filter Mode
#

KeyAction
TypeFilter sessions/directories
BackspaceDelete character
EscExit filter mode

Architecture
#

graph TD
    subgraph CLI["trex CLI"]
        A[main.rs]
    end

    subgraph TUI["TUI Module"]
        B[app.rs
State & Logic] C[events.rs
Key Handling] D[ui.rs
Rendering] end subgraph TMUX["tmux Integration"] E[commands.rs
TmuxClient] F[parser.rs
Session Parser] G[session.rs
TmuxSession] end subgraph DISCO["Directory Discovery"] H[directory.rs
Filesystem Scan] end A --> B A --> E A --> H B --> C B --> D B -.-> |nucleo| I[Fuzzy Matching] E --> F E --> G D -.-> |ratatui| J[Terminal UI] D -.-> |crossterm| K[Raw Mode]

Highlights
#

Single binary, zero config — Just run trex and start managing sessions. No configuration files, no setup, no dependencies.
Blazingly fast — Written in Rust with the nucleo fuzzy matching library. Handles thousands of directories instantly.
Static builds — Pre-built binaries are statically linked for universal Linux compatibility. No runtime dependencies.

Tech Stack
#

Rust
ratatui
crossterm
nucleo
anyhow
thiserror

Links#

View on GitHub Download Releases crates.io