Skip to content
/ plz Public

personal adaptation of github.com/m1guelpf/plz-cli

Notifications You must be signed in to change notification settings

moul/plz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

plz-cli in Go

This is a Go adaptation of the plz-cli tool originally developed by Miguel Piedrafita. This tool is designed to generate and execute shell commands using OpenAI's GPT-3 model.

What it does

The program takes a prompt from the command line arguments, sends it to the OpenAI API, and receives a shell command generated by the GPT-3 model. The user is then asked whether they want to execute the generated command. If they confirm, the command is executed and the output is printed to the console.

Usage

plz [OPTS] PROMPT...

Options:

  • -api-base: API base URL (default: "https://api.openai.com/v1")
  • -api-key: API key (default: value of the OPENAI_APIKEY environment variable)
  • -model: Model to use (default: "gpt-3.5-turbo-instruct")
  • -f: Run the generated program without asking for confirmation
  • -q: Minimal output
  • -debug: Additional debug

The prompt is taken from the command line arguments. For example, if you run plz Hello World, the prompt will be Hello World.

Install

go install moul.io/plz@latest

Credits

This tool is based on the plz-cli tool developed by Miguel Piedrafita. This version is a personal adaptation by Manfred Touron, tailored to his specific needs.

License

This project is open source and available under the MIT License.

About

personal adaptation of github.com/m1guelpf/plz-cli

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages