Giter VIP home page Giter VIP logo

git-repo-manager's Introduction

Git Repository Manager PRs Welcome Build Status

Plase note that the API will strongly evolve until the stable version in 1.0.0. Do not use if you're looking for a stable software.

GRM : A light git repository manager written in Rust for use in terminal

Available with :

  • Bash
  • Zsh (work in progress)
  • Powershell (work in progress)

Demo with bash

USAGE:
    grm(.exe) [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    add     Search and add your git repositories for a given path; default path is the current directory
    goto    Go to the repository directory
    help    Prints this message or the help of the given subcommand(s)
    list    List your saved repositories for the given pattern
    rm      Remove a git repository from the list

Getting started

Waiting the final installation process, you can use the following steps to install GRM :

Setup

Download the repository and build the binary

Clone the repository and build the project (with cargo or rustc, it's up to you) :

git clone [email protected]:theredfish/git-repo-manager.git
cd git-repo-manager
cargo build --release

Setup the installation folder

Linux

mkdir ~/.grm
cd git-repo-manager

# Copy the bash wrapper and the completion file
cp wrapper_scripts/grm.sh ~/.grm
cp completion_scripts/grm.bash-completion.sh ~/.grm

# Copy the binary
cp target/release/grm ~/.grm

Windows (powershell)

mkdir ~/.grm

Copy the powershell wrapper
cp grm.ps1 ~/.grm

# Copy the binary
cp target/release/grm.exe ~/.grm

Setup grm alias

Linux

# Edit your ~/.bashrc or your ~/.bash_aliases with these lines
source ~/.grm/grm.bash-completion.sh
alias grm='source ~/.grm/grm.sh'

# Reload your bashrc
source ~/.bashrc

Windows

More information here.

First you need to change your execution policy :

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Next, create your Windows Powershell profile if doesn't exist :

# Microsoft.PowerShell_profile.ps1 already exists
cd $env:USERPROFILE\Documents
md WindowsPowerShell
cd WindowsPowerShell
New-Item Microsoft.PowerShell_profile.ps1 -ItemType "file"

Then edit Microsoft.PowerShell_profile.ps1 to add your alias :

# You must split args one by one, grm can handle two arguments
function GrmCall {
    ~/.grm/grm.ps1 $args[0] $args[1]
}

Set-Alias grm GrmCall

Finally source your profile :

. $PROFILE

Development

Prerequisites

  • Rust 1.37

SQLite3

Install the following dependencies (it may change depending of your distribution):

# OS dependencies
sudo apt-get install libsqlite3-dev

# Diesel CLI with sqlite only
cargo install diesel_cli --no-default-features --features sqlite

Or avoid installing OS dependencies by playing with the bundled libsqlite3-sys in diesel_cli.

Manage wrapper scripts

TODO

Features

This project is work in progress, here the list of expected features :

must-have features

  • add repositories
  • list repositories
  • change directory for a given repository name
  • remove repository
  • refresh repositories (delete dead ones and add new ones)
  • list repositories with filters / pattern

nice-to-have features

  • parallelized search
  • categorize repositories
  • installation script

migrations and updates

  • automatic migrations
  • always make a save of grm.db before a migration
  • if a migration fails, restore the previous version

system wrappers

  • grm powershell script wrapper for built-in commands
  • grm bash script wrapper for built-in commands
  • bash auto-completion
  • powershell auto-completion
  • zsh auto-completion

not so sure

git-repo-manager's People

Contributors

theredfish 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.