2.2.0 • Published 1 year ago

gpterminal v2.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

gpt

Based on gptsh by shorwood

gptsh is a cross platform CLI tool built with NodeJS and powered by Open AI's GPT-3. It's main purpose is to translate natural language questions and requests into shell commands. Heavily inspired by projects such as nlsh and cmdxyz, it can easily be installed and used in conjunction with your classic shell environment.

This tool is not meant as a complete replacement for all of you shell commands. It's role is to integrate into your standard shell workflow to help you make generic task which commands you dont know by heart. For example, when compressing or uncompressing a files, using new frameworks, searching files on your system and much more...

• Demo

• Installation

Use the package manager NPM or Yarn to install GPTerminal globally on your system.

npm install --global gpterminal
yarn global add gpterminal

• Getting started

To use this tool, you will need to set OpenAI API key either as an environment variable.

OPENAI_SECRET_KEY=<YOUR_SECRET_KEY>
OPENAI_ENGINE_ID=engine=code-davinci-002

As a option while executing the command.

gpt <input> --secret <YOUR_SECRET_KEY>

Or in the ~/.gpterminalrc file.

secret=sk-**************
engine=engine=code-davinci-002
platform=linux

• Usage

Usage: gpt <input> [options]

Options:
      --version      Show version number                               [boolean]
  -s, --secret       OpenAI API key for authentication                  [string]
  -e, --engine       ID of the engine to use                            [string]
  -t, --tokens       Maximum number of tokens to consume [number] [default: 100]
      --temperature  Higher values means the model will take more risks
                                                         [number] [default: 0.0]
  -p, --platform     Platform of the command to output                  [string]
  -n                 Number of completions to generate                  [number]
      --help         Show help                                         [boolean]

• Examples

$ gpt install node 12 repository
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ gpt add yarn bin folder to path on zsh
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.zshrc
$ gpt List all files of this directory | bash
LICENSE  data  node_modules  package.json  src  yarn.lock
$ gpt Install the lodash package using yarn --secret <YOUR_SECRET_KEY>
yarn add lodash
$ gpt Delete the root directory --engine ada
rm -rf /
$ gpt Add remote from github with name goulartnogueira/gptsh
git remote add goulartnogueira https://github.com/goulartnogueira/gptsh.git

Oh, and it works for other platforms too.

PS C:\WINDOWS\system32> gpt Add a new user --platform win32
Add-ADUser -Name "username" -SamAccountName username -AccountPassword (Read-Host -AsSecureString "Password") -Enabled $true -ChangePasswordAtLogon $false
$ gpt Add a new user --platform aix
mkuser username

• Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

• License

MIT

2.2.0

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago