AI Shell: A CLI that converts natural language to shell commands

AI Shell is an open source CLI inspired by GitHub Copilot X CLI that allows users to convert natural language into shell commands. With the help of OpenAI, users can use the CLI to engage in a conversation with the AI and receive helpful responses in a natural, conversational manner. To get started, users need to install the package using npm, retrieve their API key from OpenAI and set it up. Once set up, users can use the AI Shell in different modes, such as chat mode, silent mode, and can even customize OpenAI API endpoints, set preferred languages and view and set config options using an interactive UI.

Users can install the package by running the following command:

npm install -g

To set the API key, users need to run the following command:

ai config set OPENAI_KEY=<your token>

The AI Shell supports different modes:

  • Chat mode: users can engage in a conversation with the AI and receive helpful responses in a natural, conversational manner.
  • Silent mode: users can disable and skip the explanation section by using the flag -s or --silent.

Users can also customize OpenAI API endpoints, set preferred languages and view and set config options using an interactive UI. The default language is English, but users can switch to their preferred language using the corresponding language keys.

Users can upgrade to the latest version by running the following command:

npm update -g

The project is open to contributions, and users can contribute by fixing a bug or implementing a feature in Issues.

Special characters like ? or * can be wrapped in quotes to avoid issues.

Some users may encounter a 429 error from OpenAI, which is due to incorrect billing setup or excessive quota usage. Users can activate billing at and make sure to add a payment method if not under an active grant from OpenAI.

AI Shell was created for users who are not bash wizards and are looking for an easier way to convert natural language to shell commands.

AI Shell gives credit to GitHub Copilot for their amazing tools and the idea for this and to Hassan and his work on aicommits which inspired the workflow and some parts of the code and flows.

Users can join the discord and chat with others in the #ai-shell room.

Entities: Node.js, OpenAI, CLI, npm, API, GitHub Copilot, Hassan, bash wizards

Similar Posts

The Evolution and Challenges of AI Assistants: A Generalized Perspective

AI-powered language models like OpenAI's ChatGPT have shown extraordinary capabilities in recent years, transforming the way we approach problem-solving and the acquisition of knowledge. Yet, as the technology evolves, user experiences can vary greatly, eliciting discussions about its efficiency and practical applications. This blog aims to provide a generalized, non-personalized perspective on this topic.

In the initial stages, users were thrilled with the capabilities of ChatGPT including coding … click here to read

Exploring GPT-4, Prompt Engineering, and the Future of AI Language Models

In this conversation, participants share their experiences with GPT-4 and language models, discussing the pros and cons of using these tools. Some are skeptical about the average person's ability to effectively use AI language models, while others emphasize the importance of ongoing learning and experimentation. The limitations of GPT-4 and the challenges in generating specific content types are also highlighted. The conversation encourages open-mindedness and empathy towards others' experiences with AI language models. An official … click here to read

Transforming LLMs with Externalized World Knowledge

The concept of externalizing world knowledge to make language models more efficient has been gaining traction in the field of AI. Current LLMs are equipped with enormous amounts of data, but not all of it is useful or relevant. Therefore, it is important to offload the "facts" and allow LLMs to focus on language and reasoning skills. One potential solution is to use a vector database to store world knowledge.

However, some have questioned the feasibility of this approach, as it may … click here to read

Programming with Language Models

Programming with language models has become an increasingly popular approach for code generation and assistance. Whether you are a professional programmer or a coding enthusiast, leveraging language models can save you time and effort in various coding tasks.

When it comes to using language models for code generation, a direct prompting approach may not yield the best results. Instead, utilizing a code-writing agent can offer several advantages. These agents can handle complex coding tasks by splitting them into files and functions, generate code iteratively, … click here to read

Exploring the Potential: Diverse Applications of Transformer Models

Users have been employing transformer models for various purposes, from building interactive games to generating content. Here are some insights:

  • OpenAI's GPT is being used as a game master in an infinite adventure game, generating coherent scenarios based on user-provided keywords. This application demonstrates the model's ability to synthesize a vast range of pop culture knowledge into engaging narratives.
  • A Q&A bot is being developed for the Army, employing a combination of … click here to read

Re-Pre-Training Language Models for Low-Resource Languages

Language models are initially pre-trained on a huge corpus of mostly-unfiltered text in the target languages, then they are made into ChatLLMs by fine-tuning on a prompt dataset. The pre-training is the most expensive part by far, and if existing LLMs can't do basic sentences in your language, then one needs to start from that point by finding/scraping/making a huge dataset. One can exhaustively go through every available LLM and check its language abilities before investing in re-pre-training. There are surprisingly many of them … click here to read

© 2023 All rights reserved.