git-file-fetch
v0.2.1
Published
Fetch specific files from remote git repos and track them locally.
Readme
git-file-fetch
A lightweight CLI to fetch individual files from remote Git repositories and track them locally for reproducibility.
Quick Start
Just want to use it?
npx git-file-fetch "https://github.com/user/repo.git@main:path/to/file.ts"Want to install it?
npm install -D git-file-fetch
npx git-file-fetch "https://github.com/user/repo.git@main:path/to/file.ts"Want to contribute/develop?
git clone https://github.com/joshuaboys/git-file-fetch.git
cd git-file-fetch
pnpm install
pnpm buildAvailable development commands:
pnpm build- Build the projectpnpm typecheck- Run TypeScript type checkingpnpm lint- Run ESLint with auto-fixpnpm test:smoke- Run smoke test
What it does
- Shallow Fetch: Performs a shallow fetch of the target ref without a full clone
- File Extraction: Reads the file at that specific commit using
git show - Local Copy: Copies the requested file(s) into your current working directory
- Manifest Update: Writes an entry for each fetched file to a manifest for tracking provenance
Documentation
- Getting Started - Complete setup guide
- Usage Guide - CLI options and examples
- Configuration - Advanced setup
- Troubleshooting - Common issues
- CI Integration - CI/CD workflows and automation
- Roadmap - Development plans
- Contributing - How to contribute
- Security - Security policies
- Code of Conduct - Community guidelines
Requirements
- Git available on your PATH
- Node.js >= 22
License
MIT © Joshua Boys
Author
Created by Joshua Boys
_ _
__ _ _ __ ___| | _(_)
/ _` | '_ \ / _ \ |/ / |
| (_| | | | | __/ <| |
\__,_|_| |_|\___|_|\_\_|
=== ᚢ · ᚦ · ᚲ ===