Skip to content

2KAbhishek/gh-repo-man

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

121 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

License People Stars Forks Watches Last Updated

Manage GitHub Repositories with Ease πŸ“¦πŸš€

tdo.nvim in action
gh-repo-man in action

gh-repo-man is a GitHub CLI extension that allows developers to browse, clone, and work with multiple repositories interactively.

✨ Features

  • Browse and clone GitHub repositories interactively using fuzzy finder (fzf) with live preview.
  • Filter repositories by language, type (archived, forked, private, template), and sort by various criteria.
  • Clone multiple repositories concurrently with configurable performance limits and progress indicators.
  • Seamless integration with tmux-tea and editors for instant workspace setup after cloning.
  • Smart caching system with configurable TTL to minimize API calls and improve performance.
  • Fully customizable icons and UI elements with hierarchical YAML configuration support.
  • Comprehensive repository details including stars, forks, issues, languages, and README preview.

⚑ Setup

βš™οΈ Requirements

  • gh CLI >= 2.0.0
  • fzf for interactive browsing
  • Go >= 1.19 (for building from source)

πŸ’» Installation

Via GitHub CLI Extensions

gh extension install 2KAbhishek/gh-repo-man

From Source

git clone https://github.com/2KAbhishek/gh-repo-man
cd gh-repo-man
go build -o gh-repo-man main.go
gh extension install .

βš™οΈ Configuration

gh-repo-man uses a YAML configuration file at ~/.config/gh-repo-man/config.yml (or specify custom path with --config).

See example-config.yml for comprehensive configuration options with detailed comments covering repository settings, UI customization, performance tuning, and integrations.

πŸš€ Usage

The tool can be used in two ways:

### As a GitHub CLI Extension (Recommended)
gh repo-man [flags]
### As a Standalone Binary
gh-repo-man [flags]

Flags

  -c, --config string     Path to configuration file
  -d, --dir string        Directory where repositories will be cloned (overrides config)
  -h, --help              Help for repo-man
  -l, --language string   Filter by primary language
  -s, --sort string       Sort repositories by (created, forks, issues, language, name, pushed, size, stars, updated)
  -t, --type string       Filter by repository type (archived, forked, private, template)
  -u, --user string       Browse repositories for a specific user

Examples

# Browse your own repositories (as gh extension)
gh repo-man

# Browse your own repositories (standalone)
gh-repo-man

# Browse another user's repositories
gh repo-man --user torvalds

# Filter by language and sort by stars
gh repo-man --language go --sort stars

# Browse private repositories only
gh repo-man --type private

# Use custom config file
gh repo-man --config ~/my-config.yml

# Clone to current directory
gh repo-man --dir .

# Clone to a specific directory
gh repo-man --dir ~/workspace/projects

Navigation

  • Use arrow keys to navigate through repositories
  • Press Tab or Shift+Tab to select multiple repositories
  • Press Enter to clone selected repositories
  • View repository details in the preview pane

πŸ—οΈ What's Next

Planning to add repository management features like creating, archiving, and updating repositories.

βœ… To-Do

You tell me! Open an issue or PR with your ideas.

πŸ§‘β€πŸ’» Behind The Code

🌈 Inspiration

gh-repo-man was inspired by octohub.nvim, I wanted to create a standalone CLI tool that could be used independently of Neovim, while still providing a similar interactive experience for managing GitHub repositories.

πŸ’‘ Challenges/Learnings

  • The main challenges were implementing proper context cancellation for concurrent operations and handling GitHub API rate limits
  • I learned about Go's context package, concurrent programming patterns, and effective CLI tool design

🧰 Tooling

  • dots2k β€” Dev Environment
  • nvim2k β€” Personalized Editor
  • sway2k β€” Desktop Environment
  • qute2k β€” Personalized Browser

πŸ” More Info

  • GitHub CLI β€” GitHub's official CLI tool
  • fzf β€” Command-line fuzzy finder
  • Cobra β€” CLI framework for Go

⭐ hit the star button if you found this useful ⭐

Source | Blog | Twitter | LinkedIn | More Links | Other Projects

About

Manage GitHub Repositories with Ease πŸ“¦πŸš€

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages