The open-source tool shell-ai now provides artificial intelligence support at the command line. Developer Rick Lamers promises that users will never have to enter a shell command again. It’s not quite that simple, of course, but shell-ai suggests useful commands and parameters to friends of the command prompt.
Advertisement
The full-bodied promise hat Lamers on Twitter – or better X – given. There he refers to the Github page of the project. It is a Python tool. It is easy to install with the pip install shell-ai command.
shell-ai: AI assistant uses OpenAI API
After the installation, interested parties still have to create a configuration file. In it, shell-ai searches for the secret and individual OpenAI API key, which can be found or created in the account settings. Users also set the ChatGPT model to be used there. The content of the config.json file looks like this:
{
“OPENAI_API_KEY”: “der-geheime_API-Key”,
“OPENAI_MODEL”: “gpt-3.5-turbo”,
“SHAI_SUGGESTION_COUNT”: “3”
}
With mkdir ~/.config/shell-ai, users create the directory in which shell-ai will look for the configuration file. If you use Windows instead of Linux or macOS, create the file in the %APPDATA%\shell-ai\ folder.
This completes the preparations and shell-ai can be started by calling the shai command. The command accepts the description of the task in all languages supported by OpenAI, including German. The suggested command line commands then use any necessary English terms.
Advertisement
shell-ai suggests commands that can accomplish the given task.
(Bild: Screenshot heise online / dmk)
In the background, shell-ai relies on the LangChain libraries, a framework for the simplified use of Large Language Models (LLMs) and on InquirerPy, which controls the functions for command selection on the command line. Users should always check the generated command line commands for plausibility.
It’s entirely conceivable that ChatGPT might suggest useless to destructive variants, although that wasn’t the case in our anecdotal testing. To quickly compose commands with parameters, shell-ai can be useful since users don’t have to study complete man-pages with parameter lists first.
AI tools can be found for more and more areas. About a month ago, it became known that Google was testing an AI tool for writing news. However, AI still has its pitfalls and does not work flawlessly.
(dmk)
To home page
#shellai #Open #source #tool #helps #command #line