ShellGPT - Use ChatGPT in the Terminal (Execute Commands in Natural Language): Update My System, List Files from Largest to Smallest, Help Me Install Docker... - Appinn#
#Omnivore
ShellGPT is a terminal tool that integrates ChatGPT and allows you to execute commands in natural language. For example, if you input "update my system," it will input "apt update && apt upgrade" for you. If you input "list files from largest to smallest," it will input "ls -lS" for you. It's very convenient for those who can't remember command lines.
It supports Linux, macOS, Windows, and is compatible with PowerShell, CMD, Bash, Zsh, and more. @Appinn
From Discovery Channel, recommended by classmate @DBin_K: https://meta.appinn.net/t/topic/53654/
ShellGPT: Operate Command Line with Natural Language | Open Source CLI Software#
Today I discovered an interesting project ShellGPT 4 | Chinese Introduction
Simply put, it allows you to use chatgpt in the command line. You need to provide your own API key or set up a local LLM model.
From my experience, the best feature it can achieve is operating the command line with natural language, which is very suitable for someone like me who is not good at remembering command usage. After asking a question, you can execute the command with one click, eliminating the need to switch back and forth between the browser and terminal software, copy and paste, switch between Chinese and English input methods, and so on. The experience is very smooth.
Installation and Usage#
It's also very easy to use. If you have Python environment, you can install it using pip.
After installation, type "sgpt" in the shell and press enter, then enter the key to start using it.
There are more specific configuration items in ~/.config/shell_gpt/.sgptrc, where you can specify the gpt model or change the API server domain name, etc. Personally, I think the GPT3.5 model is completely sufficient (the project defaults to GPT4).
The commands I use the most:
sgpt your question statement #direct question, if the question statement contains spaces, remember to use 'quotation marks'
sgpt -s command to generate #my favorite feature, -s is the abbreviation of --shell
Directly write the command to generate #then press Ctrl+L to directly generate the command, you need to install Shell integration, this is limited to bash, zsh.
Get It#
In addition, classmate @DBin_K provided a Chinese introduction page.
Original Article: https://www.appinn.com/shellgpt/