Skip to content

MrAwesome/openai-cli

Repository files navigation

openai-cli

NOTE: This is very much under construction right now, so there are still a few rough edges. Please file an issue or contact me directly if you find problems.

Installation

Fetch the code

git clone git@github.com:MrAwesome/openai-cli.git
# or https://github.com/MrAwesome/openai-cli.git

Install dependencies:

cd openai-cli
yarn

Add convenience alias:

Add this to your shell config (.zshrc, .bashrc, etc.):

ai() {
    SCRIPT_DIR="${HOME}/openai-cli"
    yarn \
        --cwd="${SCRIPT_DIR}" \
        run -s ts-node \
        "${SCRIPT_DIR}/src/index.ts" openai-completion $*
}

Examples

Console

Basic use:

2023-02-09_20:16:35

Changing temperature:

2023-03-18_21:56:31

Reading from a file:

2023-03-18_22:00:05

Get freaky:

2023-03-18_22:04:54

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published