A CLI to download specific parts of Git repositories using sparse-checkout.
- 10x faster than
gitpick - Supports GitHub and GitLab URLs.
# Install globally to use `gitok` command anywhere
npm install -g gitok
# Use npx to run without installing globally
npx gitok <url># Download entire repository (GitHub/GitLab)
gitok https://github.com/owner/repo
gitok https://gitlab.com/owner/repo
# Download entire repository from a specific branch (GitHub)
gitok https://github.com/owner/repo/tree/v1.1.0
# Download specific folder from main branch (GitHub/GitLab)
gitok https://github.com/owner/repo/tree/main/path/to/folder
gitok https://gitlab.com/owner/repo/-/tree/main/path/to/folder
# Download specific folder from different branch
gitok https://github.com/owner/repo/tree/develop/src/components
gitok https://gitlab.com/owner/repo/-/tree/develop/src/componentsUsage: gitok [options] <url> [output]
A CLI tool to quickly download specific parts of git repositories
Arguments:
url Git repository URL (GitHub or GitLab)
output Output directory name (optional)
Options:
-V, --version output the version number
-b, --branch <branch> Branch to download from
-v, --verbose Show detailed output logs
-h, --help display help for command
Examples:
# Download the entire repository
$ gitok https://github.com/user/repo
# Download only a subdirectory from GitHub
$ gitok https://github.com/user/repo/tree/main/path/to/subdir
# Download only a subdirectory from GitLab
$ gitok https://gitlab.com/group/project/-/tree/master/path/to/subdirMIT License © 2025 Amio