https://github.com/akira-cn/openai-sh
Fast ChatGPT CLI powered by Azure OpenAI.
https://github.com/akira-cn/openai-sh
azure-openai openai shell
Last synced: 2 months ago
JSON representation
Fast ChatGPT CLI powered by Azure OpenAI.
- Host: GitHub
- URL: https://github.com/akira-cn/openai-sh
- Owner: akira-cn
- License: mit
- Created: 2023-09-08T10:28:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-08T11:05:00.000Z (over 1 year ago)
- Last Synced: 2025-02-21T04:36:22.882Z (3 months ago)
- Topics: azure-openai, openai, shell
- Language: TypeScript
- Homepage:
- Size: 70.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# OPENAI-SH
Fast ChatGPT CLI powered by Azure OpenAI.
## Setup
> The minimum supported version of Node.js is v14
1. Install _openai-sh_:
```sh
npm install -g openai-sh
```2. Follow the config steps when first run:
```sh
ai
```
## Usage
```bash
ai [-s 'system prompts']?
```With this command, you can engage in a conversation with the AI and receive helpful responses in a natural, conversational manner directly through the CLI:
```sh
┌ Starting new conversation
│
◇ You:
│ how do I serve a redirect in express
│
◇ AI Shell:In Express, you can use the `redirect()` method to serve a redirect. The `redirect()` method takes one argument, which is the URL that you want to redirect to.
Here's an example:
\`\`\`js
app.get('/oldurl', (req, res) => {
res.redirect('/newurl');
});
\`\`\`
```### Set Language
The AI Shell's default language is English, but you can easily switch to your preferred language by using the corresponding language keys, as shown below:
| Language | Key |
| ------------------- | ------- |
| English | en |
| Simplified Chinese | zh-Hans |
| Traditional Chinese | zh-Hant |
| Spanish | es |
| Japanese | jp |
| Korean | ko |
| French | fr |
| German | de |
| Russian | ru |
| Ukrainian | uk |
| Vietnamese | vi |
| Arabic | ar |
| Portuguese | pt |
| Turkish | tr |For instance, if you want to switch to Simplified Chinese, you can do so by setting the LANGUAGE value to zh-Hans:
```sh
ai config set LANGUAGE=zh-Hans
```This will set your language to Simplified Chinese.
## Credit
- Thanks to [@builder.io/ai-shell](https://github.com/BuilderIO/ai-shell). This project is based on its excellent work results.