aoi

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

README

Aoi (葵)

中文说明

Ghost in the Shell powered by OpenAI.

With Aoi, you can have natural language conversations with an AI in the terminal that can understand your queries and execute appropriate commands.

Features

You can use Aoi as a terminal version of ChatGPT, Besides, Aoi comes with several built-in features that can help you be more productive:

  • /code - Generate code snippets and auto copy them to the clipboard, e.g. /code go generate random numbers
  • /db - Auto load database schema and execute SQL, e.g. /db postgres://user:passwd@host/db list tables
  • /shell - Generate shell command and execute it, e.g. /shell view listening ports
  • /ssh - Generate shell command and execute it on the remote host, e.g. /ssh {host} view listening tcp ports
  • /summary - Generate a summary of the content from a URL, and translate it if needed e.g. /summary {url} /summary cn {url}
  • /tldr - Get a tl;dr explanation of a shell command
  • /trans - Translate text to a specified language
  • /copy - Copy the last reply

Getting Started

You can download Aoi from the GitHub release page. Alternatively, you can use Go to install Aoi on your system:

go install github.com/shellfly/aoi@latest
OpenAI API Key

Set your OpenAI API key as an environment variable, and then run the aoi command.

export OPENAI_API_KEY={your_api_key}

aoi
OpenAI API Base URL

If needed, you can also customize the OpenAI API BASE URL as an environment variable.

export OPENAI_API_BASE_URL={your_custom_api_base_url}
Azure OpenAI

Set Azure environment variables and pass the azure.deployment to use Azure OpenAI service

export OPENAI_API_KEY={azure openai secret}
export OPENAI_API_BASE_URL={azure openai endpoint}

aoi -azure.deployment {model deployment name}

Demos

shell

shell

database

pg

Contributing

If you find any issues with Aoi or have suggestions for new features, please feel free to create an issue or submit a pull request on the GitHub repository. Contributions from anyone and everyone are welcome!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL