We’re thrilled to unveil the general public preview of AI Shell! AI Shell enhances your shell with AI
capabilities to facilitate your interactions with the command line. AI Shell create an interactive
shell that may work together with numerous giant language mannequin and offers a framework that you should utilize
to construct a customized system that meet your wants. Customers can work together with the AI brokers in a
conversational method.
The AI Shell mission contains:
- The command-line shell (
aish
) interface - A framework for creating AI brokers and different help suppliers
- A PowerShell module for deeper integration with PowerShell.
- Inbuilt AI brokers to get you began help instantly
Every AI assistant is called an agent. The preliminary launch of AI Shell contains two brokers:
- Azure OpenAI Agent: Powering general-purpose help, the Azure OpenAI agent can
use any of the AI fashions offered by Azure open AI to deal with broad queries, pure language
interpretations or code era. You may join it to your deployed Azure OpenAI fashions if
you might be on the lookout for extra privateness, administration of the mannequin settings, or have a mannequin educated with
your information. Moreover, it’s also possible to make the most of OpenAI’s fashions. - Copilot in Azure: This agent brings the ability of Copilot in Azure on to your CLI.
It focuses on delivering cloud-centric help, offering Azure CLI and Azure PowerShell
instructions and serving to you automate your Azure-specific duties.To get began with the Copilot in Azure agent you want register to Azure with Azure CLI with an account that has the IAM position for accessing Copilot in Azure.
NOTE
The Azure OpenAI agent wants extra configuration to hook up with your Azure OpenAI occasion. To get began, comply with the directions offered while you begin begin the agent.
Recognizing that you could have totally different CLI command wants, AI Shell offers a framework for
creating your individual brokers. For extra data, see Creating an Agent.
Utilizing and Putting in AI Shell
We all know each CLI person has their very own preferences, so AI Shell gives two versatile modes to suit your
workflow:
Standalone Executable
You need to use AI Shell as a self-contained executable, permitting it to run independently from any
shell. This setup is ideal for those who’re on the lookout for a devoted, streamlined expertise that’s simply
accessible with out dependencies.
Facet-by-Facet Integration with PowerShell 7
That is the really helpful methodology for utilizing AI Shell as a result of it allows an uninterrupted work circulate. The
AIShell module connects the aish
instrument to your PowerShell 7 session for deeply built-in person
expertise. AI Shell opens in a aspect pane proper subsequent to your PowerShell 7 session that permits a
wealthy communication between panes, outcomes from the chat might be carried seamlessly to your PowerShell
session for straightforward execution and the AI agent can be utilized to offer help to resolve a
PowerShell error.
Set up and Getting Began
Some system necessities are wanted to run AI Shell.
AI Shell (aish
) and the AIShell module are separate downloads. On your comfort, we
created a script to obtain and set up them for you.
Home windows
Some stipulations are wanted to run AI Shell on Home windows.
- Home windows 10 or larger
- PowerShell 7.4.6 or larger
- Home windows Terminal
The next set up script will:
- Installs
aish.exe
to$env:LOCALAPPDATAProgramsAIShell
and provides it to your PATH - Installs the AIShell module to your module path location
MacOS
Some stipulations are wanted to run AI Shell on MacOS.
- macOS v13 Ventura or larger
- PowerShell 7.4.6 or larger
On MacOS, this script:
- Installs the
aish
executable to/usr/native/AIShell
and creates a symbolic hyperlink at
/usr/native/bin/aish
- Attributable to some limitations, the AIShell module is just not put in
NOTE
This script solely works on Home windows and Mac methods. Linux customers have to comply with the guide set up directions.
To put in AI Shell, run the next command in your PowerShell session:
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-aishell.ps1') }"
To search out particulars on guide set up please see, Putting in AI Shell manually.
After working the set up script, you’ll be able to run Begin-AIShell
to start utilizing AI Shell.
AI Shell begins within the aspect by aspect expertise. You may swap between the brokers by utilizing the
@<agent title>
command. For instance, to change to the Azure OpenAI agent you’d use the
@openai-gpt
command. Moreover you are able to do @<agent title> <query>
to ship a query to the
agent instantly.
Inserting code into the PowerShell 7 session
Copying and pasting quite a lot of code might be annoying. AI Shell makes it straightforward to insert the AI generated
code straight into your PowerShell 7 session with the /code submit
command. In your AI Shell, run
/code submit
or use the Ctrl+d,Ctrl+d keyboard shortcut
to repeat the code into your PowerShell session.
In case you are accustomed to PowerShell 7 chances are you’ll be accustomed to Predictive Intellisense. When
you get multi-step instructions in your AI Shell response, you’ll be able to simply get every subsequent step in
your Predictive Intellisense buffer.
Resolving errors faster
Should you encounter an error in your working terminal, you should utilize the Resolve-Error
cmdlet to ship
that error to the open AI Shell window for decision. This command asks the AI mannequin that will help you
resolve the error.
Invoking AIShell from PowerShell 7
One key situation we wished to help is with the ability to pipe output of 1 command into the AI Shell
to get extra data or ask a comply with up query on the info given. With the Invoke-AIShell
command you’ll be able to simply do that.
Invoke-AIShell
can take enter from the pipeline but in addition can simply be used to name the AI agent
chosen in AI Shell with out having to change backwards and forwards.
Some extra ideas utilizing AI Shell
There are different chat instructions and hot-keys that make utilizing AI Shell simpler. For a full record
of the chat instructions, see the AI Shell reference.
Key bindings | Command | Performance |
---|---|---|
Ctrl+d, Ctrl+c | /code copy |
Copy all the generated code snippets to clipboard |
Ctrl+<n> | /code copy <n> |
Copy the n-th generated code snippet to clipboard |
Ctrl+d, Ctrl+d | /code submit |
Submit all the generated code snippets to the linked software |
Ctrl+d,<n> | /code submit <n> |
Submit the n-th generated code snippet to the linked software |
Moreover, you’ll be able to swap between the panes simpler utilizing the next keyboard shortcuts.
Key bindings | Performance |
---|---|
Alt+RightArrow | Strikes your cursor to the appropriate AI Shell pane |
Alt+LeftArrow | Strikes your cursor to the left PowerShell pane |
Why Attempt AI Shell?
AI Shell was constructed for individuals who search intelligence and adaptableness from their command-line. With
multi-agent help, AI Shell goals to be the assistant for any CLI instrument. You’ll profit from
superior AI capabilities, deeper integration together with your PowerShell session, and an extensibility
mannequin to get the help you want.
Name to Motion!
This public preview is just the start. We’d love to listen to your suggestions and insights as we refine
AI Shell to raised serve the CLI and PowerShell neighborhood. Obtain it in the present day in PowerShell with
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-aishell.ps1') }"
You should definitely discover the capabilities of the Copilot in Azure and Azure OpenAI brokers, and take command-line productiveness to
the subsequent degree! Be at liberty to present us suggestions on the present instrument and join early entry to
future options at aka.ms/AIShell-Suggestions.
Thanks a lot!
Steven Bucher
Product Supervisor on the PowerShell/CLI Staff