Shell GPT briefly explained: AI for the command line

Technology

If ChatGTP can write scientific articles and working programs, then surely it also knows the right command-line command to find all the files created today or the process that is consuming the most resources. Sure you could Chat GPT ask how to do it on macOS or that on linux and copy the output to terminal. But there is an easier way.

ShellGPT, sgpt for short, brings the functionality of generative language models to the command line. The Python program uses GPT 3.5 or GPT 4 via the OpenAI API and can be easily integrated with pip install shell-gpt to install. Unless the environment variable $OPENAI_API_KEY is not set, the tool will ask for an OpenAI API key on first launch, which requires a subscription.

The key, along with other preferences, is stored in the user’s home directory at .config/shell_gpt/.sgptrc. Here you can also set Which model to use by default: gpt-3.5-turbo, the more powerful GPT-3.5 model variant, gpt-4, or gpt-4-32k with a larger context length than gpt-4. When calling sgpt, the option changes --model the model temporarily.

To the home page

Leave a Reply

Your email address will not be published. Required fields are marked *