New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clone-dir

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clone-dir

Clone a subdirectory from a GitHub repository

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

clone-dir

Clone a subdirectory from a GitHub repository easily using npx.

Description

clone-dir is a command-line tool that allows you to clone a specific subdirectory from a GitHub repository without cloning the entire repo. It uses Git's sparse checkout feature to efficiently download only the files you need.

Installation

You don't need to install this package globally. You can run it directly using npx:

npx clone-dir <github-url> <target-dir>

Usage

To use clone-dir, run the following command:

npx clone-dir <github-url> <target-dir>

Replace <github-url> with the URL of the GitHub subdirectory you want to clone, and <target-dir> with the local directory where you want to clone the files.

Example

To clone the examples/expo-router subdirectory from the nativewind/nativewind repository:

npx clone-dir https://github.com/nativewind/nativewind/tree/main/examples/expo-router my-expo-router-example

This will clone only the examples/expo-router subdirectory and its contents into the my-expo-router-example directory.

Features

  • Clone specific subdirectories from GitHub repositories
  • Uses Git's sparse checkout for efficient cloning
  • No need to clone entire repositories when you only need a subset of files

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Keywords

FAQs

Package last updated on 21 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc