tlnw-get-file
tlnw-get-file is a small cross-platform Python CLI that retrieves a single file or folder from a Git repository by using sparse checkout and then moves it into a relative destination under the current working directory.
Installation
python -m pip install .
Usage
tlnw-get-file --git --repo https://github.com/owner/repo.git --source path/to/file.txt --dest output.txt
The CLI always supports these common options:
--help: show the current version, usage, and available options--debug: enable debug logging--version: print the current version
Version 0.2.0 requires --git mode.
Git mode
--repomust be an HTTPS repository URL.--sourcemust be a single relative file or folder path inside the repository.--destmust be a relative path from the current working directory and must not contain..path segments.--mergeis optional and acceptsreplaceordiscardwhen the resolved final destination path already exists.
If TLNW_GIT_ACCESS_TOKEN is set, the command injects it into the HTTPS clone URL by using x-access-token authentication. If the variable is absent, the repository is cloned as a public repository.
Destination behavior
- If
--destpoints to an existing directory, the retrieved source is moved inside it. - If
--destends with/or\, that directory is created and the retrieved source is moved inside it. - Otherwise, a file source is written to the exact destination file path.
- Otherwise, a directory source is moved to the exact destination directory path, which allows renaming the retrieved folder.
--mergeis evaluated only after the final destination path is resolved. If the resolved path does not exist, the move proceeds normally and any--mergevalue is ignored.- If the resolved final destination path already exists and
--mergeis omitted, the command fails. --merge replacerecursively applies the source onto the destination, overwriting conflicting files or folders while keeping destination-only entries.--merge discardrecursively applies only source paths that do not already exist, preserving conflicting destination files or folders.
Examples
Retrieve a file to a specific output filename:
tlnw-get-file --git --repo https://github.com/owner/repo.git --source docs/spec.md --dest specs/current.md
Retrieve a folder into a destination directory:
tlnw-get-file --git --repo https://github.com/owner/repo.git --source templates/api --dest vendor/
Recursively overwrite conflicting paths while keeping destination-only files:
tlnw-get-file --git --repo https://github.com/owner/repo.git --source templates/api --dest vendor/ --merge replace
Recursively keep conflicting destination paths and import only new source paths:
tlnw-get-file --git --repo https://github.com/owner/repo.git --source templates/api --dest vendor/ --merge discard
Enable debug logging:
tlnw-get-file --debug --git --repo https://github.com/owner/repo.git --source path/to/file.txt --dest output.txt
Development
python -m pip install -e .[dev]
python -m pytest
Metadata
Release files for tlnw-get-file 0.2.0
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 |
|---|---|---|---|---|
| tlnw_get_file-0.2.0.tar.gz | 7.2 kB | With provenance | Details for tlnw_get_file-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tlnw_get_file-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for tlnw_get_file-0.2.0-py3-none-any.whl |
Total release size: 13.2 kB
Release files / tlnw_get_file-0.2.0.tar.gz
| Download URL | tlnw_get_file-0.2.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32ee358a0a5a22629a9c237990a3ca8efbe9da785677c1242264bf9cf95376ea
|
|
BLAKE2b-256 checksum How to use checksums |
3759a7b5867e84c0be4bb62a2d98d06f942fd534fefd406f62b41cceff42edd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 20, 2026.
Transparency logRelease files / tlnw_get_file-0.2.0-py3-none-any.whl
| Download URL | tlnw_get_file-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65f1ac896d09cc086950f960571f51060a6ea16d6c06fdf8ff88f855e3c3d7b4
|
|
BLAKE2b-256 checksum How to use checksums |
6df6bb5c215728984cf90263f9aaf347da7784b2cb7720843dfcd609ec101b85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 20, 2026.
Transparency logSecurity for tlnw-get-file 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tlnw_get_file-0.2.0.tar.gz
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 Jul 20, 2026.
Transparency logA 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.