RH

rich-harris/degit

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

8천 stars 품질 73 트렌드 44MIT

간단한 프로젝트 비계 구축

개요

git 저장소의 복사본을 만듭니다. degit some-user/some-repo를 실행하면 https://github.com/some-user/some-repo에서 최신 커밋을 찾아내고, 해당 tar 파일을 해당 플랫폼에 맞는 캐시 디렉터리로 다운로드합니다. 만약 로컬에 존재하지 않는다면요. Linux/BSD에서는 설정하면 XDG_CACHE_HOME 따라오고, 그렇지 않으면 ~/.cache/degit을 사용합니다; macOS에서는 ~/Library/Caches/degit을 사용하고; Windows에서는 %LOCALAPPDATA%\degit을 사용합니다. (git clone을 사용하는 것보다 훨씬 빠릅니다. 전체 git 기록을 다운로드하지 않기 때문입니다.) degit은 내부 git 백엔드를 통해 refs를 해결하고, 기본적으로 tar snapshot을 다운로드하며, tarball이 가져오기나 추출에 실패하면 SSH 클론으로 전환합니다. 공개 HTTPS 소스는 PATH에 로컬 git 바이너리가 필요하지 않지만, SSH/private 저장소는 여전히 필요합니다. - Node.js 이후 (package.json의 엔진 참조) - 이 저장소를 개발할 때 사용하는 Bun (패키지의 packageManager 참조).

개요(AI 번역)

degit는 git 저장소의 복사본을 만듭니다. degit some-user/some-repo를 실행하면 https://github.com/some-user/some-repo에서 최신 커밋을 찾아내고, 만약 해당 tar 파일이 이미 로컬에 없다면 해당 플랫폼에 맞는 캐시 디렉터리로 다운로드합니다. (이 방법은 git clone를 사용하는 것보다 훨씬 빠릅니다. 왜냐하면 전체 git 기록을 다운로드하지 않기 때문입니다.)

degit는 내부 git 백엔드를 통해 ref를 해결하고, 기본적으로 tar 스냅샷을 다운로드하며, tarball 가져오기나 추출이 실패하면 SSH 클론으로 전환합니다. 공개 HTTPS 소스는 PATH]에 로컬 git 바이너리가 필요하지 않지만, SSH/개인 저장소는 여전히 필요합니다.

요구 사항

  • Node.js 20 또는 그 이후(package.json의 engines 참조)

설치

퀵 스타트

GitHub 저장소의 기본 분기를 현재 디렉터리로 다운로드하세요:

새 폴더로 다운로드:

특정 파일만 다운로드하세요:

특정 태그, 브랜치 또는 커밋을 사용하세요:

전체 CLI 참조, ESM API, degit.json 동작은 docs/USAGE.md를 참조하세요.

왜 그냥 git clone --depth 1가 안 되나요?

  • 템플릿에서 남는 .git 폴더 없음.
  • 오프라인 재사용을 위한 타르 아카이브를 캐시합니다.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

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

npm install -g degit

Quick start

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

degit user/repo

Download to a new folder:

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

Download only specific files:

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

Use a specific tag, branch, or commit:

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:

# 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

GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add rich-harris/degit
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →