Skip to content

jongio/grut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

226 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

grüt

CI Go Report Card Go Reference License: MIT Go Version Platform

A reactive terminal UI for Git and GitHub where every panel talks to every other panel.

grüt Explorer layout with file tree, git info, and syntax-highlighted preview

Why grut?

Files, Git, GitHub, and preview — all in one terminal, all aware of each other. Pick a branch and the file tree, commits, and preview update. Pick a file and commits filter to its history. Pick a PR and three panels reconfigure at once. No switching tools, no refreshing.

Features

Reactive Panels

  • Context-Aware — Panels react to your selections. Select a branch, file, worktree, remote, stash, or PR and every other panel updates to match.
  • Commit-Files Mode — Enter on a commit shows only that commit's changed files in the tree. Escape restores.
  • PR Triple-Sync — Select a PR and file tree, commits, and preview all update simultaneously.
  • Git Filterg cycles through three modes: all files → git-changed → branch diff. Preview switches to diff mode automatically.

Files

  • File Explorer — Navigate your project with git status markers, Nerd Font icons, create/rename/delete
  • Fuzzy Finder/ for instant file search
  • Syntax Highlighting — 100+ languages via Chroma
  • Preview — Adapts to show file content, issue/PR bodies, workflow details, or diffs depending on selection. Press f to toggle between file-on-disk and contextual diff view. Click and drag to select text, y to copy.
  • Inline Editor — Press e in the preview panel to edit files directly. Ctrl+S saves, Escape discards.

Git

  • Status & Staging — Stage, unstage, discard with single keystrokes. Partial staging for individual hunks and lines.
  • Branches, Worktrees, Stash, Tags, Remotes, Reflog — Each as a dedicated tab with full CRUD operations.
  • Diff — Inline and side-by-side modes with hunk navigation.
  • Log — Commit graph with ASCII visualization.
  • Merge, Rebase, Blame, Bisect, Undo/Redo — Complete git workflow without leaving the terminal.

GitHub

  • Issues, Pull Requests, Actions, Workflows, Releases — Each as a tab with filters and preview integration.
  • Merge PRs — Merge pull requests with merge commit, squash, or rebase strategies and optional branch cleanup.
  • Workflow Dispatch — Trigger CI/CD workflows with parameters from the TUI.

AI Chat

  • Built-in chat powered by GitHub Copilot — read/write files, run git commands, search code, interact with issues and PRs.
  • AI-powered commit messages, conflict resolution, code review, and PR descriptions.
  • Collapsed, expanded, and full-screen overlay modes.

Interface

  • Themes — Default, Catppuccin, Tokyo Night, Gruvbox, plus custom TOML themes.
  • Session Persistence — Saves and restores layout on restart.
  • Self-Updategrut update upgrades in-place.

See the Roadmap for what's coming next.

Screenshots

AI Chat

AI chat overlay with search results and code analysis

Git Info

Git info panel with branches, tags, remotes, and stash tabs

Git Diff

Inline diff view with syntax-highlighted additions and deletions

Git Branches

Branch management panel with local and remote branches

Git Log

Git log with commit graph visualization

Fuzzy Finder

Fuzzy file finder overlay for quick navigation

File Explorer & Preview

File explorer with syntax-highlighted preview
Themes

Default

Default theme

Catppuccin

Catppuccin theme

Tokyo Night

Tokyo Night theme

Gruvbox

Gruvbox theme

Installation

Shell script (Linux / macOS)

curl -fsSL https://raw.githubusercontent.com/jongio/grut/main/install.sh | sh

To install a specific version:

curl -fsSL https://raw.githubusercontent.com/jongio/grut/main/install.sh | sh -s -- v0.1.0

PowerShell script (Windows)

irm https://raw.githubusercontent.com/jongio/grut/main/install.ps1 | iex

To install a specific version:

$v="v0.1.0"; irm https://raw.githubusercontent.com/jongio/grut/main/install.ps1 | iex

Go Install

go install github.com/jongio/grut@latest

Binary Download

Download from GitHub Releases.

Updating

grut update  # Downloads and installs the latest release

Quick Start

grut              # Launch file explorer in current directory
grut /path/to/dir # Open specific directory
grut update       # Update grut to the latest release
grut version      # Print the version

CLI Flags

Flag Description
--help, -h Show usage information
--version, -v Print the version and exit
--demo Launch with a demo project to explore grut
--no-ai Disable AI features for this session
--cpu-profile FILE Write CPU profile to FILE (dev/debug)
--mem-profile FILE Write memory profile to FILE (dev/debug)
--pprof PORT Start pprof server on localhost:PORT (dev/debug)
--reset-welcome Reset first-run state so the welcome screen shows on next launch

A background update check runs on every launch and notifies you when a new version is available.

Nerd Font Icons

grüt displays file-type icons using Nerd Font glyphs. For the best experience, install a Nerd Font (e.g. 0xProto, FiraCode, JetBrainsMono) and configure your terminal to use it.

When icon_mode is set to "auto" (the default), grüt detects known nerd-font-capable terminals (WezTerm, kitty, Alacritty, iTerm, Ghostty, Windows Terminal, etc.) and enables icons automatically. You can also force it:

# ~/.config/grut/config.toml
[file_tree]
icon_mode = "nerd"   # always use nerd font icons
# icon_mode = "ascii" # always use plain ASCII

Or set the environment variable GRUT_NERD_FONT=1 to enable nerd icons in any terminal.

Keybindings

See docs/keybindings.md for the complete reference.

Key Action
j / k Navigate up/down
h / l Collapse/expand
Enter Open/select
15 Focus panel (File Tree, Git Info, GitHub, Commits, Preview)
/ Fuzzy finder
? Help overlay
R Refresh all data + preview
F Fetch all remotes
P Push
s Stage file
x Delete / cancel
g Cycle filter: all → git changed → branch diff
e Edit file inline (in preview panel)

Configuration

Config file: ~/.config/grut/config.toml (Linux/macOS) or %APPDATA%\grut\config.toml (Windows)

See docs/configuration.md for all options.

Building from Source

git clone https://github.com/jongio/grut.git
cd grut
go build -o grut .
./grut

Or with Mage:

mage build

Development

grut uses Mage for development workflows:

mage install    # Run tests, build bin/grut-dev, add to PATH (default target)
mage test       # Run all unit tests
mage preflight  # Pre-commit checks: fmt, tidy, vet, build, test, vulncheck
mage vet        # Run go vet
mage lint       # Run golangci-lint (falls back to go vet)
mage fmt        # Format all Go source files
mage clean      # Remove bin/ directory

You can also use standard Go commands directly:

go build ./...   # Build all packages
go test ./...    # Run all tests
go vet ./...     # Vet all packages

Tech Stack

  • Go 1.26.3 + Bubble Tea v2 (TUI) + Lipgloss v2 (styling) + Bubbles v2 (widgets)
  • Chroma v2 (syntax highlighting) + Glamour (markdown rendering)
  • fsnotify (filesystem watching) + mimetype (file type detection)
  • TOML configuration via go-toml/v2
  • Cobra CLI framework

License

MIT

About

A terminal file explorer with full Git and GitHub integration, AI chat, and reactive panels that stay in sync as you navigate.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors