gh-cp icon indicating copy to clipboard operation
gh-cp copied to clipboard

GitHub CLI extension to copy a file from a GitHub repository locally without cloning the repository.

gh cp

A GitHub CLI extension to copy a file from a GitHub repository locally without cloning the repository.

$ gh extension install mislav/gh-cp

$ gh cp
Usage: gh cp <repo> <path> <dest>

$ gh cp cli/cli pkg/findsh/find_windows.go .

$ head find_windows.go
package findsh

import (
        "os"
        "path/filepath"

        "github.com/cli/safeexec"
)

func Find() (string, error) {