We are pleased to announce AI Shell AI Shell enhances AI functionality for your shell, making it easier to interact with the command line.AI Shell creates an interactive shell that not only interacts with a wide range of large language models, but also provides a framework for you to build customized systems based on your needs. Users can interact with the AI agent through dialog.
The AI Shell program includes:
- Command Line Shell (
aish
) Interface - A Framework for Creating AI Agents and Other Ancillary Function Providers
- PowerShell modules for deep integration with PowerShell
- Built-in AI agent for immediate assisted support
Each AI assistant is referred to as an agent. the initial version of AI Shell includes two agents:
- Azure OpenAI Agent: Provide generalized auxiliary functions.Azure OpenAI Agents can use any of the AI models provided by Azure OpenAI for a wide range of queries, natural language interpretation, or code generation. If you need more privacy, management of model settings, or to use models trained on your own data, you can connect to your Azure OpenAI deployment. In addition, you can also leverage OpenAI models.
- Copilot in Azure: This agent will Copilot in Azure brings the power of the Azure CLI directly to your CLI. it focuses on providing cloud-centric assistive functionality with support for Azure CLI and Azure PowerShell commands to help you automate Azure-related tasks. To get started with the Copilot agent, you need to log in to Azure through the Azure CLI using an account with Azure Copilot access.
The Azure OpenAI agent requires additional configuration to connect to your Azure OpenAI instance. Please follow the instructions provided when launching the agent.
Considering that you may have different CLI command needs, AI Shell provides a framework for you to create your own agents. For more information, see Creating a ProxyThe
Using and Installing the AI Shell
We know that every CLI user has their own preferences, so AI Shell offers two flexible modes to fit your workflow:
executable file
You can use the AI Shell as a standalone executable, allowing it to run independently of any Shell. This setup is ideal for users who want a dependency-free, simplified experience.
Parallel integration with PowerShell 7
This is the recommended way to use AI Shell because it supports uninterrupted workflows.AIShell modules will aish
tool connects to your PowerShell 7 session to provide a deeply integrated user experience.The AI Shell opens in a side window next to the PowerShell 7 session, allowing seamless communication between panes, and the results of the chat can be easily passed to the PowerShell session for execution while the AI agent can be used to resolve PowerShell errors.
Installation and Quick Start
There are a number of system requirements that need to be met in order to run the AI Shell.
AI Shell (aish
) and AIShell The modules are downloaded separately. For your convenience, we provide a script to help you download and install them.
Windows (computer)
There are some prerequisites for running AI Shell on Windows.
- Windows 10 or later
- PowerShell 7.4.6 or higher
- Windows Terminal
The following installation script will:
- commander-in-chief (military)
aish.exe
mounted on$env:LOCALAPPDATA\Programs\AIShell
and add it to your PATH - commander-in-chief (military) AIShell Module installation to your module path location
macOS
Running AI Shell on macOS requires some prerequisites.
- macOS v13 Ventura or higher
- PowerShell 7.4.6 or higher
- iTerm2 terminal applications
On macOS, this script will:
- commander-in-chief (military)
aish
The executable is installed into the/usr/local/AIShell
and in/usr/local/bin/aish
Creating a symbolic link - Due to certain limitations.AIShell The module will not be installed
This script is only available for Windows and macOS systems. Linux users will need to follow the manual installation instructions.
To install the AI Shell, run the following command in a PowerShell session:
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-aishell.ps1') }"
For more information on manual installation, see Manual Installation of AI ShellThe
After running the installation script, you can run Start-AIShell
Start using AI Shell.
The AI Shell launches as a parallel experience. You can start the AI Shell by using the @<代理名称>
command to switch between agents. For example, to switch to the Azure OpenAI agent, you can use the @openai-gpt
command. Alternatively, you can use the @<代理名称> <问题>
Send the question to the agent immediately.
Inserting code into a PowerShell 7 session
Copying and pasting large amounts of code can be annoying. the AI Shell does this through the /code post
command makes it easy to insert AI-generated code directly into a PowerShell 7 session. In the AI Shell, run /code post
Or use the shortcut Ctrl+d, Ctrl+d to copy the code into a PowerShell session.
If you are familiar with PowerShell 7, you probably also know that the Predictive Intellisense Function. When you get a multi-step command in an AI Shell response, you can easily load each subsequent step into the Predictive Intellisense cache.
Faster error resolution
If you encounter an error in your work terminal, you can use the Resolve-Error
The cmdlet sends the error to an open AI Shell window for resolution. This command asks the AI model to help you resolve the error.
Calling AIShell from PowerShell 7
A key scenario we want to support is piping the output of a command to the AI Shell for more information or to ask questions about given data. Using the Invoke-AIShell
command, you can easily complete this operation.
Invoke-AIShell
It can receive input from the pipeline, or it can be used to directly invoke the AI agent selected in the AI Shell without switching back and forth.
Some additional tips for using the AI Shell
AI Shell has other chat commands and shortcuts to make it easier to use. For a complete list of chat commands, see the AI Shell Reference DocumentationThe
Shortcut Binding | command | functionality |
---|---|---|
Ctrl+d, Ctrl+c | /code copy |
commander-in-chief (military) possess Copy the generated code snippet to the clipboard |
Ctrl+ | /code copy |
connect sb. with sth. n Copy the generated code snippet to the clipboard. |
Ctrl+d, Ctrl+d | /code post |
commander-in-chief (military) possess Generated code snippets are published to connected applications |
Ctrl+d, | /code post |
connect sb. with sth. n The generated code snippet is published to the connected application. |
In addition, you can use the following keyboard shortcuts to switch between panes more easily.
Shortcut Binding | functionality |
---|---|
Alt+RightArrow | Move the cursor to the right AI Shell pane. |
Alt+LeftArrow | Move the cursor to the left PowerShell pane. |
Why try AI Shell?
AI Shell is designed for those who want intelligence and adaptability from the command line. With multi-agent support, AI Shell strives to be an assistant to any CLI tool. You'll benefit from advanced AI features, deeper PowerShell session integration, and an extensible model to get the help you need.
Call to Action!
This public preview is just the beginning. We would love to hear your feedback and insights to optimize AI Shell to better serve the CLI and PowerShell community. Download it immediately in PowerShell with the following command:
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-aishell.ps1') }"
Be sure to explore the capabilities of Copilot in Azure and Azure OpenAI agents to take command line productivity to the next level! We welcome your feedback on the current tool, and you can find out more about it in the aka.ms/AIShell-Feedback Sign up to get early access to new features.