Coder Social home page Coder Social logo

repo-pack's Introduction

Repo-Pack

Repo-Pack is a Go-based tool designed to download files from a specified GitHub repository directory, preserving the directory structure relative to a specified base directory. It's particularly useful for cloning parts of a repository or extracting specific directories without the need to clone the entire project.

Features

  • Download files from public GitHub repositories.
  • Preserve the directory structure starting from a specified base directory.
  • Support for GitHub personal access tokens for private repositories (feature in progress).

Requirements

  • Go 1.21.4 or higher

Installation

  • For mac/linux: curl -LsSf https://dub.sh/repo-pack | sh
  • For windows: curl -LsSf https://dub.sh/repo-pack-win | sh

Building

Clone the repository and build the binary:

git clone https://github.com/stemitom/repo-pack.git
cd repo-pack
go build -o repo-pack

Usage

Run the tool with the required flags:

./repo-pack --url <repository_url> [--token <personal_access_token>]
  • --url: The full URL to the GitHub repository directory you wish to download.
  • --token: Your GitHub personal access token (optional, required for private repositories).

Example

To download the lua directory from a repository:

./repo-pack --url https://github.com/JazzyGrim/dotfiles/tree/master/.config/nvim/lua

This will create a directory named lua in your current working directory and download all files under the .config/nvim/lua directory from the repository, preserving the structure under lua.

Configuration

No additional configuration is required. However, you can set up a .gitignore file to ignore binaries or other directories as needed.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details.

repo-pack's People

Contributors

prettyirrelevant avatar stemitom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.