GithubHelp home page GithubHelp logo

prj's Introduction

prj

prj is a command line tool that helps you jump between your local git repositories.

Features

  • Fast fuzzy find your project thanks to fuzzy-matcher
  • Displays git information from each project:
    • Last commit summary
    • Currently checked out branch
    • Pending/uncommitted changes

Demo

screenshot of demo

Installation

MacOS (With Homebrew)

brew tap jordwest/homebrew-tools
brew install prj

All platforms

Note openssl must be installed.

This hasn't yet been tested on other platforms, but binaries are available for Windows, Linux and MacOS.

Check the Releases tab for the latest build.

Compiling from source

First install Rust, then run:

cargo install prj

Setup

Set the root to search projects with:

prj configure

This will create a .prj file in your home directory containing the configuration in TOML format.

Usage

prj list

Running prj list will show an interactive fuzzy search.

Start typing to search the list. Projects marked with * and highlighted in red are projects with uncommitted changes.

<TAB> cycles through the repository information displayed in the second column.

<ESC> cancels and exits.

When a project is selected, the path to the project will be sent to stdout. You can cd into the selected directory with cd $(prj list), however the recommended way to jump to projects is to add a function to your .bashrc or .profile:

function p() {
	local dir
	dir=$(prj list) && cd $dir
}

Once you've added this function, reopen your terminal and run p from anywhere.

Roadmap

prj's People

Contributors

jordwest avatar

Stargazers

Andrew Johnson avatar

Watchers

 avatar James Cloos avatar

prj's Issues

Caching

Running prj on large repositories can take some time to resolve the git information. The results could be cached to populate the list virtually instantly, while up to date results are fetched in the background.

Faster CLI rendering

Rendering is currently a bit slow and flashes when changing selection as we're redrawing the entire screen. This can be optimised to render only what's changed.

Auto clone projects to a smart location

Add a prj clone command that automatically creates a directory under your root based on the remote path. For example, running this command from any directory:

prj clone [email protected]:jordwest/prj.git

Will clone the repository to:

$PROJECT_ROOT/github.com/jordwest/prj/

Last commit's date/timestamp

The repository information column should also show the last commit date and time. The last commit time can be used in the scoring of search results, so that more recently used repositories

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.