Git Product home page Git Product logo

lazycli's Introduction

lazycli

Turn static CLI commands into TUIs with ease

Demo Animation

Demo:

Usage

Pick a command that spits out either a list or table of content, like ls, docker ps, git branch, or git status --short. Then run lazycli -- <YOUR COMMAND>

lazycli -- ls

If you find yourself often using lazycli with a specific command, you can easily alias it like so:

echo "alias lcd=\"lazycli -- docker ps\"" >> ~/.zshrc
source ~/.zshrc
lcd

Right now some default keybindings are defined for common commands like ls, docker ps, git branch, git status --short, etc. But you can customise it for any commands you like! Just open the config file from within the program with $ and start playing around.

lazycli is best suited towards any command-line program that spits out a list of items or a table. In your commands, simply refer to the column number by $0 for the first column, $1 for the second column, etc, and lazycli will do the rest. There are plenty of starting examples in the config that you'll be able to draw from.

Installation

Via Cargo

cargo install --locked lazycli

Via binary

Download the binary from the Releases Page

Building from source

  1. clone the repo:
git clone https://github.com/jesseduffield/lazycli.git
  1. install
cargo install --locked --path .
  1. run
lazycli -- ls

QandA

  • Q: Isn't this what fzf does?
  • A: Not quite: fzf requires you to know the command ahead of time whereas lazycli lets you run commands after presenting you the data, and the content is refreshed after you run the command rather than the program closing (admittedly I haven't used fzf but I'm pretty sure that's all correct).

lazycli's People

Contributors

jesseduffield avatar figsoda 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.