← 返回
开发者工具 中文

gitload

This skill should be used when the user asks to "download files from GitHub", "fetch a folder from a repo", "grab code from GitHub", "download a GitHub repos...
此技能应在用户请求“下载 GitHub 文件”“从仓库获取文件夹”“获取 GitHub 代码”或“下载 GitHub仓库”时使用。
waldekmastykarz
开发者工具 clawhub v1.0.1 2 版本 99717.4 Key: 无需
★ 3
Stars
📥 3,468
下载
💾 247
安装
2
版本
#latest

概述

gitload

Download files, folders, or entire repos from GitHub URLs using the gitload CLI.

When to Use

Use gitload when:

  • Downloading a specific folder from a repo (not the whole repo)
  • Fetching a single file from GitHub
  • Downloading repo contents without git history
  • Creating a ZIP archive of GitHub content
  • Accessing private repos with authentication

Do NOT use gitload when:

  • Full git history is needed (use git clone instead)
  • The repo is already cloned locally
  • Working with non-GitHub repositories

Prerequisites

Run gitload via npx (no install needed):

npx gitload-cli https://github.com/user/repo

Or install globally:

npm install -g gitload-cli

Basic Usage

Download entire repo

gitload https://github.com/user/repo

Creates a repo/ folder in the current directory.

Download a specific folder

gitload https://github.com/user/repo/tree/main/src/components

Creates a components/ folder with just that folder's contents.

Download a single file

gitload https://github.com/user/repo/blob/main/README.md

Download to a custom location

gitload https://github.com/user/repo/tree/main/src -o ./my-source

Download contents flat to current directory

gitload https://github.com/user/repo/tree/main/templates -o .

Download as ZIP

gitload https://github.com/user/repo -z ./repo.zip

Authentication (for private repos or rate limits)

Using gh CLI (recommended)

gitload https://github.com/user/private-repo --gh

Requires prior gh auth login.

Using explicit token

gitload https://github.com/user/repo --token ghp_xxxx

Using environment variable

export GITHUB_TOKEN=ghp_xxxx
gitload https://github.com/user/repo

Token priority: --token > GITHUB_TOKEN > --gh

URL Formats

gitload accepts standard GitHub URLs:

  • Repo root: https://github.com/user/repo
  • Folder: https://github.com/user/repo/tree/branch/path/to/folder
  • File: https://github.com/user/repo/blob/branch/path/to/file.ext

Common Patterns

Scaffold from a template folder

gitload https://github.com/org/templates/tree/main/react-starter -o ./my-app
cd my-app && npm install

Grab example code

gitload https://github.com/org/examples/tree/main/authentication

Download docs for offline reading

gitload https://github.com/org/project/tree/main/docs -z ./docs.zip

Fetch a single config file

gitload https://github.com/org/configs/blob/main/.eslintrc.json -o .

Options Reference

OptionDescription
---------------------
-o, --output Output directory (default: folder named after URL path)
-z, --zip Save as ZIP file at the specified path
-t, --token GitHub personal access token
--ghUse token from gh CLI
--no-colorDisable colored output
-h, --helpDisplay help
-V, --versionOutput version

Error Handling

If gitload fails:

  1. 404 errors: Verify the URL exists and is accessible
  2. Rate limit errors: Add authentication with --gh or --token
  3. Permission errors: For private repos, ensure token has repo scope
  4. Network errors: Check internet connectivity

Notes

  • gitload downloads content via GitHub's API, not git protocol
  • No git history is preserved (use git clone if history is needed)
  • Large repos may take time; consider downloading specific folders
  • Output directory is created if it doesn't exist

版本历史

共 2 个版本

  • v1.0.1 当前
    2026-05-21 12:04 安全 安全
  • v1.0.0
    2026-03-28 11:06 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,008

atifact

waldekmastykarz
当用户请求“提取代理轨迹”、“将HAR转换为轨迹”、“从会话获取轨迹”或“解析代理会话”时使用此技能。
★ 0 📥 276
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,771