1.1.1 • Published 1 year ago

@relbns/github-cloner v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

GitHub Cloner

šŸš€ Interactive CLI tool for effortlessly cloning your GitHub repositories and managing branches

Features

  • šŸ“‹ Interactive list of all your GitHub repositories
  • šŸ” Smart organization by users and organizations
  • šŸŽÆ Branch management within git repositories:
    • View and checkout branches from open PRs
    • Browse and checkout remote branches
    • Auto-detect existing branches
    • Pull latest changes for local branches
  • šŸ”Ž Quick search functionality with autocomplete
  • ⚔ Clone repositories directly to your current directory
  • šŸŽÆ Duplicate detection to prevent accidental re-cloning
  • āš™ļø Configurable sorting options (by name or last update)

Installation

npm install -g @relbns/github-cloner

Prerequisites

  • Node.js >=18.0.0
  • npm >=9.5.1
  • GitHub account with a personal access token

Setting up GitHub Token

  1. Create a GitHub personal access token:

  2. Add token to your shell profile:

    # For bash users (in ~/.bashrc or ~/.bash_profile):
    export GITHUB_TOKEN=your_token_here
    
    # For zsh users (in ~/.zshrc):
    export GITHUB_TOKEN=your_token_here
  3. Reload your shell or run:

    source ~/.bashrc  # or ~/.zshrc for zsh users

Usage

Simply run:

clone

Repository Cloning

When run in a non-git directory:

  1. Displays an interactive menu of your repositories
  2. Allows you to search and select a repository
  3. Clones the selected repository to your current directory

Branch Management

When run inside a git repository:

  1. Choose between:
    • Browse branches from open PRs
    • Browse all remote branches
    • Clone a new repository
  2. For PR branches:
    • View all branches with open PRs
    • See which branches exist locally
    • Pull latest changes for existing branches
  3. For remote branches:
    • View branches that don't exist locally
    • Easily checkout new branches

Navigation

  • Use ↑/↓ arrows to navigate
  • Start typing to search repositories
  • Press Enter to select
  • Choose "Go back" to return to previous menu
  • Choose "Exit" to quit

Settings

Access settings menu to:

  • Configure sorting preferences
  • Adjust display options
  • Manage GitHub token

Support

For bugs and feature requests, please open an issue.

License

MIT Ā© Ariel Benesh

1.1.1

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.1

2 years ago