Skip to main content

AI for Linux

Chapter #5: How to Automate Linux Admin Tasks with ShellGPT AI

ShellGPT is an AI-powered CLI tool that helps you generate commands, code, and docs right from your Linux terminal.

ShellGPT is another tool that we can use to make our terminal supercharged and powerful using the power of the OpenAI model.

ShellGPT, unlike other tools such as Fabric and TerminalGPT, is an automation and Linux sysadmin tool that helps manage and use Linux simply, offering lots of functionality and capabilities.

What is ShellGPT

ShellGPT is a Python library that uses, behind the scenes, the OpenAI model to achieve all the tasks assigned to it. Easy to install and use, all you need is one command, and you won’t need to leave the terminal again.

This tool, by default, uses OpenAI and doesn’t support other LLMs like the other tool we used before, but there is an option to use a local LLM hosted locally.

However, as stated in the documentation, the tool is not optimized for this purpose, making it the best choice to use an OpenAI key.

ShellGPT has many functionalities like other tools, offering text analysis, command creation, explanation, code debugging, and so on.

The cool thing this tool offers is that it can be integrated into the terminal, so you don’t need to type the name followed by the command each time.

Just type what you want directly in the terminal and use a hotkey, and the tool will execute it.