Code Monkey home page Code Monkey logo

nu-git-manager's Introduction

nu-git-manager

A collection of Nushell tools to manage git repositories.

Table of content

๐Ÿ’ก what is nu-git-manager [toc]

like ghq, nu-git-manager aims at being a fully-featured repository manager, purely written in Nushell.

it provides two main modules:

  • nu-git-manager itself which ships the main gm command
  • nu-git-manager sugar which exports a bunch of Git-related tools, e.g. to help use the gh command or augment the capabilities of git

๐Ÿ”— requirements [toc]

  • Nushell 0.89.0
    • with Cargo and cargo install nu
  • git 2.34.1
    • with Pacman and pacman -S extra/git
    • with Nix and nix run nixpkgs#git
  • gh (optional) 2.29.0 (used by sugar gh)
    • with Pacman and pacman -S community/github-cli
    • with Nix and nix run nixpkgs#gh

โ™ป๏ธ installation [toc]

git clone https://github.com/amtoine/nu-git-manager
  • activate the toolkit module with use toolkit.nu
  • install the nu-git-manager and nu-git-manager-sugar packages
toolkit install
  • verify the installation after restarting Nushell
gm version

Note if you are using the latest stable release of Nushell, then you should install nu-git-manager from the main branch, i.e. by default.

if you want to use the latest and hotest builds of Nushell, either by building from source yourself or using the nightly builds, you might want to checkout the nightly branch and install from there. this alternative branch should contain all fixes and newest features from the latest versions of Nushell ๐Ÿ”ฅ

โš™๏ธ usage [toc]

in your config.nu you can add the following to load nu-git-manager modules:

# load the main `gm` command
use nu-git-manager *

# the following are non-essential modules
use nu-git-manager-sugar extra *              # augment `gm` with additional commands

Note
please have a look at the documentation of NGM for more modules and commands

then you have access to the whole nu-git-manager suite ๐Ÿฅณ

๐Ÿ™ getting help [toc]

please have a look at the documentation of NGM

โ— some ideas of advanced (?) usage [toc]

everytime i open a terminal, i use Tmux to manage sessions, switch between them, detach and reattach, quite a BLAZZINGLY FAST workflow for my taste ๐Ÿ˜

to achieve this, i use the tmux-sessionizer.nu script, again installed with Nupm ๐Ÿ‘Œ

then, in my Tmux config, i have a binding to

  1. list all my Git repositories
  2. fuzzy-pick one of them with the main command of tmux-sessionizer.nu
  3. create or reattach to the session associated with the repository
# ~/.config/tmux/tmux.conf

NUPM_HOME="~/.local/share/nupm"
TMUX_SESSIONIZER="$NUPM_HOME/scripts/tmux-sessionizer.nu"

bind-key -r t display-popup -E "nu --commands '
    use $NUPM_HOME/modules/nu-git-manager *;\
    $TMUX_SESSIONIZER (gm list --full-path) --short\
'"

nu-git-manager's People

Contributors

amtoine avatar melmass 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.