Top Related Projects
Quick Overview
GRV (Git Repository Viewer) is a terminal interface for viewing git repositories. It allows users to view commits, diffs, and browse the repository tree, all within a terminal environment. GRV aims to provide a more user-friendly and feature-rich alternative to command-line git tools.
Pros
- Intuitive terminal-based interface for navigating git repositories
- Customizable key bindings and color schemes
- Supports multiple views (commits, diffs, tree) with easy switching
- Lightweight and fast, even for large repositories
Cons
- Limited platform support (primarily Linux and macOS)
- Steeper learning curve compared to GUI git clients
- Less frequent updates and maintenance
- Some advanced git features may not be supported
Getting Started
To install GRV on macOS using Homebrew:
brew install grv
For Linux, download the latest release from the GitHub repository and install it:
wget https://github.com/rgburke/grv/releases/download/v0.3.2/grv_v0.3.2_linux64
chmod +x grv_v0.3.2_linux64
sudo mv grv_v0.3.2_linux64 /usr/local/bin/grv
To start using GRV, navigate to a git repository in your terminal and run:
grv
Use the arrow keys to navigate, press 'q' to quit, and '?' for help.
Competitor Comparisons
simple terminal UI for git commands
Pros of lazygit
- More actively maintained with frequent updates and bug fixes
- User-friendly interface with intuitive keybindings and menu-driven navigation
- Supports interactive rebase and other advanced Git operations
Cons of lazygit
- Less customizable compared to grv's extensive configuration options
- May have a steeper learning curve for users familiar with traditional Git CLI
Code Comparison
lazygit:
func (gui *Gui) handleCommitConfirm(g *gocui.Gui, v *gocui.View) error {
message := gui.trimmedContent(v)
if message == "" {
return gui.createErrorPanel(gui.Tr.SLocalize("CommitWithoutMessageErr"))
}
return gui.handleCommitSubmit(message)
}
grv:
bool CommitView::DoAction(Action action) {
switch (action) {
case ActionCommit:
return DoCommit();
case ActionCommitAmend:
return DoAmendCommit();
default:
return false;
}
}
Both projects aim to provide a terminal-based interface for Git operations, but they differ in their approach and implementation. lazygit focuses on ease of use and modern Git workflows, while grv offers more customization options and a traditional Git-like interface. The code snippets demonstrate the different programming languages used (Go for lazygit and C++ for grv) and their approaches to handling commit actions.
Blazing 💥 fast terminal-ui for git written in rust 🦀
Pros of gitui
- Written in Rust, offering better performance and memory safety
- More actively maintained with frequent updates and bug fixes
- Cleaner and more modern user interface
Cons of gitui
- Fewer advanced features compared to grv
- Less customizable in terms of keybindings and appearance
Code comparison
grv (Go):
func (grvView *GRVView) OnActiveChange(active bool) {
grvView.lock.Lock()
defer grvView.lock.Unlock()
grvView.active = active
}
gitui (Rust):
pub fn draw<B: Backend>(&self, f: &mut Frame<B>, area: Rect) -> Result<()> {
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints([Constraint::Length(2), Constraint::Min(0)].as_ref())
.split(area);
self.draw_title(f, chunks[0])?;
self.draw_files(f, chunks[1])?;
Ok(())
}
The code snippets showcase the different programming languages used in each project. grv is written in Go, while gitui is implemented in Rust. The gitui code demonstrates a more modern approach to UI rendering, utilizing a layout system for organizing elements.
Text-mode interface for git
Pros of tig
- Lightweight and fast, with minimal resource usage
- Extensive keyboard shortcuts for efficient navigation
- Stable and mature project with a large user base
Cons of tig
- Limited customization options compared to grv
- Less visually appealing interface
- Lacks some advanced features like side-by-side diff view
Code comparison
tig:
void main_view_draw(struct view *view)
{
struct line *line;
int lineno;
foreach_view_line(view, line, lineno) {
draw_line(view, line, lineno);
}
}
grv:
func (mainView *MainView) Draw(win RenderWindow) (err error) {
mainView.lock.Lock()
defer mainView.lock.Unlock()
for _, childView := range mainView.childViews {
if err = childView.Draw(win); err != nil {
return
}
}
return
}
The code snippets show the main drawing functions for both projects. tig uses C and has a more straightforward approach, while grv uses Go and implements a more object-oriented structure with error handling.
manage your git repositories in one place
Pros of gitbatch
- Written in Go, potentially offering better performance and cross-platform compatibility
- Focuses specifically on batch operations for multiple Git repositories
- Provides a more modern and user-friendly terminal UI
Cons of gitbatch
- Less comprehensive Git functionality compared to grv
- Limited to batch operations, may not be suitable for in-depth repository exploration
- Newer project with potentially less stability and community support
Code Comparison
grv:
func (repoView *RepoView) OnActiveChange(active bool) {
repoView.lock.Lock()
defer repoView.lock.Unlock()
repoView.active = active
}
gitbatch:
func (m *Model) handleKeyPress(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
switch msg.String() {
case "q", "ctrl+c":
return m, tea.Quit
}
return m, nil
}
Summary
grv is a more comprehensive Git repository viewer with advanced features, while gitbatch focuses on efficient batch operations for multiple repositories. grv offers a wider range of Git-related functionalities but may have a steeper learning curve. gitbatch provides a more streamlined experience for managing multiple repositories simultaneously but with limited in-depth exploration capabilities. The choice between the two depends on the specific use case and user preferences.
From git log to SemVer in no time
Pros of GitVersion
- Focuses on semantic versioning and version management for Git repositories
- Provides automated versioning based on Git history and branching patterns
- Integrates well with CI/CD pipelines and build systems
Cons of GitVersion
- Limited to version management functionality
- May require additional configuration for complex versioning scenarios
- Does not provide repository visualization or browsing capabilities
Code Comparison
GitVersion configuration example:
mode: ContinuousDelivery
branches:
main:
regex: ^master$|^main$
mode: ContinuousDelivery
tag: ''
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
tracks-release-branches: false
is-release-branch: false
grv does not have a direct code comparison as it's a terminal UI application for Git repository visualization. It doesn't use configuration files in the same way as GitVersion.
Summary
GitVersion is a specialized tool for managing version numbers in Git repositories, while grv is a terminal-based interface for browsing and visualizing Git repositories. GitVersion excels in automating version management, particularly in CI/CD environments, but lacks the comprehensive repository browsing features of grv. On the other hand, grv provides a rich, interactive experience for exploring Git repositories but doesn't offer the versioning capabilities of GitVersion.
GitHub’s official command line tool
Pros of cli
- Official GitHub CLI tool with extensive GitHub API integration
- Regularly updated with new features and improvements
- Supports a wide range of GitHub operations directly from the command line
Cons of cli
- Focused solely on GitHub, not a general-purpose Git tool
- May have a steeper learning curve for users new to command-line interfaces
Code Comparison
grv:
func (grvView *GRVView) OnActiveChange(active bool) {
grvView.lock.Lock()
defer grvView.lock.Unlock()
grvView.active = active
}
cli:
func (c *Client) REST(method, p string, body io.Reader, data interface{}) (*http.Response, error) {
url := fmt.Sprintf("%s%s", c.BaseURL, p)
req, err := http.NewRequest(method, url, body)
if err != nil {
return nil, err
}
return c.Do(req, data)
}
Summary
While grv is a terminal interface for git repositories with a focus on visualization, cli is the official GitHub CLI tool designed for interacting with GitHub's features. grv offers a more graphical approach to Git operations, while cli provides comprehensive GitHub-specific functionality through command-line operations. The code snippets demonstrate grv's focus on UI-related functions, whereas cli emphasizes API interactions with GitHub.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
GRV - Git Repository Viewer
GRV is a terminal based interface for viewing Git repositories. It allows refs, commits and diffs to be viewed, searched and filtered. The behaviour and style can be customised through configuration. A query language can be used to filter refs and commits, see the Documentation section for more information.
More screenshots can be seen here
Features
- Commits and refs can be filtered using a query language.
- Changes to the repository are captured by monitoring the filesystem allowing the UI to be updated automatically.
- Organised as tabs and splits. Custom tabs and splits can be created using any combination of views.
- Vi like keybindings by default, key bindings can be customised.
- Custom themes can be created.
- Mouse support.
- Commit Graph.
Documentation
Documentation for GRV is available here
Install
Note: grv
is currently an alias used by oh-my-zsh. Add unalias grv
to the end of your .zshrc
to invoke GRV.
Linux
Static binaries are available for Linux. For example, to use the amd64 binary run the following steps:
wget -O grv https://github.com/rgburke/grv/releases/download/v0.3.2/grv_v0.3.2_linux64
chmod +x ./grv
./grv -repoFilePath /path/to/repo
Mac
GRV is available in homebrew and can be installed with:
brew install grv
FreeBSD
GRV can be installed as a binary package
pkg install grv
or from ports
cd /usr/ports/devel/grv && make install clean
Build instructions
Go version 1.8 or later is required. GRV depends on the following libraries:
- libncursesw
- libreadline
- libcurl
- cmake (to build libgit2)
Building GRV on OSX requires homebrew, and for readline
, pkg-config
, and cmake
to be installed using homebrew:
brew install readline pkg-config cmake
To install GRV run:
go get -d github.com/rgburke/grv/cmd/grv
cd $GOPATH/src/github.com/rgburke/grv
make install
To install grv with an alternative binary name change the last step to:
make install BINARY=NewBinaryName
where NewBinaryName
is the alternative name to use instead.
The steps above will install GRV to $GOPATH/bin
. A static libgit2 will be built and
included in GRV when built this way. Alternatively if libgit2 version 0.27 is
installed on your system GRV can be built normally:
go install ./cmd/grv
Top Related Projects
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot