Giter Club home page Giter Club logo

wgit's Introduction

Wgit

Get only desired files from a repository.

made-with-Go MIT license

Introduction

Aren't you done of cloning a whole repository just to get a single file ?
Wgit is the tool made for you.
Be able to retrieve only desired files from a repository.

Features

  • In-memory clone
  • Repository navigation
  • Simple configuration
  • Intuitive interface
  • Multiple authentication methods
  • Easy-to-use
  • Cross-platform

๐Ÿง  In-memory clone

Wgit clones the desired repository in memory. This prevents writing to disk unnecessarily. It extends the life of your disk.

Info("Cloning github.com/go-git/go-billy in memory")
storer := memory.NewStorage()
bfs := memfs.New()

r, err := git.Clone(storer, bfs, &git.CloneOptions{
    URL: "https://github.com/go-git/go-billy",
})

๐Ÿšข Repository navigation

Wgit allows you to navigate inside a Git repository directly from your terminal.

๐Ÿ“„ Simple configuration

Wgit is easily configurable on first launch. It asks you few questions and store it in a file ($HOME/.config/wgit/config.json). The prompt will ask you for the following things :

  • Git username
  • Default repository
  • Prefered authentication method (SSH/HTTP/Access Token)
  • Access token (with at least read rights)

Here is an exemple of configuration file:

{
  "Username": "atsika",
  "Token": "XXXXXXXXXXXXX",
  "SSHkeyPath": "/home/atsika/.ssh/id_rsa",
  "Repository": "https://github.com/atsika/test-wgit",
  "AuthMethod": "Access Token"
}

โŒจ๏ธ Intuitive interface

Wgit is designed with an intuitive TUI to make it usage simple. It shows messages on file selection/removal. Pressing Ctrl + C will pop an action menu with the following options:

  • Back: go back to file selection
  • List selected files: displays all selected files as a list
  • Get selected files: downloads all selected files to current directory
  • Exit: quit the program

๐Ÿ”‘ Multiple authentication methods

Wgit allows you to authenticate to your Git server using following methods:

  • SSH (will require you to set SSH private key path)
  • Access Token (will require you to set an access token)
  • HTTP (uses username and prompt you for password)

๐Ÿ”ฐ Easy-to-use

With few clicks, Wgit allows to rapidly and easily perform some basic tasks like grabbing some juicy code from Github that would take your more actions than if it were done by the tool.
Wgit embeds a search filter so you could find your files faster.

๐Ÿ’ก When setting up configuration, auto-completion is enabled for SSH private key full path.

๐Ÿค Cross-platform

Since Wgit is made in Go and is using full cross-platform packages, it should run on any platform.

โš ๏ธ Currently only tested on:

  • Linux Fedora 34

Feel free to test it on other platform and submit a merge request with updated README.md.

Installation

Clone the repo and build wgit using Go. Move it somewhere in PATH so you can call it from anywhere.

git clone https://github.com/Atsika/wgit.git
cd wgit
go build
chmod +x wgit
sudo cp wgit /usr/local/bin

Usage

Simply call the wgit binary and follow the instructions. On first launch you will be prompted for some informations. Next times, you will be asked if you want to use the configuration file or not.

wgit

TODO

  • Waiting you to tell me :)
  • File content preview

Credits

Those amazing packages:

License

MIT License (see LICENSE).

Author

Made with โค๏ธ by Atsika (@_atsika)

wgit's People

Contributors

atsika avatar

Stargazers

 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.