Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

degit

> 编程语言
Open source

Straightforward project scaffolding

7.9K stars0 likes0 views
WebsiteGitHub

About

Straightforward project scaffolding

degit — straightforward project scaffolding

degit makes copies of git repositories. When you run degit some-user/some-repo, it finds the latest commit on https://github.com/some-user/some-repo and downloads the associated tar file to the platform-appropriate cache directory if it doesn't already exist locally. (This is much quicker than using git clone, because you're not downloading the entire git history.)

degit resolves refs through an internal git backend, downloads tar snapshots by default, and falls back to SSH cloning when tarball fetches or extraction fail. Public HTTPS sources do not need a local git binary on your PATH, but SSH/private repositories still do.

Requirements

  • Node.js 20 or later (see engines in package.json)

Installation

bash
npm install -g degit

Quick start

Download the default branch of a GitHub repo to the current directory:

bash
degit user/repo

Download to a new folder:

bash
degit user/repo my-new-project
degit -r user/repo

Download only specific files:

bash
degit user/repo my-project --files README.md,src/index.ts

Use a specific tag, branch, or commit:

bash
degit user/repo#v1.0.0

For the full CLI reference, ESM API, and degit.json actions, see docs/USAGE.md.

Why not just git clone --depth 1?

  • No leftover .git folder from the template.
  • Caches tar archives for offline reuse.
  • Less to type (degit user/repo versus git clone --depth 1 ...).
  • Composable post-clone actions via degit.json.
  • Built-in support for subdirectories, file filtering, and aliases.

Agent skill

Install the reusable degit skill for agents that support SKILL.md files:

bash
# project-level install
npx skills add Rich-Harris/degit --skill degit

# global install
npx skills add Rich-Harris/degit --skill degit -g

Then ask the agent to download a repository or template. The skill helps it choose a source, ref, and destination; handle private repositories and aliases; and avoid overwriting a non-empty destination without confirmation.

See skills/degit/SKILL.md for the full skill instructions.

Documentation

  • docs/USAGE.md — full CLI reference, ESM API, and degit.json actions
  • docs/CONTRIBUTING.md — contributing, development setup, and CI checks
  • docs/SECURITY.md — security policy and reporting process
  • docs/ARCHITECTURE.md — repository architecture and data flow
  • docs/CODE_OF_CONDUCT.md — community expectations
  • docs/CHANGELOG.md — release notes

See also

  • zel by Vu Tran
  • gittar by Luke Edwards
  • gitpick - by Neeraj Dalal

License

MIT

Issues· 1 open

View all issuesOpen on GitHub
  • #495

    Please enable Private Vulnerability Reporting (security disclosure channel)

    Updated Oct 1, 2026

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言