Git Product home page Git Product logo

gitty's Introduction

gitty

GitHub Latest Release Go codecov Go Report Card License

gitty

Overview

Gitty is a CLI tool that helps you download GitHub files and directories directly! It is fast, simple, and works concurrently. Gitty is easy to use, making it perfect for downloading specific files and folders from large repositories.

Install

Go

Requires Go 1.22+

go install github.com/worlpaker/gitty@latest

Usage

gitty github-url

Examples

  • Download GitHub Directory
gitty https://github.com/worlpaker/go-syntax/tree/master/examples
  • Download GitHub File
gitty https://github.com/worlpaker/go-syntax/blob/master/test/semantic_tokens.go
  • Gitty also works without the https prefix
gitty github.com/worlpaker/go-syntax/tree/master/examples

Authorization

GitHub has hourly rate limit:

  • For unauthenticated users: 60

  • For authenticated users: 5000

  • For enterprise cloud users: 15000

Gitty retrieves your GitHub token from your os environment variable with GH_TOKEN key. Get your token from GitHub Personal Tokens. More details about tokens can be found on Managing your personal access tokens.

You can set your token manually in your os environment variable with GH_TOKEN key, or you can use gitty!

  • Set token
gitty -s=your_github_token
  • Unset token
gitty -u
  • Authenticated user info
gitty -a
  • Check client auth status and remaninig rate limit
gitty -c

NOTE: Gitty doesn't store your token. It gets, saves, and deletes the token from your os environment variable.

How it works

Gitty uses go-github to interact with GitHub and cobra for CLI.

Test

Test coverage is 100% for Windows, Linux and macOS (see: gitty test commands).

Contributing

Yes, please! Feel free to contribute.

Credits

Inspired by download-directory.

License

MIT

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.