banner
Leo

Leo的恒河沙

一个活跃于在珠三角和长三角的商业顾问/跨境电商专家/投资人/技术宅/骑行爱好者/两条边牧及一堆小野猫的王/已婚;欢迎订阅,日常更新经过我筛选的适合精读的文章,横跨商业经济情感技术等板块,总之就是我感兴趣的一切

2024-03-10-ShellGPT - Using ChatGPT in the terminal (executing commands in natural language): Update my system, list files from largest to smallest, help me install Docker... - Xiaozhong Software

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

ShellGPT - Use ChatGPT in the Terminal (Execute Commands in Natural Language): Update My System, List Files from Largest to Smallest, Help Me Install Docker... 1

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.

ShellGPT - Use ChatGPT in the Terminal (Execute Commands in Natural Language): Update My System, List Files from Largest to Smallest, Help Me Install Docker... 2

ShellGPT - Use ChatGPT in the Terminal (Execute Commands in Natural Language): Update My System, List Files from Largest to Smallest, Help Me Install Docker... 3

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/

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.