openai-sh

0.1.1 • Public • Published

OPENAI-SH

Fast ChatGPT CLI powered by Azure OpenAI.

Setup

The minimum supported version of Node.js is v14

  1. Install openai-sh:
npm install -g openai-sh
  1. Follow the config steps when first run:
ai

Usage

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:

┌  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:

ai config set LANGUAGE=zh-Hans

This will set your language to Simplified Chinese.

Credit

Readme

Keywords

none

Package Sidebar

Install

npm i openai-sh

Weekly Downloads

2

Version

0.1.1

License

none

Unpacked Size

63.6 kB

Total Files

4

Last publish

Collaborators

  • spritejs