Skip to content

Johardt/plz-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copilot, for your terminal (Fork)

A CLI tool that generates shell scripts from a human readable description.

Note: This is a fork of m1guelpf/plz-cli with modern API improvements. See Improvements section below.

Installation

You can install plz by running the following command in your terminal.

Quick Install (Recommended)

Run the installation script:

curl -fsSL https://raw.githubusercontent.com/Johardt/plz-cli/main/install.sh | sh -

Build from source

git clone https://github.com/Johardt/plz-cli.git
cd plz-cli
cargo build --release
sudo cp target/release/plz /usr/local/bin/

Usage

plz uses GPT-4o-mini. To use it, you'll need to grab an API key from your admin api, and save it to OPENAI_API_KEY as follows (you can also save it in your bash/zsh profile for persistance between sessions).

export OPENAI_API_KEY='sk-XXXXXXXX'

Once you have configured your environment, run plz followed by whatever it is that you want to do (plz show me all options for the plz cli).

To get a full overview of all available options, run plz --help

$ plz --help
Generates bash scripts from the command line

Usage: plz [OPTIONS] <PROMPT>

Arguments:
  <PROMPT>  Description of the command to execute

Options:
  -y, --force    Run the generated program without asking for confirmation
  -h, --help     Print help information
  -V, --version  Print version information

Model

You can also configure the name of the model to use or change the base URL.

export OPENAI_API_MODEL='gpt-XXXXXXXX'    # Default gpt-4o-mini
export OPENAI_API_BASE='https://XXXXXXXX' # Default https://api.openai.com/v1

Improvements

This fork is based on the pull request by joserick on the original m1guelpf/plz-cli project.

Develop

Make sure you have the latest version of rust installed (use rustup). Then, you can build the project by running cargo build, and run it with cargo run.

License

This project is open-sourced under the MIT license. See the License file for more information.

About

Copilot for your terminal

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 76.0%
  • Shell 24.0%