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, --outOutput directory (default: current dir)--refBranch, tag or commit SHA (default: repo default branch)--tokenGitHub token (or setGITHUB_TOKEN)--preserveKeep full repo path under the output directory-q, --quietReduce 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.
Metadata
Release files for ghcp 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ghcp-0.1.3.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ghcp-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / ghcp-0.1.3.tar.gz
| Download URL | ghcp-0.1.3.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f898be4c31f061da9c773345dc0ba52c7b3c2dad54c88399e078aa42e49ecc8d
|
|
BLAKE2b-256 checksum How to use checksums |
f933c84a9c395f4847cad3f7d4158becd2cb73ceda76d04650d59fadea9de03f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2025.
Transparency logRelease files / ghcp-0.1.3-py3-none-any.whl
| Download URL | ghcp-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3b2c4d318a557670d34a880c81fa2bdc5d727c1f34b0697165b15df7924a9b5
|
|
BLAKE2b-256 checksum How to use checksums |
84b430f34bba593b9fbafa4cd5e16da20f900a33031e042cb4f9dda0bdabe2e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2025.
Transparency log