Skip to content

tatthien/cmdgpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmdgpt

cmdgpt is a command line tool that use ChatGPT to generate Linux commands from your natural language.

Features

  • 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 or copy the reponse command
  • Check if the response commands are safe/risk to run
  • Auto fix commands

Prerequisites

You need to have OPENAI_API_KEY environemnt variable configured.

export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Installation

Using go

go install github.com/tatthien/cmdgpt@latest

Pre-built binaries

You can download the pre-built binaries for macOS, Linux, and Window from the releases page

Usage

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

asciicast

More CLI tools using AI

  • askgpt - Ask ChatGPT without leaving your terminal

About

CLI tool that using ChatGPT to generate linux commands from your natural language

Resources

Stars

Watchers

Forks