Skip to main content

Copy a folder or file from GitHub without cloning (CLI)

Project description

ghcp

Copy a folder or file from a GitHub repository using the GitHub API. No git clone, no .git/ left behind.

Install

pipx install ghcp  # once published
# or for local dev:  
pipx install -e .

Usage

ghcp https://github.com/<owner>/<repo>/tree/<ref>/<path> -o ./out --preserve

ghcp https://github.com/<owner>/<repo>/blob/<ref>/<path> -o ./myfile

Options

  • -o, --out Output directory (default: current dir)
  • --ref Branch, tag or commit SHA (default: repo default branch)
  • --token GitHub token (or set GITHUB_TOKEN)
  • --preserve Keep full repo path under the output directory
  • -q, --quiet Reduce output

Private repos / higher rate limits

Provide a token via --token or GITHUB_TOKEN environment variable.

Limitations

  • Git submodules and symlinks are skipped (not resolved).
  • Very large repos may hit rate limits without a token.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghcp-0.1.3.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghcp-0.1.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file ghcp-0.1.3.tar.gz.

File metadata

  • Download URL: ghcp-0.1.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ghcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f898be4c31f061da9c773345dc0ba52c7b3c2dad54c88399e078aa42e49ecc8d
MD5 891eb5a2c928ad968c739b6dfb2de19c
BLAKE2b-256 f933c84a9c395f4847cad3f7d4158becd2cb73ceda76d04650d59fadea9de03f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghcp-0.1.3.tar.gz:

Publisher: release.yml on fayssal-elmofatiche/ghcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ghcp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ghcp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ghcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a3b2c4d318a557670d34a880c81fa2bdc5d727c1f34b0697165b15df7924a9b5
MD5 359cf367cae6a5e8b58204731804f35b
BLAKE2b-256 84b430f34bba593b9fbafa4cd5e16da20f900a33031e042cb4f9dda0bdabe2e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghcp-0.1.3-py3-none-any.whl:

Publisher: release.yml on fayssal-elmofatiche/ghcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page