Skip to content

The git workflow shortcut: structured cloning + one-command navigation to PRs, pipelines, issues & more

Notifications You must be signed in to change notification settings

swarupdonepudi/gitr

Repository files navigation

gitr

License Go GitHub GitLab Bitbucket

Clone to organized paths. Open PRs, pipelines, branches instantly. One CLI, zero browser tabs.

Quick StartFeaturesCLI ReferenceWebsiteContributing


What is gitr?

gitr solves two daily frustrations: 1) repos scattered everywhere, 2) clicking through GitHub/GitLab/Bitbucket to find PRs, pipelines, issues.

$ gitr clone git@github.com:owner/repo.git  # → ~/scm/github.com/owner/repo
$ gitr prs        # Opens PRs/MRs in browser
$ gitr pipe       # Opens pipelines/actions

📚 See it in action on the website →


Why gitr?

Before gitr 😫 After gitr ✨
"Where should I clone this repo?" gitr clone <url> → deterministic path
Create folders manually Auto-creates host/owner/repo structure
Click through tabs to find PRs gitr prs → instant navigation
Hunt for that repo you cloned Always at ~/scm/{provider}/{owner}/{repo}

Quick Start

Install

macOS: brew install swarupdonepudi/tap/gitr
Go: go install github.com/swarupdonepudi/gitr@latest
Binary: Download from releases

Usage

gitr clone https://github.com/kubernetes/kubernetes
# → Clones to: ~/scm/github.com/kubernetes/kubernetes

cd ~/scm/github.com/kubernetes/kubernetes
gitr web          # Opens repo homepage
gitr prs          # Opens pull requests

🎯 Full tutorial →


Features

Feature Description
🗂️ Organized Cloning Clone repos to ~/scm/{host}/{owner}/{repo} structure
🌐 Instant Web Nav Open PRs, pipelines, issues, branches from terminal
🏢 Enterprise Ready Works with on-prem GitHub/GitLab/Bitbucket
🔐 Multi Auth SSH keys + HTTPS tokens support
👀 Dry Run Preview paths/URLs with gitr --dry <command>

📖 Full feature documentation →


CLI Reference

Clone Commands

gitr clone <url>              # Clone to deterministic path
gitr clone <url> -c           # Create full directory hierarchy
gitr clone <url> --dry        # Preview without cloning
gitr clone <url> --token=xxx  # Clone with HTTPS token

Web Navigation Commands

Run inside any git repository:

Command Opens
gitr web Repository homepage
gitr rem Current branch in web UI
gitr prs Pull Requests / Merge Requests
gitr pipe Pipelines / Actions
gitr issues Issues
gitr commits Commits for current branch
gitr branches All branches
gitr tags All tags
gitr releases Releases page

Utility Commands

gitr config show    # Show current configuration
gitr config edit    # Edit ~/.gitr.yaml in $EDITOR
gitr path <url>     # Show deterministic path for URL
gitr --dry <cmd>    # Preview mode (no changes)

📖 Complete CLI docs →


Configuration

gitr auto-creates ~/.gitr.yaml on first run. Quick example:

scm:
  homeDir: /Users/you/scm
  hosts:
    - hostname: github.com
      provider: github
      clone:
        alwaysCreDir: true
        includeHostForCreDir: true
    - hostname: gitlab.mycompany.net  # On-prem support
      provider: gitlab
      scheme: https

Supports: On-prem instances • Per-host clone rules • SSH config (~/.ssh/config) • HTTPS tokens (~/.personal_access_tokens/{hostname})

⚙️ Full configuration guide →


Supported Providers

GitHub (github.com + Enterprise) • ✅ GitLab (gitlab.com + Self-hosted) • ✅ Bitbucket (bitbucket.org + Datacenter)


Example: Organized Workspace

After using gitr clone:

~/scm/
├── github.com/kubernetes/kubernetes/
├── github.com/swarupdonepudi/gitr/
├── gitlab.com/team/project/backend/
└── gitlab.mycompany.net/org/infra/terraform/

Power user aliases (add to .zshrc):

alias clone="gitr clone"
alias prs="gitr prs"
alias pipe="gitr pipe"

Links

📚 Documentation • 🎯 Tutorial • ❓ FAQ • 📦 Releases


Contributing

gitr was built to share extreme productivity with other productivity geeks. Issues and pull requests are welcome!

gitr clone https://github.com/swarupdonepudi/gitr
make build && make test

License

Apache License 2.0 - see LICENSE for details.


Built with ❤️ for developers who value their time

⭐ Star on GitHub🌐 Visit Website

About

The git workflow shortcut: structured cloning + one-command navigation to PRs, pipelines, issues & more

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 6