gitcp
gitcp is a uv/uvx-friendly CLI that syncs local files and directories with files in a GitHub repository.
Commands
uvx gitcp setting # interactive login/logout/status/repo/branch settings
uvx gitcp setting login # non-interactive login options are also available
uvx gitcp setting branch feature # change the configured branch for the active account
uvx gitcp <file-or-dir> # upload only if local differs from GitHub
uvx gitcp <local-file-or-dir> :<remote> # upload to default repo if different
uvx gitcp :<remote> <local> # download from default repo
uvx gitcp status # show current settings
GitHub paths use scp-like prefixes:
:pathuses the configured default repo, e.g.doehyunbaek/private:pathrepo:pathuses a repo under the default owner, e.g.privatee:path->doehyunbaek/privatee:pathowner/repo:pathuses an explicit repo, e.g.doehyunbaekk/privatee:pathgithub:pathandgh:pathare aliases for:path
In one-argument upload mode, absolute local paths keep their full path inside the repository without the leading slash; for example ~/.pi/agent/multicodex.json syncs to home/you/.pi/agent/multicodex.json. Passing a directory uploads every file under that directory while preserving relative paths; changed files are packed with git and pushed as one commit. In one-argument download mode, :path copies from the configured repo/branch to an absolute local output path; :~/.pi/agent/multicodex.json reads home/you/.pi/agent/multicodex.json from GitHub and writes to ~/.pi/agent/multicodex.json.
Setup flow
The uvx gitcp setting flow is modeled after gh auth login/logout:
- pick GitHub.com or another GitHub Enterprise hostname
- choose
Login with a web browserby default, matchinggh auth login - alternatively paste a token, read one with
--with-token, or useGITCP_TOKEN/GH_TOKEN/GITHUB_TOKEN - validate the token by reading the current GitHub user
- choose the sync repository (
owner/repo), branch, and optional remote directory - logout removes only local config; it does not revoke GitHub tokens
Token scope needed for private repositories and writes: repo.
Directory uploads use the local git executable to create and push one packed commit. Local blob hashes are cached under ~/.cache/gitcp (or GITCP_CACHE_DIR) so repeated no-change syncs avoid rereading every file.
Examples
# Install/run from this checkout during development
uv run --project . gitcp --help
uv run --project . gitcp setting
# Login with a browser and configure a repo
uv run --project . gitcp setting login --web -r owner/repo -b main
# Store a token from stdin and configure a repo
printf '%s' "$GH_TOKEN" | uv run --project . gitcp setting login --with-token -r owner/repo -b main
# Change only the configured branch
uv run --project . gitcp setting branch feature
# Push README.md to owner/repo:README.md only if different
uv run --project . gitcp README.md
# Push a directory recursively
uv run --project . gitcp ~/AutoGPT
# Push to an explicit remote path
uv run --project . gitcp README.md :README.md
# Pull README.md from GitHub to ./README.md
uv run --project . gitcp :README.md README.md --force
# Short forms
uv run --project . gitcp local.txt privatee:notes/local.txt
uv run --project . gitcp doehyunbaekk/privatee:notes/local.txt local.txt
Configuration
Config is stored at:
~/.config/gitcp/config.json
Override it with GITCP_CONFIG or GITCP_CONFIG_DIR.
Testing
uv run --project . python -m unittest discover -s tests -v
Metadata
Release files for gitcp 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gitcp-0.3.1.tar.gz | 23.2 kB | Without provenance | Details for gitcp-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitcp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for gitcp-0.3.1-py3-none-any.whl |
Total release size: 45.5 kB
Release files / gitcp-0.3.1.tar.gz
| Download URL | gitcp-0.3.1.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9a014a00653615b3d72db0fdf7b0a2f11df6120958c0fea78f66a3d4f644328
|
|
BLAKE2b-256 checksum How to use checksums |
781259db43008e8fc4b6c70cd953516deeaa0b2a09da7b5165901094c5978a2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / gitcp-0.3.1-py3-none-any.whl
| Download URL | gitcp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
865f5922b47b88a918542e5a26b330ece736f83fe481b8c9f37c5fc5ab44d665
|
|
BLAKE2b-256 checksum How to use checksums |
a13c14d55e9d582efe8c6dfa55a686cf9511626548200a95e9dea9bdc42587b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for gitcp 0.3.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.