GitSnip Documentation

Download any GitHub subdirectory as a zip — no git clone, no login required.

Quick start

Three steps, 30 seconds:

  1. Find a GitHub directory you want, e.g.
    https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev
  2. Go to gitsnip.cc and paste the URL.
  3. Click Download — your browser saves the zip.
Even faster: Just replace github.com with gitsnip.cc in your browser's URL bar and press Enter. The download starts immediately.

Web UI

The main page at gitsnip.cc accepts any GitHub tree URL.

Supported URL formats:

https://github.com/owner/repo/tree/branch/path/to/dir
https://github.com/owner/repo/tree/branch          (entire repo root)
github.com/owner/repo/tree/branch/path             (no https:// is fine)

Optional: GitHub Token

Without a token, the GitHub API allows 60 requests/hour per IP. That's enough for most casual use. If you hit the limit, or need to access private repos, add a Personal Access Token (PAT):

  1. Click ⚙ Settings at the bottom of the tool card.
  2. Paste your token (read-only public_repo scope is sufficient).
  3. The token is stored in your browser's localStorage — never sent to our servers.

Generate a token ↗

URL trick

Replace github.com with gitsnip.cc in any GitHub tree URL:

Before: https://github.com/anthropics/claude-code/tree/main/plugins
After:  https://gitsnip.cc/anthropics/claude-code/tree/main/plugins

Press Enter — the download begins immediately without any extra clicks.

Bookmarklet

Drag the button below to your browser's bookmarks bar. Then, on any GitHub directory page, click the bookmark to trigger an instant download.

GitSnip

⬆ Drag this button to your bookmarks bar. One click = instant download on any GitHub tree page.

Note: This is a bookmarklet — a tiny piece of JavaScript saved as a bookmark. It works in Chrome, Firefox, Edge, and Safari. No extension required.

Any GitSnip URL is a permanent, shareable download link. After downloading, click ⎘ Copy link to get the link. Anyone who opens it will immediately get the zip download.

https://gitsnip.cc/anthropics/claude-code/tree/main/plugins/feature-dev

This link format mirrors GitHub's tree URL — just with a different domain.

API reference

Base URL: https://api.gitsnip.cc

Authentication (optional)

Pass your GitHub Personal Access Token to avoid rate limits:

X-GitHub-Token: ghp_your_token_here

Download a directory

GET /v1/download
ParameterTypeDescription
urlstring (required)URL-encoded GitHub tree URL

Returns: application/zip file stream with Content-Disposition: attachment; filename="dirname.zip"

curl -L "https://api.gitsnip.cc/v1/download?url=https%3A%2F%2Fgithub.com%2Fanthropics%2Fclaude-code%2Ftree%2Fmain%2Fplugins%2Ffeature-dev" \
     -o feature-dev.zip

# With token:
curl -L -H "X-GitHub-Token: ghp_xxxx" \
     "https://api.gitsnip.cc/v1/download?url=..." \
     -o feature-dev.zip

Get directory info (no download)

GET /v1/info
ParameterTypeDescription
urlstring (required)URL-encoded GitHub tree URL

Returns JSON:

{
  "provider": "github",
  "owner": "anthropics",
  "repo": "claude-code",
  "branch": "main",
  "path": "plugins/feature-dev",
  "fileCount": 5,
  "totalSize": 12840,
  "files": [
    { "path": "plugins/feature-dev/README.md", "size": 1204 },
    { "path": "plugins/feature-dev/prompt.md", "size": 11636 }
  ]
}

Error responses

StatusCodeMeaning
400INVALID_URLURL is not a valid GitHub tree URL, or path is empty
404NOT_FOUNDRepository, branch, or path does not exist
413TOO_LARGEDirectory exceeds size/file-count limits
429RATE_LIMITEDGitHub API rate limit exceeded
502GITHUB_ERRORGitHub API returned an unexpected error
// All errors follow this format:
{
  "code": "RATE_LIMITED",
  "message": "GitHub API rate limit exceeded.",
  "hint": "Provide X-GitHub-Token to get 5,000 requests/hour."
}

CLI

# No install needed — run with npx
npx gitsnip https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev

# Options
npx gitsnip <url> --output archive.zip   # custom output path
npx gitsnip <url> --info                 # show file list without downloading
npx gitsnip <url> --token ghp_xxxx      # use GitHub token

Library

A programmatic Node.js library is planned. In the meantime, you can use the CLI or call the REST API directly.

# Preview of planned API (not yet published):
import { snip, info } from 'gitsnip'

const zip = await snip('https://github.com/owner/repo/tree/main/path')
const meta = await info('https://github.com/owner/repo/tree/main/path')

AI usage

GitSnip is designed to be AI-friendly. The machine-readable docs are at:

Example: tell Claude or ChatGPT:

"Download the plugins/feature-dev directory from
https://github.com/anthropics/claude-code
Use the GitSnip API at https://gitsnip.cc/llms.txt"

FAQ

Why is the download slow?

For web UI downloads, your browser fetches each file individually from raw.githubusercontent.com, then zips them locally. Large directories (100+ files) take longer. For best performance, use the API endpoint which streams a pre-built zip.

Can I download private repositories?

Not yet — only public repositories are supported right now. Private repo support is on the roadmap.

I hit the GitHub rate limit. What do I do?

Add a GitHub Personal Access Token in the Settings panel (⚙). A token increases your limit from 60 to 5,000 requests/hour. Generate one here ↗

Is there a file size limit?

The API endpoint has a 100 MB / 500 files limit per request. Web UI downloads are limited by your browser's available memory. For very large directories, use git sparse-checkout instead.

Can I self-host GitSnip?

Yes. GitSnip is open source (MIT) and runs on Cloudflare Workers + Pages. See the GitHub repo for setup instructions. The hosted version at gitsnip.cc includes optimizations like caching and priority processing that are not part of the open-source release.

Is my GitHub token safe?

For web UI use: tokens are stored in your browser's localStorage only — they never reach our servers. For API use: tokens are passed via HTTPS and used only for the duration of the request.