Return to Home
Published: Thu Feb 19 2026EN
#GitHub#PowerShell#TUI#Git#Automation
Table of Contents

GitHub Repo TUI Cloner (PowerShell)

This PowerShell script provides an interactive terminal user interface (TUI) to manage your GitHub repositories. It allows you to fetch a list of your owned repositories and selectively clone them to your local machine.

Features

  • Interactive TUI: Easily browse and select repositories using keyboard controls.
  • GitHub API Integration: Fetches owned repositories using a personal access token (PAT).
  • Shallow Cloning: Defaults to shallow clones (--depth 1) for faster downloads, with an option for full history.
  • Filtering: Supports toggling archived and forked repositories in the selection.
  • Batch Operations: Select all, clear selection, or toggle specific types of repos.

Requirements

  • PowerShell: Version 5.1 or 7+.
  • Git: Installed and available in your PATH.
  • GitHub Token: A Personal Access Token (PAT) with repo scope.
  • Network: Access to api.github.com and github.com.

Usage

  1. Authentication:

    • Recommended: Set your token in the environment variable $env:GITHUB_TOKEN.
    • Alternative: Edit the $HARDCODED_GITHUB_TOKEN variable inside the script.
  2. Run the script:

    POWERSHELL
  3. Configuration: The CONFIG section in the script allows you to change the destination folder, inclusion of archived repos, and clone depth.

TUI Controls

Key Action
Up/Down Move cursor in the list
Space Toggle selection for the current repository
A Select all repositories
N Clear all selections
R Toggle selection for all archived repositories
F Toggle selection for all forked repositories
Enter Start cloning selected repositories
Q / Esc Quit without cloning

Full Script

Below is the complete PowerShell script. You can save this as clone-tui.ps1 and run it as described above.

POWERSHELL
Previous TypeSpec for .NET and Next.js Teams
Next How to Synchronize Obsidian Vault Using Git (PC + Android)
Random Docker Usage Guide

Search the archive

Posts, gists, projects, repositories, and links in one index.

An unhandled error has occurred. Reload