返回 Skill 列表
extension
分类: 开发与工程无需 API Key

tmp-git-clone

将git仓库克隆到一个临时文件夹中以便快速浏览。当您需要检查代码库、查找文档或探索仓库结构时使用。

person作者: jakexiaohubgithub

tmp-git-clone

Clone git repos to ~/.tmp-git-clone/{owner}/{repo} for quick exploration. Shallow clone by default for speed.

Quick Start

# GitHub shorthand (recommended)
tmp-git-clone rails/rails

# Full URL
tmp-git-clone https://github.com/rails/rails

# SSH
tmp-git-clone git@github.com:rails/rails.git

Common Options

# Clone specific branch
tmp-git-clone -b 7-2-stable rails/rails

# Deeper clone for history
tmp-git-clone --depth 10 rails/rails

# Quiet mode (outputs only path for scripting)
tmp-git-clone -q rails/rails

# Copy path to clipboard
tmp-git-clone -c rails/rails

Commands

| Command | Description | |---------|-------------| | tmp-git-clone list | List all cloned repos | | tmp-git-clone clean --yes | Remove all clones | | tmp-git-clone history | Show recent clones | | tmp-git-clone config | Show configuration |

Workflow for Exploration

  1. Clone the repo: tmp-git-clone owner/repo
  2. Note the output path: ~/.tmp-git-clone/owner/repo
  3. Read files, explore structure, analyze code
  4. Clones auto-cleanup after 3 days

Configuration

Create ~/.tmp-git-clone/config.json for defaults:

{
  "copy": true,
  "depth": 1,
  "defaultBranch": null
}

Requirements

  • Node.js 18+
  • Git

Installation

# npx (no install needed)
npx github:lirrensi/tmp-git-clone rails/rails

# Or install globally
npm install -g github:lirrensi/tmp-git-clone