Skip to content

Commit 82eac2b

Browse files
Updating repo with various files to make it open source ready (#131)
* update license to be microsoft and not steve * first pass at support and FAQ docs * remove old doc and add new agent creation doc * Adding contributing guide and code of conduct * update readme * small updates to readme * feat: Add README files for Azure Agent and OpenAI Agent * chore: Update README and add contributing guide and code of conduct * chore: Update README and add contributing guide and code of conduct * formatting and gpt updates * chore: Update repository references and remove unnecessary files * small change to / command help * remove unnecessary api key instructions * small formatting stuff for faq * incorporate sean's changes * more of seans edits * number fixes * Update README.md Co-authored-by: Dongbo Wang <[email protected]> * clarify the /like and dislike --------- Co-authored-by: Dongbo Wang <[email protected]>
1 parent 42e3ede commit 82eac2b

File tree

12 files changed

+503
-426
lines changed

12 files changed

+503
-426
lines changed

Diff for: LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Steve Lee
3+
Copyright (c) 2023 Microsoft Corporation
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

Diff for: README.md

+90-66
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,124 @@
1-
# AISH
1+
# Welcome to the AISH repository
22

3-
This is a repository of various **AI** + **Sh**ell prototypes we have created to test out experiences and
4-
features. **AISH** is the latest and most finished prototype. It is a CLI tool that creates
5-
an interactive chat session with a registered Large Language Model. Currently we are in a **Private Preview** state and everything is subject to change.
3+
**AISH** is our latest CLI tool that provides an interactive shell session to chat with large
4+
language models. Users can use _agents_ to interact with different AI models, or other assistance
5+
providers, in a conversational manner. **AISH** also provides a framework for creating AI agents.
66

7-
![GIF showing demo of AISH](./docs/media/ShellCopilotDemo.gif)
7+
This project is currently in an **alpha** state. Expect many significant changes to the code as we
8+
experiment and refine the user experiences of this tool. We appreciate your feedback and patience as
9+
we continue our development.
810

9-
## Installing and Using AISH
11+
![GIF showing demo of AISH][04]
12+
13+
## Installing AISH
1014

1115
Some prerequisites for building AISH
12-
- Build script requires PowerShell v7.2 or newer versions. [PowerShell v7.4](https://learn.microsoft.com/powershell/scripting/install/installing-powershell?view=powershell-7.4) is recommended.
13-
- [.NET SDK 8](https://dotnet.microsoft.com/en-us/download) is required to build the project.
16+
17+
- Build script requires PowerShell v7.2 or newer versions
18+
- [PowerShell v7.4][11] is recommended
19+
- [.NET SDK 8][09] is required to build the project
1420

1521
Here are the steps to install and use AISH.
16-
1. Clone this repository, `git clone https://github.com/PowerShell/ShellCopilot`;
17-
2. Run `./build.ps1` in the repository's root directory to build the project;
18-
3. After the build is complete, you can find the produced executable `aish` in the `out\debug` folder within the repository's root directory. You can add it to the `PATH` environment variable for easy access.
1922

20-
> Note: Depending on your OS directory paths may be `\` on Windows or `/` on Mac.
23+
1. Clone this repository, `git clone https://github.com/PowerShell/AISH`
24+
2. Run `./build.ps1` in the repository's root directory to build the project
25+
3. After the build is complete, you can find the produced executable `aish` in the `out\debug\app`
26+
folder within the repository's root directory. You can add the location to the `PATH` environment
27+
variable for easy access. The full path is copied to your clipboard after successful build.
2128

22-
## Agent Concept
29+
## AI Agents
2330

24-
AISH has a concept of different AI Agents, these can be thought of like modules that users can use to interact with different AI models. Right now there are three supported agents
25-
- `az-cli`
26-
- `az-ps`
27-
- `openai-gpt`
31+
AISH provides a framework for creating and registering multiple AI Agents. The agents are libraries
32+
that you use to interact with different AI models or assistance providers. Currently, there are four
33+
supported agents in this repository.
2834

29-
If you run `aish` you will get prompted to choose between the two.
35+
Agent README files:
3036

31-
### Az-CLI Agent
37+
- [`az-cli` & `az-ps`][06]
38+
- [`openai-gpt`][08]
39+
- [`interpreter`][07]
3240

33-
This agent is for talking specifically to an Az CLI endpoint tailored to helping users with Azure CLI questions.
41+
When you run `aish`, you are prompted to choose an agent. For more details about each agent, see the
42+
README in the each agent folder.
3443

35-
Prerequisites:
36-
- Have [Azure CLI installed](https://learn.microsoft.com/cli/azure/install-azure-cli)
37-
- Login with an Azure account within the Microsoft tenant with `az login` command
44+
## How to use AISH
3845

39-
### Az-PS Agent
46+
To start a chat session with the LLM, run `aish`, which starts a new session in your current window.
47+
Choose the agent you would like to use. Once you select an agent you can begin your conversation.
4048

41-
This agent is for talking specifically to an Az PowerShell endpoint tailored to helping users with Azure PowerShell questions.
49+
We suggest using a split pane approach with the terminal of choice. In Windows Terminal, use the
50+
following command to start `aish` in a new split pane:
4251

43-
Prerequisites:
44-
- Have [Azure PowerShell installed](https://learn.microsoft.com/powershell/azure/install-azure-powershell)
45-
- Login with an Azure account within the Microsoft tenant with `Connect-AzAccount` command
52+
```shell
53+
wt -w 0 sp aish
54+
```
4655

56+
You can bind this command to a key like `F3` in your PowerShell session. Add the following code to
57+
your `$PROFILE` script:
4758

48-
### OpenAI-GPT Agent
59+
```powershell
60+
$PSReadLineSplat = @{
61+
Chord = 'F3'
62+
ScriptBlock = {
63+
wt -w 0 sp --tabColor '#345beb'--size 0.4 -p $env:WT_PROFILE_ID --title 'AISH' <full-path-to-aish.exe>
64+
}
65+
}
66+
Set-PSReadLineKeyHandler @PSReadLineSplat
67+
```
4968

50-
This is a more generalized agent that users can bring their own instance of Azure OpenAI (or the public OpenAI) and a completely customizable system prompt.
51-
Right now, it is defaulted to an internal Azure OpenAI endpoint with a prompt to be an assistant for PowerShell commands. This is for internal private preview purposes only.
69+
### `/` commands
5270

53-
## Getting an Azure OpenAI Endpoint Key
71+
By default, `aish` provides a base set of chat `/` commands used to interact with the responses from
72+
the AI model. To get a list of commands, use the `/help` command in the chat session.
5473

55-
All the configuration is already included by default and on the first run of this agent you will be prompted to include a API key to be able to use this endpoint.
74+
```
75+
Name Description
76+
────────────────────────────────────────────────────────────
77+
/agent Command for agent management.
78+
/cls Clear the screen.
79+
/code Command to interact with the code generated.
80+
/dislike Dislike the last response and send feedback.
81+
/exit Exit the interactive session.
82+
/help Show all available commands.
83+
/like Like the last response and send feedback.
84+
/refresh Refresh the chat session.
85+
/retry Regenerate a new response for the last query.
86+
```
5687

57-
Guide for Signing Up For API Key
58-
1. Navigate to <https://pscopilot.developer.azure-api.net>
59-
2. Click `Sign Up` located on the top right corner of the page.
60-
3. Sign up for a subscription by filling in the fields (email, password, first name, last name).
61-
4. Verify the account (An email should have been sent from
62-
<[email protected]> to your email)
63-
5. Click `Sign In` located on the top right corner of the page.
64-
6. Enter the email and password used when signing up.
65-
7. Click `Products` located on the top right corner of the page
66-
8. In the field stating `Your new product subscription name`, Enter `Azure OpenAI Service API`.
67-
9. Click `Subscribe` to be subscribed to the product.
88+
Also, agents can implement their own commands. Some commands, such as `/like` and `/dislike`, are
89+
commands that sends feedback to the agents. It is up to the agents to consume the feedback.
6890

69-
In order to view your subscription/API key,
70-
1. Click `Profile` located on the top right corner of the page.
71-
2. Your Key should be located under the `Subscriptions` section. Click on `Show` to view the
72-
primary or secondary key.
91+
## Agent development
7392

74-
Once you have a key you can always edit your endpoint configuration by running `/agent config openai-gpt` within AISH. This opens up a JSON file with all the configuration options.
93+
To learn more about how to create an agent for yourself please see, [Creating an Agent][03].
7594

76-
If you have separate Azure OpenAI endpoint you can use that instead of the one above. Read more at
77-
[Create and deploy an Azure OpenAI Service resource](https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource?pivots=ps).
95+
## Contributing to the project
7896

79-
## Using AISH
97+
Please see [CONTRIBUTING.md][02] for more details.
8098

81-
To start a chat session with the LLM, simply run `aish` and it will open up a new session in your current window.
82-
We suggest using a split pane approach with the terminal of choice.
83-
Windows Terminal offers an easy pane option by running:
99+
## Support
84100

85-
```shell
86-
wt -w 0 sp aish
87-
```
101+
For support, see our [Support][05] statement.
88102

89-
If you use Windows Terminal and would like to tie this command to a key like `F3` in your PowerShell session,
90-
you can add the following code to your `$PROFILE`:
103+
## Code of Conduct
91104

92-
```powershell
93-
Set-PSReadLineKeyHandler -Chord F3 -ScriptBlock { wt -w 0 sp --tabColor '#345beb'--size 0.4 -p "<your-default-WT-profile-guid>" --title 'AISH' <full-path-to-aish.exe> }
94-
```
105+
The project follows the Microsoft Open Source Code of Conduct. For more information, see the
106+
[Code of Conduct FAQ][01].
95107

96108
## Feedback
97109

98-
We still in development and value any and all feedback! Please file an [issue in this repository](https://github.com/PowerShell/ShellCopilot/issues) for
99-
any bugs, suggestions and feedback. Any additional feedback can be sent to
100-
110+
We're still in development and value your feedback! Please file [issues][10] in this repository for
111+
bugs, suggestions, or feedback.
112+
113+
<!-- link references -->
114+
[01]: ./docs/CODE_OF_CONDUCT.md
115+
[02]: ./docs/CONTRIBUTING.md
116+
[03]: ./docs/development/CreatingAnAgent.md
117+
[04]: ./docs/media/ShellCopilotDemo.gif
118+
[05]: ./docs/SUPPORT.md
119+
[06]: ./shell/ShellCopilot.Azure.Agent/README.md
120+
[07]: ./shell/ShellCopilot.Interpreter.Agent/README.md
121+
[08]: ./shell/ShellCopilot.OpenAI.Agent/README.md
122+
[09]: https://dotnet.microsoft.com/en-us/download
123+
[10]: https://github.com/PowerShell/AISH/issues
124+
[11]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell

Diff for: docs/CODE_OF_CONDUCT.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the
4+
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
5+
6+
Resources:
7+
8+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
9+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
10+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
11+
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)

Diff for: docs/CONTRIBUTING.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing to AISH
2+
3+
Thank you for your interest in contributing to AISH! We aren't currently accepting pull requests,
4+
but we highly value your contributions in other forms.
5+
6+
## Reporting Issues
7+
8+
Issues are a great way to contribute to the project. By creating a detailed report, you help us
9+
understand and prioritize what needs attention. Whether it's a bug or a feature request, your
10+
reports play a crucial role in improving AISH.
11+
12+
### How to Report an Issue
13+
14+
Before creating an issue, please do the following:
15+
16+
1. **Search for existing issues.** To avoid duplicates, please check to see if someone else has
17+
reported the same issue.
18+
2. **Check if the issue has been fixed.** Try to reproduce the issue using the latest `main` branch
19+
to see if it has already been addressed.
20+
21+
If you've determined that your issue is unique and current, you can proceed to create a new issue.
22+
Please follow the issue templates provided.
23+
24+
## Other Ways to Contribute
25+
26+
While we aren't accepting pull requests, there are other ways to contribute:
27+
28+
- Reviewing documentation for typos or clarity
29+
- Participating in discussions on issues
30+
- Providing use cases or additional information on existing issues

Diff for: docs/FAQ.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Frequently Asked Questions
2+
3+
This page provides help with common questions about the AISH platform.
4+
5+
## What is AISH?
6+
7+
**AISH** is an AI shell platform that provides a framework for developers to build their own AI
8+
Agents and assistance providers. **AISH** agents provide the user experience for the LLM and are
9+
deeply connected to PowerShell 7. For more about the architecture of **AISH**, see the
10+
[shell/README][01].
11+
12+
## What are agents?
13+
14+
An agent is a library that implements the user interface that talks to a specific large language
15+
model or other assistance provider. Users can interact with these agents in a conversational manner,
16+
using natural language, to get the desired output or assistance. Currently, there are four supported
17+
agents in this repository.
18+
19+
Agent README files:
20+
21+
- [`az-cli` & `az-ps`][02]
22+
- [`openai-gpt`][04]
23+
- [`interpreter`][03]
24+
25+
An assistance provider is an agent that provides user assistance without using a large language
26+
model or AI engine.
27+
28+
## What operating systems are supported?
29+
30+
We have tested **AISH** on macOS and Windows operating systems. **AISH** may work on linux but we
31+
haven't tested it can't guarantee that all features will work as expected.
32+
33+
## How do I get a split pane experience in my Terminal?
34+
35+
The ability to run `aish` in a split pane depends on the capabilities of your terminal. For example,
36+
Windows Terminal can be split by running the following command: `wt -w 0 sp`. Refer to the
37+
documentation for your terminal application to see if it supports this feature.
38+
39+
> [!NOTE]
40+
> Information the user should notice even if skimmingNot all terminal applications support this
41+
> feature.
42+
43+
<!-- link references -->
44+
[01]: ../shell/README.md
45+
[02]: ./shell/ShellCopilot.Azure.Agent/README.md
46+
[03]: ./shell/ShellCopilot.Interpreter.Agent/README.md
47+
[04]: ./shell/ShellCopilot.OpenAI.Agent/README.md

0 commit comments

Comments
 (0)