Code Monkey home page Code Monkey logo

cl's Introduction

cl

cl (short for Command List) is a way to group all your aliases, once in a while commands or multiple commands with a lot of args in an organized and human readable place

how to install

macOs (intel and silicon) and Linux using homebrew:

$ brew tap rvigo/cl
$ brew install cl 

If you use ZSH, an autocomplete script will be installed with the application.

usage

Using the application interface to add, edit, and run commands:

$ cl

Overview Gif

Using the application's CLI to execute stored commands:

$ cl exec <your command alias>

If you are using the ZSH shell and fzf, a widget can be installed with cl config zsh-widget --install. After that, you can call the exec function (with some cool autocomplete features) pressing CTRL+O

You can pass args and flags to the stored command:

# the stored command is `docker` and the alias is `d`
$ cl exec d -- ps # same as `docker ps` 
$ cl exec d -- ps --help # same as `docker ps --help` 

You can also set variables in your command and pass them as named parameters:

# the stored command is `echo "hello #{name}, #{greetings}"` and the alias is `echo`
# the parameters names should match the variables names in your command
$ cl exec echo -- --name="John Doe" --grettings "welcome!" 
> "hello John Doe, welcome!"

A more real world example:

# the stored command is `aws-vault exec #{aws_account} -- #{command}` and the alias is `av_exec`
# note that you can mix the program flags and args with the named parameters
$ cl exec av_exec -- --aws_account="dev" --command="aws s3 ls" --duration=2h

Importing/exporting your aliases is possible using the share subcommand:

# the command bellow will generate the file `shared.toml` in the current working directory by default, with all aliases present in the `git` namespace as provided
$ cl share export --namespace git 
# the command bellow will import all aliases from a file in the specified location. 
# you can also choose which namespace will be imported
$ cl share import -f `path/to/shared.toml`

cl's People

Contributors

dependabot[bot] avatar rvigo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cl's Issues

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.