@ayan4m1/git-clone-sparse
TypeScript icon, indicating that this package has built-in type declarations

0.4.1 • Public • Published

git-clone-sparse

npm version

features

  • Written in TypeScript
  • Small footprint
  • Saves time when cloning large repos

requirements

  • Node 18+

installation

npm i -g @ayan4m1/git-clone-sparse

usage

git-clone-sparse ./local-dir https://github.com/user/repo ./path1/ ./path2/

OR

git-clone-sparse -g ./local-dir https://github.com/user/repo "**/*.safetensors"

Each command creates a directory called local-dir in your current working directory and then clones the specified URL. If you use glob mode, pass the -g flag. If you want to use a list of directories instead, do not use the -g flag.

api

import cloneSparse from '@ayan4m1/git-clone-sparse';

...

await cloneSparse(
  './new-repo-dir', // working copy directory
  'https://github.com/ayan4m1/git-clone-sparse' // repo URL
  ['./README.md'] // paths to include,
  {
    globs: false,
    force: false
  } // optional options object
);

Readme

Keywords

none

Package Sidebar

Install

npm i @ayan4m1/git-clone-sparse

Weekly Downloads

384

Version

0.4.1

License

MIT

Unpacked Size

7.08 kB

Total Files

6

Last publish

Collaborators

  • ayan4m1