A terminal-first git manager written in Rust.
Fast CLI commands when you want precision. A TUI when you want the workflow in one place.
Features · Quick Start · Commands · Development
gitrex brings common git workflows into a focused terminal experience.
- Defaults to a TUI in interactive terminals
- Falls back to CLI behavior for scripts and pipes
- Uses an embedded libgit2 backend, so it does not depend on the
gitbinary being installed - Covers core repository operations: status, branch inspection, log review, checkout, switch, branch creation, clone, pull, and push
- TUI includes a branch panel plus a wide
Git Graphpanel with tree lines, commit navigation, and commit actions
| Workflow | What you get |
|---|---|
| Repository status | Branch, upstream, divergence, and working tree changes |
| Branch management | List branches, checkout, switch, and create branches from another ref |
| Commit history | Compact log output with configurable limits |
| Git graph | Full commit tree, commit selection, rotating selected subject text, and commit actions |
| Remote operations | Clone, pull, and push from the same CLI |
| TUI mode | A terminal UI for working inside the repo without leaving the keyboard |
cargo build --releasecargo run -- tui1/2/3switch between status, branches, and graphj/kor arrow keys move within the active panel- In
Branches,Enteropens branch actions - In
Git Graph,Enteropens commit actions for the hovered commit - The selected commit subject scrolls when it does not fit, while date and hash stay aligned
gitrex status
gitrex branch
gitrex log --limit 20| Command | Description |
|---|---|
gitrex |
Launches the TUI in interactive terminals |
gitrex status |
Prints the current branch, upstream, divergence, and working tree state |
gitrex branch |
Lists local branches and upstream tracking refs |
gitrex log --limit <n> |
Shows recent commits, defaulting to 20 |
gitrex checkout <target> |
Checks out an existing branch or ref |
gitrex switch <target> |
Switches to a branch |
gitrex create-branch <name> --from <target> |
Creates a new branch, optionally from another ref |
gitrex clone <repository> [directory] |
Clones a repository to an optional destination |
gitrex pull [remote] [branch] |
Pulls updates from a remote and branch |
gitrex push [remote] [branch] |
Pushes commits to a remote and branch |
gitrex tui |
Opens the TUI explicitly |
branch: main
upstream: origin/main
working tree: clean
* main -> origin/main
feature/login
release
flowchart TD
A[User opens gitrex] --> B{Interactive terminal?}
B -- yes --> C[TUI]
B -- no --> D[CLI command]
C --> E[Status / Branch / Log / Remote actions]
D --> E
cargo buildcargo test- Repository rules live in CONTEXT.md
- Format guidance lives in CONTEXT-FORMAT.md
- Rust 2021
clapfor CLI parsingcrosstermfor terminal controlgit2for the embedded Git backendchronofor date formattingratatuifor the TUIanyhowandthiserrorfor error handling
No license file is present in this repository yet.