gitsmith: A Terminal UI for Both GitLab and GitHub
DEV Community

gitsmith: A Terminal UI for Both GitLab and GitHub

I keep one foot in GitLab and the other in GitHub. Both have solid CLIs - glab and gh - but when I need to scan a list of merge requests, check a failing pipeline, read a diff, and approve something, that's four commands, four walls of JSON, four context switches. The web UI works, but it's slow, and I lose my terminal flow every time I reach for it. I wanted one screen where I could do all of it with a keyboard. So I built gitsmith. What it does gitsmith is a terminal UI that wraps glab and gh . Run it inside any git repo and it auto-detects the host from your remote. Run it outside a repo and it asks which forge to use, lists your projects, and drops you in. There are 11 tabs - Issues, MRs/PRs, Pipelines, Runners, Releases, Tags, Branches, Commits, Todos, Milestones, Members - and every state is listed. Closed issues show up below open ones, so you can reopen something without opening a browser. Protected branches sit above the rest. The tab bar is reorderable, and you can hide tabs you don't use. Side-by-side diffs This is where I spent the most time. gitsmith renders syntax-highlighted side-by-side diffs using syntect, with line numbers, a sticky file header, and a file list that follows your scroll. Press v on any MR or Enter on a commit. [ and ] jump between files. The whole thing runs in the terminal - no browser, no latency. Pipeline drill-down Enter a pipeline to see its jobs. Enter a job to get its live-tailing ANSI log with severity coloring - ERROR lines in red, WARN in yellow, timestamps dimmed, and the CI's own ANSI colors passed through untouched. It follows the latest output like GitLab's trace view. Bridge jobs drill into downstream pipelines automatically. Actions, not just views gitsmith isn't read-only: - Approve, merge, and close MRs/PRs - Close, reopen, and comment on issues (opens $EDITOR for the comment body) - Retry or cancel pipelines and individual jobs - Create new MRs/PRs, issues, pipelines, and tags - Add members with a role picker All destructive actions are behind a [y/n] confirm. Zero auth setup gitsmith shells out to glab and gh , so it uses your existing authentication. No tokens to configure, no OAuth flows. If you've already run glab auth login or gh auth login , you're set. It reads the config files of both CLIs directly - glab 's config.yml and gh 's hosts.yml - checking $GLAB_CONFIG_DIR , $XDG_CONFIG_HOME , ~/.config , and platform-specific paths. Only host names are read; tokens in those files are never touched. Multi-host, multi-instance Press S to switch between GitLab and GitHub (or between self-hosted instances) without restarting. Press P to fuzzy-search your repos on the current host. Every configured instance from both CLIs is offered instantly. Under the hood gitsmith is written in Rust, about 10,500 lines across a handful of focused modules. The UI is built with ratatui, and syntax highlighting uses syntect with the pure-Rust regex backend so cargo install needs no C toolchain. Lists pull 100 rows per page and keep fetching in the background (up to 500) while you read, so you don't hit the API's default 20-30 row ceiling. Nine built-in themes - Neon, Tokyo Night, Gruvbox, Rose Pine, Catppuccin, Nord, Dracula, Solarized, Everforest - press t to pick one with a live preview. Get started Quick install on macOS or Linux: curl -fsSL https://raw.githubusercontent.com/suraj16thjan/gitsmith/main/install.sh | bash Or via Cargo: cargo install gitsmith --locked Requirements: glab authenticated for GitLab repos, and/or gh authenticated for GitHub repos. gitsmith is MIT-licensed and open source. Contributions, bug reports, and feature ideas are welcome. suraj16thjan / gitsmith Terminal UI for GitLab & GitHub: issues, MRs/PRs, pipelines, live job logs, diffs, and a fuzzy repo switcher - one keyboard-driven interface over glab & gh. gitsmith A fast terminal UI for GitLab and GitHub, built with ratatui . gitsmith wraps the official glab and gh CLIs and auto-detects which one to use from your git remote - one keyboard-driven interface for issues, merge/pull requests, pipelines, jobs, logs, diffs, and more. Installation Quick install (macOS / Linux) curl -fsSL https://raw.githubusercontent.com/suraj16thjan/gitsmith/main/install.sh | bash Downloads the prebuilt binary for your platform from the latest GitHub release and installs it to ~/.local/bin (or /usr/local/bin when writable). Pin a version with GITSMITH_VERSION=v0.2.2 or change the target with GITSMITH_BIN_DIR=~/bin . No Rust toolchain required. From crates.io cargo install gitsmith --locked From source git clone https://github.com/suraj16thjan/gitsmith cd gitsmith cargo install --path . --locked # installs the gitsmith binary to ~/.cargo/bin Or just run it in place without installing: cargo run --release Top comments (0)

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.