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 enter "update my system," it will help you enter "apt update && apt upgrade." If you enter "list files from largest to smallest," it will help you enter "ls -lS." 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: Operating 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, and switch between Chinese and English input methods. The experience is very smooth.
Installation and Usage#
It's also very simple 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 sufficient (the project defaults to GPT4).
The commands I use the most:
sgpt Your question statement #Directly ask, 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, which is limited to bash and zsh.
Get#
In addition, classmate @DBin_K provided a Chinese introduction page.
Original Article: https://www.appinn.com/shellgpt/