Skip to content
/ aoi Public

Ghost in the Shell powered by OpenAI (Terminal version of ChatGPT)

License

Notifications You must be signed in to change notification settings

shellfly/aoi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!