cmdgpt
is a command line tool that use ChatGPT to generate Linux commands from your natural language.
- Generate commands based on your input. For example,
show git logs with author and message
=>git log --pretty=format:"%an - %s"
- Allow you to
run
orcopy
the reponse command - Check if the response commands are safe/risk to run
- Auto fix commands
You need to have OPENAI_API_KEY
environemnt variable configured.
export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
go install github.com/tatthien/cmdgpt@latest
You can download the pre-built binaries for macOS, Linux, and Window from the releases page
Simply run cmdgpt
and ask for a command. You can try to copy one of these following commands to ask:
- search for a string within an output
- create a post request with curl
- list all file types with count
- create a directory and its parent if no exist
- askgpt - Ask ChatGPT without leaving your terminal