GitHub - njoshi22/repoflow

4 min read Original article ↗

Repoflow

Manage and visualize Git repositories across multiple directories and workspaces

Release Go Report Card License: MIT

Repoflow is a powerful terminal user interface (TUI) tool that helps you manage Git repositories across multiple directories. It provides an intuitive interface for viewing repository status, managing workspaces, and performing Git operations efficiently.

Repoflow Screenshot

✨ Features

  • 🖥️ Beautiful TUI - Modern terminal interface built with Bubble Tea
  • 📁 Multi-directory Support - Scan multiple directories simultaneously
  • 🗂️ Workspace Management - Save and organize your development environments
  • 🔄 Git Operations - Stage, commit, and view diffs directly from the interface
  • 📊 Repository Overview - Quick status overview of all repositories
  • ⚡ Fast & Lightweight - Written in Go for optimal performance
  • 🔧 Cross-platform - Works on macOS, Linux, and Windows

🚀 Quick Start

Homebrew (macOS/Linux)

brew install njoshi22/tap/repoflow

Download Binary

Download the latest release for your platform from the releases page.

Go Install

go install github.com/njoshi22/repoflow@latest

📖 Usage

Basic Usage

# Scan current directory
repoflow

# Scan specific directory
repoflow ~/projects

# Scan multiple directories
repoflow -d ~/projects ~/work ~/personal

# Recursive search (up to 2 levels deep)
repoflow -r -d ~/projects

Workspace Management

# Create/save a workspace
repoflow -w frontend -d ~/web ~/mobile

# Load an existing workspace
repoflow -w frontend

# List all workspaces
repoflow list

# Show workspace details
repoflow show frontend

# Edit a workspace
repoflow edit frontend

# Delete a workspace
repoflow delete frontend

TUI Navigation

Key Action
↑/↓ Navigate repositories
Tab/Enter View file details
l View git log
a Stage all changes
c Commit changes
Esc Go back/Exit
q Quit

🛠️ Installation

Option 1: Homebrew (Recommended for macOS/Linux)

# Add the tap
brew tap njoshi22/tap

# Install repoflow
brew install repoflow

Option 2: Download Binary

  1. Go to the releases page
  2. Download the appropriate binary for your platform:
    • macOS: repoflow-darwin-amd64 (Intel) or repoflow-darwin-arm64 (Apple Silicon)
    • Linux: repoflow-linux-amd64 or repoflow-linux-arm64
    • Windows: repoflow-windows-amd64.exe
  3. Make it executable and move to your PATH:
# macOS/Linux
chmod +x repoflow-*
sudo mv repoflow-* /usr/local/bin/repoflow

# Windows
# Move repoflow-windows-amd64.exe to a directory in your PATH

Option 3: Go Install (for Go developers)

go install github.com/njoshi22/repoflow@latest

Option 4: Build from Source

# Clone the repository
git clone https://github.com/njoshi22/repoflow.git
cd repoflow

# Build and install
make install

⚙️ Configuration

Repoflow stores workspace configurations in ~/.config/repoflow/workspaces.json.

Example workspace configuration:

{
  "workspaces": {
    "frontend": {
      "name": "frontend",
      "directories": ["/home/user/web", "/home/user/mobile"],
      "recursive": true
    },
    "backend": {
      "name": "backend",
      "directories": ["/home/user/api", "/home/user/services"],
      "recursive": false
    }
  }
}

🔧 Development

Prerequisites

  • Go 1.21 or later
  • Git

Building

# Clone the repository
git clone https://github.com/njoshi22/repoflow.git
cd repoflow

# Install dependencies
go mod download

# Build for current platform
make build

# Build for all platforms
make build-all

# Run tests
make test

# Install locally
make install

Make Targets

Target Description
make build Build for current platform
make install Install to /usr/local/bin
make build-all Cross-compile for all platforms
make test Run tests
make lint Run linters
make clean Clean build artifacts
make help Show all available targets

📝 Examples

Managing Multiple Projects

# Create a workspace for your web projects
repoflow -w webdev -d ~/projects/frontend ~/projects/backend ~/projects/shared

# Later, quickly access your web development environment
repoflow -w webdev

# Add a new directory to the workspace
repoflow -w webdev -d ~/projects/frontend ~/projects/backend ~/projects/shared ~/projects/mobile

Daily Workflow

# Morning standup - check status of all work projects
repoflow -w work

# Switch to personal projects
repoflow -w personal

# Quick check of a specific directory
repoflow ~/urgent-fix

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with Bubble Tea for the TUI framework
  • Inspired by tools like lazygit and gh-dash
  • Thanks to the Go and open source community

📞 Support


Made with ❤️ by the open source community