# openai-sh

> Fast ChatGPT CLI powered by Azure OpenAI.

Latest version **0.1.1** (published 2023-09-08) · 0 weekly downloads

## Install

```sh
npm install openai-sh
pnpm add openai-sh
yarn add openai-sh
bun add openai-sh
```

Provides the commands `ai`, `aish`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2023-09-08 |
| First published | 2023-09-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 13 |
| Unpacked size | 62.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | spritejs |

## Links

- npm: https://www.npmjs.com/package/openai-sh
- Repository: https://github.com/akira-cn/openai-sh
- Homepage: https://github.com/akira-cn/openai-sh#readme
- Issues: https://github.com/akira-cn/openai-sh/issues
- npm.io page: https://npm.io/package/openai-sh

## Dependencies (13)

- [ini](https://npm.io/package/ini.md) ^4.0.0
- [cleye](https://npm.io/package/cleye.md) ^1.3.2
- [execa](https://npm.io/package/execa.md) ^7.1.1
- [dedent](https://npm.io/package/dedent.md) ^0.7.0
- [openai](https://npm.io/package/openai.md) ^3.2.1
- [i18next](https://npm.io/package/i18next.md) ^22.4.15
- [kolorist](https://npm.io/package/kolorist.md) ^1.7.0
- [@nexssp/os](https://npm.io/package/@nexssp/os.md) ^2.0.35
- [clipboardy](https://npm.io/package/clipboardy.md) ^2.3.0
- [@clack/core](https://npm.io/package/@clack/core.md) latest
- [@azure/openai](https://npm.io/package/@azure/openai.md) ^1.0.0-beta.5
- [@clack/prompts](https://npm.io/package/@clack/prompts.md) latest
- [@dqbd/tiktoken](https://npm.io/package/@dqbd/tiktoken.md) ^1.0.2

## Recent versions

- 0.1.1 (latest) — 2023-09-08
- 0.1.0 — 2023-09-08

## 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
```

<img src="https://aircode-yvo.b-cdn.net/resource/1694168754127-vqofp0gwey.jpg" width="300"/>

## Usage

```bash
ai <system prompt>?
```

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.

---
_Source: https://npm.io/package/openai-sh · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
