Microsoft Launches AI Shell Preview with Azure OpenAI and Copilot Integration

Microsoft has released AI Shell as a public preview version. This project enhances the command line shell with AI capabilities, providing interaction options with Azure OpenAI and Copilot in Azure. It can be used as a standalone application or with Microsoft’s open-source shell, PowerShell 7.

AI Shell includes a command-line shell interface, a framework for creating AI agents, a PowerShell module, and two integrated AI agents:

  • The Azure OpenAI agent can use any AI model provided by Azure OpenAI. According to Microsoft, it is suitable for a wide range of requests, natural language interpretations, and code generation. This agent can connect to deployed Azure OpenAI models if more privacy or model setting management is desired, or if there is already a model trained with one’s own data.
  • The Copilot in Azure tool is in preview and specializes in cloud-centric assistance. The Copilot in Azure agent offers Azure CLI and Azure PowerShell commands to help automate Azure-specific tasks. Using this requires logging into Azure with Azure CLI using an account with an IAM role (Identity and Access Management) to access Copilot in Azure. Note that additional configurations are necessary for this agent, which are mentioned at its launch.

Developers can install AI Shell as a standalone program that runs independently of other shells. However, Microsoft recommends using AI Shell as a module that connects with a PowerShell 7 session. AI Shell then opens next to PowerShell 7 in a subwindow. This setup allows results from the AI chat to be directly transferred to the PowerShell session, simplifying input execution and error resolution. If an error message occurs in the terminal, the command resolve-error can be used to send it to the AI Shell window and request help from the AI model.

Switching between the two available AI agents is possible using the command @<agent name>. For example, to switch to the Azure OpenAI agent, use @openai-gpt. Alternatively, developers can directly ask the desired AI agent by using @<agent name> <question>.

AI Shell is available for Windows, macOS, and Linux. An installation script is available for Windows and macOS, while Linux users must follow manual installation instructions. Support for the AI Shell module in Linux is not provided. Windows users need Windows 10 or higher, PowerShell 7.4.6 or higher, and Windows Terminal. macOS users require macOS 13 Ventura or higher, PowerShell 7.4.6 or higher, and the iTerm2 terminal app (limited support). Linux requirements include Ubuntu 20.04 or higher, PowerShell 7.4 or higher (recommended), and any terminal emulator supported by the operating system.

Further information about the preview release can be found on Microsoft’s developer blog.